From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NN1UQ-0005RP-Av for qemu-devel@nongnu.org; Tue, 22 Dec 2009 04:57:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NN1UK-0005L5-3I for qemu-devel@nongnu.org; Tue, 22 Dec 2009 04:57:12 -0500 Received: from [199.232.76.173] (port=42384 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NN1UJ-0005L2-UW for qemu-devel@nongnu.org; Tue, 22 Dec 2009 04:57:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49235) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NN1UJ-0004ef-EY for qemu-devel@nongnu.org; Tue, 22 Dec 2009 04:57:07 -0500 From: Avi Kivity Date: Tue, 22 Dec 2009 11:57:02 +0200 Message-Id: <1261475822-31679-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH v2 master, stable-0.12] Don't load options roms intended to be loaded by the bios in qemu List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , qemu-devel@nongnu.org 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 --- Changes from v1: - use ->fw_file instead of ->addr to distinguish between host-loaded and firmware-loaded roms - add the same check in a couple more places hw/loader.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index 2ceb8eb..eef385e 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, -- 1.6.5.3