summaryrefslogtreecommitdiffstats
path: root/hw/core
diff options
context:
space:
mode:
authorEric Auger2015-06-16 18:07:54 +0200
committerPaolo Bonzini2015-07-07 11:03:16 +0200
commit6b3f7f639ed8861cd034292f9bb85b00c73658a6 (patch)
treeff302f94d2b7a969a9a1990ae7b1dcd92823c67e /hw/core
parentMerge remote-tracking branch 'remotes/bonzini/tags/for-upstream-smm' into sta... (diff)
downloadqemu-6b3f7f639ed8861cd034292f9bb85b00c73658a6.tar.gz
qemu-6b3f7f639ed8861cd034292f9bb85b00c73658a6.tar.xz
qemu-6b3f7f639ed8861cd034292f9bb85b00c73658a6.zip
vl: move rom_load_all after machine init done
On ARM, commit ac9d32e39664e060cd1b538ff190980d57ad69e4 postponed the memory preparation for boot until the machine init done notifier. This has for consequence to insert ROM at machine init done time. However the rom_load_all function stayed called before the ROM are inserted. As a consequence the rom_load_all function does not do everything it is expected to do, on ARM. It currently registers the ROM reset notifier but does not iterate through the registered ROM list. the isrom field is not set properly. This latter is used to report info in the monitor and also to decide whether the rom->data can be freed on ROM reset notifier. To fix that regression the patch moves the rom_load_all call after machine init done. We also take the opportunity to rename the rom_load_all function into rom_check_and_resgister_reset() and integrate the rom_load_done in it. Signed-off-by: Eric Auger <eric.auger@linaro.org> Reported-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-Id: <1434470874-22573-1-git-send-email-eric.auger@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/loader.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/core/loader.c b/hw/core/loader.c
index 7ee675c1df..216eeeb917 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -933,7 +933,7 @@ static void rom_reset(void *unused)
}
}
-int rom_load_all(void)
+int rom_check_and_register_reset(void)
{
hwaddr addr = 0;
MemoryRegionSection section;
@@ -957,12 +957,8 @@ int rom_load_all(void)
memory_region_unref(section.mr);
}
qemu_register_reset(rom_reset, NULL);
- return 0;
-}
-
-void rom_load_done(void)
-{
roms_loaded = 1;
+ return 0;
}
void rom_set_fw(FWCfgState *f)