@@ -1142,6 +1142,7 @@ static void rom_reset(void *unused)
if (rom->data == NULL) {
continue;
}
+ trace_loader_write_rom(rom->name, rom->addr, rom->datasize, rom->isrom);
if (rom->mr) {
void *host = memory_region_get_ram_ptr(rom->mr);
memcpy(host, rom->data, rom->datasize);
@@ -1160,8 +1161,6 @@ static void rom_reset(void *unused)
* CPU definitely fetches its instructions from the just written data.
*/
cpu_flush_icache_range(rom->addr, rom->datasize);
-
- trace_loader_write_rom(rom->name, rom->addr, rom->datasize, rom->isrom);
}
}
It is more useful to trace the event which will happen, rather than missing an event that failed. So move the 'write_rom' trace event earlier. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/core/loader.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)