From patchwork Thu Apr 28 14:11:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: multiboot: set boot_device to first partition From: Arun Thomas X-Patchwork-Id: 93220 Message-Id: <1303999871-9955-1-git-send-email-arun.thomas@gmail.com> To: qemu-devel@nongnu.org Cc: Arun Thomas Date: Thu, 28 Apr 2011 16:11:11 +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 Reviewed-by: Stefan Hajnoczi --- hw/multiboot.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/multiboot.c b/hw/multiboot.c index 394ed01..6e6cfb9 100644 --- a/hw/multiboot.c +++ b/hw/multiboot.c @@ -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);