mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-01 17:06:51 +00:00
EFI: Allocate 2M aligned memory for hypervisor image
Hypervisor does memory alignment during initializing paging(init_paging) although the starting address allocated by EFI stub doesn't meet the requirement. As a result, HV might overwrite some memory belong to UEFI BIOS. The patch introduces a new routine to fix the issue. Tracked-On: #2349 Signed-off-by: Chaohong guo <chaohong.guo@intel.com> Reviewed-by: Zheng, Gen <gen.zheng@intel.com> Reviewed-by: Zide Chen <zide.chen@intel.com>
This commit is contained in:
@@ -52,6 +52,9 @@
|
||||
extern EFI_SYSTEM_TABLE *sys_table;
|
||||
extern EFI_BOOT_SERVICES *boot;
|
||||
|
||||
extern EFI_STATUS
|
||||
emalloc_reserved_aligned(EFI_PHYSICAL_ADDRESS *addr, UINTN size, UINTN align, EFI_PHYSICAL_ADDRESS maxaddr);
|
||||
|
||||
/**
|
||||
* allocate_pages - Allocate memory pages from the system
|
||||
* @atype: type of allocation to perform
|
||||
|
Reference in New Issue
Block a user