Skip to content

Commit f18dfcf

Browse files
jsun26intelwenlingz
authored andcommitted
HV: prepare ve820 for apl nuc
Add ve820 table for apl nuc board to enable prelaunched VM on it; Tracked-On: #3214 Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 2ec1694 commit f18dfcf

File tree

1 file changed

+35
-2
lines changed
  • hypervisor/arch/x86/configs/nuc6cayh

1 file changed

+35
-2
lines changed

hypervisor/arch/x86/configs/nuc6cayh/ve820.c

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,44 @@
66

77
#include <vm.h>
88

9+
#define VE820_ENTRIES_APL_NUC 5U
10+
static const struct e820_entry ve820_entry[VE820_ENTRIES_APL_NUC] = {
11+
{ /* usable RAM under 1MB */
12+
.baseaddr = 0x0UL,
13+
.length = 0xF0000UL, /* 960KB */
14+
.type = E820_TYPE_RAM
15+
},
16+
17+
{ /* mptable */
18+
.baseaddr = 0xF0000UL, /* 960KB */
19+
.length = 0x10000UL, /* 16KB */
20+
.type = E820_TYPE_RESERVED
21+
},
22+
23+
{ /* lowmem */
24+
.baseaddr = 0x100000UL, /* 1MB */
25+
.length = 0x1FF00000UL, /* 511MB */
26+
.type = E820_TYPE_RAM
27+
},
28+
29+
{ /* between lowmem and PCI hole */
30+
.baseaddr = 0x20000000UL, /* 512MB */
31+
.length = 0xA0000000UL, /* 2560MB */
32+
.type = E820_TYPE_RESERVED
33+
},
34+
35+
{ /* between PCI hole and 4GB */
36+
.baseaddr = 0xe0000000UL, /* 3.5GB */
37+
.length = 0x20000000UL, /* 512MB */
38+
.type = E820_TYPE_RESERVED
39+
},
40+
};
41+
942
/**
1043
* @pre vm != NULL
1144
*/
1245
void create_prelaunched_vm_e820(struct acrn_vm *vm)
1346
{
14-
vm->e820_entry_num = 0U;
15-
vm->e820_entries = NULL;
47+
vm->e820_entry_num = VE820_ENTRIES_APL_NUC;
48+
vm->e820_entries = (struct e820_entry *)ve820_entry;
1649
}

0 commit comments

Comments
 (0)