FreeCalypso > hg > freecalypso-sw
view rvinterf/etmsync/dspapidump.c @ 923:10b4bed10192
gsm-fw/L1: fix for the DSP patch corruption bug
The L1 code we got from the LoCosto fw contains a feature for DSP CPU load
measurement. This feature is a LoCosto-ism, i.e., not applicable to earlier
DBB chips (Calypso) with their respective earlier DSP ROMs. Most of the
code dealing with that feature is conditionalized as #if (DSP >= 38),
but one spot was missed, and the MCU code was writing into an API word
dealing with this feature. In TCS211 this DSP API word happens to be
used by the DSP code patch, hence that write was corrupting the patched
DSP code.
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 19 Oct 2015 17:13:56 +0000 |
parents | 38c7078712ab |
children | 2a867e5768e9 |
line wrap: on
line source
/* * This utility uses ETM in synchronous mode to read and dump the contents * of the DSP API RAM in a target Calypso GSM device while the firmware is * running. */ #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include <endian.h> #include "localtypes.h" #include "exitcodes.h" #define APIF_ADDR 0xFFD00000 #define API_SIZE_IN_WORDS 0x2000 single_op_main() { u16 buf[64], *linebase; unsigned off; int rc, i, j; for (off = 0; off < API_SIZE_IN_WORDS; ) { rc = do_memory_read_16(APIF_ADDR + off * 2, buf, 0x40); if (rc) return(rc); for (i = 0; i < 8; i++) { printf("%04X:", off); linebase = buf + i * 8; for (j = 0; j < 8; j++) printf(" %04X", linebase[j]); putchar('\n'); off += 8; } } return(0); }