comparison target-utils/dspdump/dumpops.c @ 544:451d8b545b11

dspdump: fulldump command implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 28 Oct 2019 21:00:40 +0000
parents 947c6a443a9c
children
comparison
equal deleted inserted replaced
543:947c6a443a9c 544:451d8b545b11
93 rc = boot_dsp_dump_agent(); 93 rc = boot_dsp_dump_agent();
94 if (rc < 0) 94 if (rc < 0)
95 return; /* error msg already printed */ 95 return; /* error msg already printed */
96 dump_large_section((u16)mode, (u32)addr, (u32)len); 96 dump_large_section((u16)mode, (u32)addr, (u32)len);
97 } 97 }
98
99 static struct rom_section {
100 char *name;
101 u32 addr;
102 u32 size;
103 int mode;
104 } rom_sections[] = {
105 { "Registers", 0x00000, 0x0060, BL_MODE_DATA_READ },
106 { "DROM", 0x09000, 0x5000, BL_MODE_DROM_READ },
107 { "PDROM", 0x0e000, 0x2000, BL_MODE_PROM_READ },
108 { "PROM0", 0x07000, 0x7000, BL_MODE_PROM_READ },
109 { "PROM1", 0x18000, 0x8000, BL_MODE_PROM_READ },
110 { "PROM2", 0x28000, 0x8000, BL_MODE_PROM_READ },
111 { "PROM3", 0x38000, 0x2000, BL_MODE_PROM_READ },
112 { 0, 0, 0, -1 }
113 };
114
115 void
116 cmd_fulldump()
117 {
118 struct rom_section *tp;
119 int rc;
120
121 rc = boot_dsp_dump_agent();
122 if (rc < 0)
123 return; /* error msg already printed */
124 for (tp = rom_sections; tp->name; tp++) {
125 printf("DSP dump: %s [%05x-%05x]\n", tp->name, tp->addr,
126 tp->addr + tp->size - 1);
127 rc = dump_large_section(tp->mode, tp->addr, tp->size);
128 if (rc < 0)
129 return; /* error msg already printed */
130 }
131 }