Skip to content

Commit

Permalink
multiboot: fix e801 memory map
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bonzini authored and Anthony Liguori committed Nov 30, 2012
1 parent fe512d6 commit c6e052f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Binary file modified pc-bios/multiboot.bin
Binary file not shown.
7 changes: 7 additions & 0 deletions pc-bios/optionrom/multiboot.S
Expand Up @@ -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
Expand Down

0 comments on commit c6e052f

Please sign in to comment.