diff --git a/hypervisor/boot/sbl/multiboot.c b/hypervisor/boot/sbl/multiboot.c index 0e8aa14eb..0c281da84 100644 --- a/hypervisor/boot/sbl/multiboot.c +++ b/hypervisor/boot/sbl/multiboot.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/hypervisor/common/vm_load.c b/hypervisor/common/vm_load.c index b35caa9ce..117cbcc44 100644 --- a/hypervisor/common/vm_load.c +++ b/hypervisor/common/vm_load.c @@ -5,9 +5,9 @@ */ #include +#include #include #include -#include static void prepare_bsp_gdt(struct acrn_vm *vm) { diff --git a/hypervisor/include/arch/x86/e820.h b/hypervisor/include/arch/x86/e820.h index f9c7e77dd..311d8f034 100644 --- a/hypervisor/include/arch/x86/e820.h +++ b/hypervisor/include/arch/x86/e820.h @@ -7,6 +7,24 @@ #ifndef E820_H #define E820_H +/* E820 memory types */ +#define E820_TYPE_RAM 1U /* EFI 1, 2, 3, 4, 5, 6, 7 */ +#define E820_TYPE_RESERVED 2U +/* EFI 0, 11, 12, 13 (everything not used elsewhere) */ +#define E820_TYPE_ACPI_RECLAIM 3U /* EFI 9 */ +#define E820_TYPE_ACPI_NVS 4U /* EFI 10 */ +#define E820_TYPE_UNUSABLE 5U /* EFI 8 */ + +/** Defines a single entry in an E820 memory map. */ +struct e820_entry { + /** The base address of the memory range. */ + uint64_t baseaddr; + /** The length of the memory range. */ + uint64_t length; + /** The type of memory region. */ + uint32_t type; +} __packed; + struct e820_mem_params { uint64_t mem_bottom; uint64_t mem_top; diff --git a/hypervisor/include/arch/x86/mmu.h b/hypervisor/include/arch/x86/mmu.h index 4f596016a..ae915cda4 100644 --- a/hypervisor/include/arch/x86/mmu.h +++ b/hypervisor/include/arch/x86/mmu.h @@ -169,24 +169,6 @@ void invept(const struct acrn_vcpu *vcpu); const uint64_t *lookup_address(uint64_t *pml4_page, uint64_t addr, uint64_t *pg_size, const struct memory_ops *mem_ops); -/** Defines a single entry in an E820 memory map. */ -struct e820_entry { - /** The base address of the memory range. */ - uint64_t baseaddr; - /** The length of the memory range. */ - uint64_t length; - /** The type of memory region. */ - uint32_t type; -} __packed; - -/* E820 memory types */ -#define E820_TYPE_RAM 1U /* EFI 1, 2, 3, 4, 5, 6, 7 */ -#define E820_TYPE_RESERVED 2U -/* EFI 0, 11, 12, 13 (everything not used elsewhere) */ -#define E820_TYPE_ACPI_RECLAIM 3U /* EFI 9 */ -#define E820_TYPE_ACPI_NVS 4U /* EFI 10 */ -#define E820_TYPE_UNUSABLE 5U /* EFI 8 */ - static inline void cache_flush_invalidate_all(void) { asm volatile (" wbinvd\n" : : : "memory");