]> git.proxmox.com Git - qemu.git/commitdiff
multiboot: fix e801 memory map
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 29 Nov 2012 17:11:50 +0000 (18:11 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 30 Nov 2012 14:27:47 +0000 (08:27 -0600)
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 <agraf@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc-bios/multiboot.bin
pc-bios/optionrom/multiboot.S

index f74a6e142fddc054d7f40ab346a108532afac40f..7b3c1745a430ea5e0e15b9aa817d1cbbaa40db14 100644 (file)
Binary files a/pc-bios/multiboot.bin and b/pc-bios/multiboot.bin differ
index f08222a3c61d9dc4cddbb39c0d7fe33b3f03bb3a..003bcfb49fa0e72429d97bfbf9dd3a464f72a105 100644 (file)
@@ -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