Commit c6e052f0 authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Anthony Liguori
Browse files

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 <agraf@suse.de>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent fe512d65
Loading
Loading
Loading
Loading
(1 KiB)

File changed.

No diff preview for this file type.

+7 −0
Original line number Diff line number Diff line
@@ -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