Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Commit

Permalink
Don't load options roms intended to be loaded by the bios in qemu
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
avikivity committed Dec 22, 2009
1 parent d1b2fe2 commit 4864f93
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hw/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4864f93

Please sign in to comment.