From 6127c0c5d20a0945e4ffe3da0f5b7ec82266f933 Mon Sep 17 00:00:00 2001 From: Victor Sun Date: Fri, 14 May 2021 10:18:17 +0800 Subject: [PATCH] HV: modify low 1MB area for pre-launched VM e820 The memory range of [0xA0000, 0xFFFFF] is a known reserved area for BIOS, actually Linux kernel would enforce this area to be reserved during its boot stage. Set this area to usable would cause potential compatibility issues. The patch set the range to reserved type to make it consistent with the real world. BTW, There should be a EBDA(Entended BIOS DATA Area) with reserved type exist right before 0xA0000 in real world for non-EFI boot. But given ACRN has no legacy BIOS emulation, we simply skipped the EBDA in vE820. Tracked-On: #5626 Signed-off-by: Victor Sun Reviewed-by: Jason Chen CJ --- hypervisor/arch/x86/guest/ve820.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hypervisor/arch/x86/guest/ve820.c b/hypervisor/arch/x86/guest/ve820.c index 3f208ef92..7e1eee213 100644 --- a/hypervisor/arch/x86/guest/ve820.c +++ b/hypervisor/arch/x86/guest/ve820.c @@ -127,12 +127,12 @@ void create_sos_vm_e820(struct acrn_vm *vm) static const struct e820_entry pre_ve820_template[E820_MAX_ENTRIES] = { { /* usable RAM under 1MB */ .baseaddr = 0x0UL, - .length = 0xF0000UL, /* 960KB */ + .length = 0xA0000UL, /* 640KB */ .type = E820_TYPE_RAM }, - { /* mptable/RSDP */ - .baseaddr = 0xF0000UL, /* 960KB */ - .length = 0x10000UL, /* 64KB */ + { /* Video/BIOS extentions */ + .baseaddr = 0xA0000UL, + .length = 0x60000UL, /* 384KB */ .type = E820_TYPE_RESERVED }, /* Software SRAM segment splits the lowmem into two parts */