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:
Li, Fei1
2018-10-29 23:28:32 +08:00
committed by lijinxia
parent 74a5eec3a7
commit dc9d18a868
12 changed files with 163 additions and 39 deletions

View File

@@ -33,7 +33,7 @@ static inline uint64_t elf64_r_type(uint64_t i)
uint64_t trampoline_start16_paddr;
/* get the delta between CONFIG_RAM_START and the actual load address */
/* get the delta between CONFIG_HV_RAM_START and the actual load address */
uint64_t get_hv_image_delta(void)
{
uint64_t addr;
@@ -52,7 +52,7 @@ uint64_t get_hv_image_delta(void)
/* get the actual Hypervisor load address */
uint64_t get_hv_image_base(void)
{
return (get_hv_image_delta() + CONFIG_RAM_START);
return (get_hv_image_delta() + CONFIG_HV_RAM_START);
}
/*
@@ -63,7 +63,7 @@ uint64_t get_hv_image_base(void)
* This function is valid if:
* - The hpa of HV code is always higher than trampoline code
* - The HV code is always relocated to higher address, compared
* with CONFIG_RAM_START
* with CONFIG_HV_RAM_START
*/
static uint64_t trampoline_relo_addr(const void *addr)
{