From 4864f9398761a017c769dd55e6bce84b6c29c893 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Tue, 22 Dec 2009 11:22:55 +0200 Subject: Don't load options roms intended to be loaded by the bios in qemu The first such option rom will load at address 0, which isn't very nice, and the second will report a conflict and abort, which is horrible. Signed-off-by: Avi Kivity --- hw/loader.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/loader.c b/hw/loader.c index 2ceb8eba4..eef385eb5 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -636,6 +636,9 @@ static void rom_reset(void *unused) Rom *rom; QTAILQ_FOREACH(rom, &roms, next) { + if (rom->fw_file) { + continue; + } if (rom->data == NULL) continue; cpu_physical_memory_write_rom(rom->addr, rom->data, rom->romsize); @@ -654,6 +657,9 @@ int rom_load_all(void) Rom *rom; QTAILQ_FOREACH(rom, &roms, next) { + if (rom->fw_file) { + continue; + } if (addr > rom->addr) { fprintf(stderr, "rom: requested regions overlap " "(rom %s. free=0x" TARGET_FMT_plx @@ -752,7 +758,7 @@ void do_info_roms(Monitor *mon) Rom *rom; QTAILQ_FOREACH(rom, &roms, next) { - if (rom->addr) { + if (!rom->fw_file) { monitor_printf(mon, "addr=" TARGET_FMT_plx " size=0x%06zx mem=%s name=\"%s\" \n", rom->addr, rom->romsize, -- cgit v1.2.3