mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-12-17 18:32:40 +00:00
When hypervisor boot from efi environment, the efi memory layout should be considered as main memory map reference for hypervisor use. This patch add function that parses the efi memory descriptor entries info from efi memory map pointer and stores the info into a static hv_memdesc[] array. Tracked-On: #5626 Signed-off-by: Victor Sun <victor.sun@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
31 lines
637 B
C
31 lines
637 B
C
/*
|
|
* Copyright (C) 2020 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef EFI_H
|
|
#define EFI_H
|
|
|
|
struct efi_memory_desc {
|
|
uint32_t type;
|
|
uint32_t pad;
|
|
uint64_t phys_addr;
|
|
uint64_t virt_addr;
|
|
uint64_t num_pages;
|
|
uint64_t attribute;
|
|
};
|
|
|
|
struct efi_info {
|
|
uint32_t efi_loader_signature; /* 0x1c0 */
|
|
uint32_t efi_systab; /* 0x1c4 */
|
|
uint32_t efi_memdesc_size; /* 0x1c8 */
|
|
uint32_t efi_memdesc_version; /* 0x1cc */
|
|
uint32_t efi_memmap; /* 0x1d0 */
|
|
uint32_t efi_memmap_size; /* 0x1d4 */
|
|
uint32_t efi_systab_hi; /* 0x1d8 */
|
|
uint32_t efi_memmap_hi; /* 0x1dc */
|
|
} __packed;
|
|
|
|
#endif
|