# HG changeset patch # User Mychaela Falconia # Date 1572296440 0 # Node ID 451d8b545b11f05295e9bfe60208b26e6ce7ebb2 # Parent 947c6a443a9ceaecdc4410e554265cd05ec58cab dspdump: fulldump command implemented diff -r 947c6a443a9c -r 451d8b545b11 target-utils/dspdump/cmdtab.c --- a/target-utils/dspdump/cmdtab.c Mon Oct 28 20:47:40 2019 +0000 +++ b/target-utils/dspdump/cmdtab.c Mon Oct 28 21:00:40 2019 +0000 @@ -4,6 +4,7 @@ extern void cmd_abbw(); extern void cmd_bigdump(); extern void cmd_dump(); +extern void cmd_fulldump(); extern void cmd_jump(); extern void cmd_r8(); extern void cmd_r16(); @@ -23,6 +24,7 @@ {"abbw", cmd_abbw}, {"bigdump", cmd_bigdump}, {"dump", cmd_dump}, + {"fulldump", cmd_fulldump}, {"jump", cmd_jump}, {"poweroff", abb_power_off}, {"r8", cmd_r8}, diff -r 947c6a443a9c -r 451d8b545b11 target-utils/dspdump/dumpops.c --- a/target-utils/dspdump/dumpops.c Mon Oct 28 20:47:40 2019 +0000 +++ b/target-utils/dspdump/dumpops.c Mon Oct 28 21:00:40 2019 +0000 @@ -95,3 +95,37 @@ return; /* error msg already printed */ dump_large_section((u16)mode, (u32)addr, (u32)len); } + +static struct rom_section { + char *name; + u32 addr; + u32 size; + int mode; +} rom_sections[] = { + { "Registers", 0x00000, 0x0060, BL_MODE_DATA_READ }, + { "DROM", 0x09000, 0x5000, BL_MODE_DROM_READ }, + { "PDROM", 0x0e000, 0x2000, BL_MODE_PROM_READ }, + { "PROM0", 0x07000, 0x7000, BL_MODE_PROM_READ }, + { "PROM1", 0x18000, 0x8000, BL_MODE_PROM_READ }, + { "PROM2", 0x28000, 0x8000, BL_MODE_PROM_READ }, + { "PROM3", 0x38000, 0x2000, BL_MODE_PROM_READ }, + { 0, 0, 0, -1 } +}; + +void +cmd_fulldump() +{ + struct rom_section *tp; + int rc; + + rc = boot_dsp_dump_agent(); + if (rc < 0) + return; /* error msg already printed */ + for (tp = rom_sections; tp->name; tp++) { + printf("DSP dump: %s [%05x-%05x]\n", tp->name, tp->addr, + tp->addr + tp->size - 1); + rc = dump_large_section(tp->mode, tp->addr, tp->size); + if (rc < 0) + return; /* error msg already printed */ + } +}