mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-07 17:46:15 +00:00
hv: mmu: add static paging table allocation for hypervisor
Add static paging table allocation API for hypervisor. Note: must configure PLATFORM_RAM_SIZE and PLATFORM_MMIO_SIZE exactly as the platform. Rename RAM_START/RAM_SIZE to HV_RAM_START/HV_RAM_SIZE for HV. Tracked-On: #861 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -356,7 +356,7 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *_table)
|
||||
}
|
||||
|
||||
/* without relocateion enabled, hypervisor binary need to reside in
|
||||
* fixed memory address starting from CONFIG_RAM_START, make a call
|
||||
* fixed memory address starting from CONFIG_HV_RAM_START, make a call
|
||||
* to emalloc_fixed_addr for that case. With CONFIG_RELOC enabled,
|
||||
* hypervisor is able to do relocation, the only requirement is that
|
||||
* it need to reside in memory below 4GB, call emalloc_reserved_mem()
|
||||
@@ -365,7 +365,7 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *_table)
|
||||
#ifdef CONFIG_RELOC
|
||||
err = emalloc_reserved_mem(&hv_hpa, HV_RUNTIME_MEM_SIZE, MEM_ADDR_4GB);
|
||||
#else
|
||||
err = emalloc_fixed_addr(&hv_hpa, HV_RUNTIME_MEM_SIZE, CONFIG_RAM_START);
|
||||
err = emalloc_fixed_addr(&hv_hpa, HV_RUNTIME_MEM_SIZE, CONFIG_HV_RAM_START);
|
||||
#endif
|
||||
if (err != EFI_SUCCESS)
|
||||
goto failed;
|
||||
|
||||
Reference in New Issue
Block a user