提交 c6e052f0 编写于 作者: P Paolo Bonzini 提交者: Anthony Liguori

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: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 fe512d65
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册