multiboot: set boot_device to first partition
authorArun Thomas <arun.thomas@gmail.com>
Thu, 28 Apr 2011 14:11:11 +0000 (16:11 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 3 Jun 2011 20:12:40 +0000 (22:12 +0200)
The multiboot info struct's 'boot_device' field has 'part1' set to 0x01, which
maps to the second primary partition. To specify the first primary partition,
'part1' should be set to 0x00, since partition numbers start from zero
according to the multiboot spec.

Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/multiboot.c

index 394ed0136e83c0a56258d49eb44febb243f5623e..6e6cfb9531d1e4ed4053da04d3f0a52d261d38ca 100644 (file)
@@ -307,7 +307,7 @@ int load_multiboot(void *fw_cfg,
                                 | MULTIBOOT_FLAGS_MMAP);
     stl_p(bootinfo + MBI_MEM_LOWER,   640);
     stl_p(bootinfo + MBI_MEM_UPPER,   (ram_size / 1024) - 1024);
-    stl_p(bootinfo + MBI_BOOT_DEVICE, 0x8001ffff); /* XXX: use the -boot switch? */
+    stl_p(bootinfo + MBI_BOOT_DEVICE, 0x8000ffff); /* XXX: use the -boot switch? */
     stl_p(bootinfo + MBI_MMAP_ADDR,   ADDR_E820_MAP);
 
     mb_debug("multiboot: mh_entry_addr = %#x\n", mh_entry_addr);