From: Paolo Bonzini Date: Thu, 29 Nov 2012 17:11:50 +0000 (+0100) Subject: multiboot: fix e801 memory map X-Git-Tag: qemu-xen-4.3.0-rc1~17^2~10 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c6e052f0809b56a657b2afcd728e07ffddb28f06;p=qemu-upstream-4.5-testing.git multiboot: fix e801 memory map The e801 memory sizes in the multiboot structures hard-code the available low memory to 640. However, the value should not include the size of the EBDA. Fill the value in the option ROM, getting the size of low memory from the BIOS. Cc: Alexander Graf Signed-off-by: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Anthony Liguori --- diff --git a/pc-bios/multiboot.bin b/pc-bios/multiboot.bin index f74a6e142..7b3c1745a 100644 Binary files a/pc-bios/multiboot.bin and b/pc-bios/multiboot.bin differ diff --git a/pc-bios/optionrom/multiboot.S b/pc-bios/optionrom/multiboot.S index f08222a3c..003bcfb49 100644 --- a/pc-bios/optionrom/multiboot.S +++ b/pc-bios/optionrom/multiboot.S @@ -75,6 +75,13 @@ run_multiboot: shr $4, %eax mov %ax, %fs + /* Account for the EBDA in the multiboot structure's e801 + * map. + */ + int $0x12 + cwtl + movl %eax, %fs:4 + /* ES = mmap_addr */ mov %fs:48, %eax shr $4, %eax