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 <avi@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Avi Kivity 2009-12-22 11:57:02 +02:00 committed by Aurelien Jarno
parent 502e64fe23
commit e405a2ba91
1 changed files with 7 additions and 1 deletions

View File

@ -636,6 +636,9 @@ static void rom_reset(void *unused)
Rom *rom; Rom *rom;
QTAILQ_FOREACH(rom, &roms, next) { QTAILQ_FOREACH(rom, &roms, next) {
if (rom->fw_file) {
continue;
}
if (rom->data == NULL) if (rom->data == NULL)
continue; continue;
cpu_physical_memory_write_rom(rom->addr, rom->data, rom->romsize); cpu_physical_memory_write_rom(rom->addr, rom->data, rom->romsize);
@ -654,6 +657,9 @@ int rom_load_all(void)
Rom *rom; Rom *rom;
QTAILQ_FOREACH(rom, &roms, next) { QTAILQ_FOREACH(rom, &roms, next) {
if (rom->fw_file) {
continue;
}
if (addr > rom->addr) { if (addr > rom->addr) {
fprintf(stderr, "rom: requested regions overlap " fprintf(stderr, "rom: requested regions overlap "
"(rom %s. free=0x" TARGET_FMT_plx "(rom %s. free=0x" TARGET_FMT_plx
@ -752,7 +758,7 @@ void do_info_roms(Monitor *mon)
Rom *rom; Rom *rom;
QTAILQ_FOREACH(rom, &roms, next) { QTAILQ_FOREACH(rom, &roms, next) {
if (rom->addr) { if (!rom->fw_file) {
monitor_printf(mon, "addr=" TARGET_FMT_plx monitor_printf(mon, "addr=" TARGET_FMT_plx
" size=0x%06zx mem=%s name=\"%s\" \n", " size=0x%06zx mem=%s name=\"%s\" \n",
rom->addr, rom->romsize, rom->addr, rom->romsize,