aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@gmail.com>2009-08-13 21:48:10 +0100
committerStefan Hajnoczi <stefanha@gmail.com>2009-12-14 17:58:38 +0000
commit2eeb711560ffb78bbd1d4923be53f3718fa485f5 (patch)
treebfbd5d31b52b24cb40c4b94b2d65e55155b515e9
parent177389fb73d3a7c883c76cbefd72ea598eb0a530 (diff)
downloadipxe-2eeb711560ffb78bbd1d4923be53f3718fa485f5.zip
ipxe-2eeb711560ffb78bbd1d4923be53f3718fa485f5.tar.gz
ipxe-2eeb711560ffb78bbd1d4923be53f3718fa485f5.tar.bz2
[multiboot] Build memory map after shutting down and unhiding gPXE
The Multiboot memory map needs to be built after unhiding gPXE and downloaded images from memory. Solaris faults during boot when trying to access the ramdisk, which is hidden from the memory map while gPXE is executing. This issue is fixed by using the memory map from after gPXE unhides itself. Reported-by: Moinak Ghosh <moinakg@belenix.org> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
-rw-r--r--src/arch/i386/image/multiboot.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/arch/i386/image/multiboot.c b/src/arch/i386/image/multiboot.c
index 1811e91..5b62095 100644
--- a/src/arch/i386/image/multiboot.c
+++ b/src/arch/i386/image/multiboot.c
@@ -267,8 +267,6 @@ static int multiboot_exec ( struct image *image ) {
memset ( &mbinfo, 0, sizeof ( mbinfo ) );
mbinfo.flags = ( MBI_FLAG_LOADER | MBI_FLAG_MEM | MBI_FLAG_MMAP |
MBI_FLAG_CMDLINE | MBI_FLAG_MODS );
- multiboot_build_memmap ( image, &mbinfo, mbmemmap,
- ( sizeof(mbmemmap) / sizeof(mbmemmap[0]) ) );
mb_cmdline_offset = 0;
mbinfo.cmdline = multiboot_add_cmdline ( image->name, image->cmdline );
mbinfo.mods_count = multiboot_build_module_list ( image, mbmodules,
@@ -282,6 +280,12 @@ static int multiboot_exec ( struct image *image ) {
*/
shutdown ( SHUTDOWN_BOOT );
+ /* Build memory map after unhiding bootloader memory regions as part of
+ * shutting everything down.
+ */
+ multiboot_build_memmap ( image, &mbinfo, mbmemmap,
+ ( sizeof(mbmemmap) / sizeof(mbmemmap[0]) ) );
+
/* Jump to OS with flat physical addressing */
DBGC ( image, "MULTIBOOT %p starting execution at %lx\n",
image, entry );