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

@@ -78,13 +78,13 @@ typedef void(*hv_func)(int, struct multiboot_info*);
#define MBOOT_INFO_SIZE (sizeof(struct multiboot_info))
#define BOOT_CTX_SIZE (sizeof(struct efi_context))
#define HV_RUNTIME_MEM_SIZE \
(CONFIG_RAM_SIZE + MBOOT_MMAP_SIZE + MBOOT_INFO_SIZE + BOOT_CTX_SIZE)
(CONFIG_HV_RAM_SIZE + MBOOT_MMAP_SIZE + MBOOT_INFO_SIZE + BOOT_CTX_SIZE)
#define MBOOT_MMAP_PTR(addr) \
((struct multiboot_mmap *)((VOID *)addr + CONFIG_RAM_SIZE))
((struct multiboot_mmap *)((VOID *)addr + CONFIG_HV_RAM_SIZE))
#define MBOOT_INFO_PTR(addr) ((struct multiboot_info *) \
((VOID *)addr + CONFIG_RAM_SIZE + MBOOT_MMAP_SIZE))
((VOID *)addr + CONFIG_HV_RAM_SIZE + MBOOT_MMAP_SIZE))
#define BOOT_CTX_PTR(addr) ((struct efi_context *) \
((VOID *)addr + CONFIG_RAM_SIZE + MBOOT_MMAP_SIZE + MBOOT_INFO_SIZE))
((VOID *)addr + CONFIG_HV_RAM_SIZE + MBOOT_MMAP_SIZE + MBOOT_INFO_SIZE))
struct efi_info {