summaryrefslogtreecommitdiffstats
path: root/Src/osmoconbb/src/target/firmware/calypso/misc.c
diff options
context:
space:
mode:
authorTom2012-01-11 13:56:26 +0100
committerTom2012-01-11 13:56:26 +0100
commit959e9f97cdaac774b530a375a1fe8bcfe7ac1f5b (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /Src/osmoconbb/src/target/firmware/calypso/misc.c
parentFirmware can now be loaded from GUI, threading problem fixed (diff)
downloadimsi-catcher-detection-959e9f97cdaac774b530a375a1fe8bcfe7ac1f5b.tar.gz
imsi-catcher-detection-959e9f97cdaac774b530a375a1fe8bcfe7ac1f5b.tar.xz
imsi-catcher-detection-959e9f97cdaac774b530a375a1fe8bcfe7ac1f5b.zip
cleanup
Diffstat (limited to 'Src/osmoconbb/src/target/firmware/calypso/misc.c')
-rw-r--r--Src/osmoconbb/src/target/firmware/calypso/misc.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/Src/osmoconbb/src/target/firmware/calypso/misc.c b/Src/osmoconbb/src/target/firmware/calypso/misc.c
deleted file mode 100644
index 460cc5d..0000000
--- a/Src/osmoconbb/src/target/firmware/calypso/misc.c
+++ /dev/null
@@ -1,60 +0,0 @@
-
-#include <stdint.h>
-#include <stdio.h>
-#include <memory.h>
-
-/* dump a memory range */
-void memdump_range(unsigned int *ptr, unsigned int len)
-{
- unsigned int *end = ptr + (len/4);
- unsigned int *tmp;
-
- for (tmp = ptr; tmp < end; tmp += 8) {
- int i;
- printf("%08X: ", (unsigned int) tmp);
-
- for (i = 0; i < 8; i++)
- printf("%08X %s", *(tmp+i), i == 3 ? " " : "");
-
- putchar('\n');
- }
-}
-
-#define KBIT 1024
-#define MBIT (1024*KBIT)
-void dump_mem(void)
-{
- puts("Dump 64kBits of internal ROM\n");
- memdump_range((void *)0x03800000, 64*KBIT/8);
-
- puts("Dump 8Mbits of external flash\n");
- memdump_range((void *)0x00000000, 8*MBIT/8);
-
- puts("Dump 2Mbits of internal RAM\n");
- memdump_range((void *)0x00800000, 2*MBIT/8);
-
- puts("Dump 2Mbits of external RAM\n");
- memdump_range((void *)0x01000000, 2*MBIT/8);
-}
-
-#define REG_DEV_ID_CODE 0xfffef000
-#define REG_DEV_VER_CODE 0xfffef002
-#define REG_DEV_ARMVER_CODE 0xfffffe00
-#define REG_cDSP_ID_CODE 0xfffffe02
-#define REG_DIE_ID_CODE 0xfffef010
-
-void dump_dev_id(void)
-{
- int i;
-
- printf("Device ID code: 0x%04x\n", readw(REG_DEV_ID_CODE));
- printf("Device Version code: 0x%04x\n", readw(REG_DEV_VER_CODE));
- printf("ARM ID code: 0x%04x\n", readw(REG_DEV_ARMVER_CODE));
- printf("cDSP ID code: 0x%04x\n", readw(REG_cDSP_ID_CODE));
- puts("Die ID code: ");
- for (i = 0; i < 64/8; i += 4)
- printf("%08x", readl(REG_DIE_ID_CODE+i));
- putchar('\n');
-}
-
-