hv: mmu: add 16GB RAM support for uefi platform

And fix a bug when the start address of the e820 not align to 2MB.

Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Li, Fei1
2018-11-03 01:29:54 +08:00
committed by wenlingz
parent c36f4d2789
commit eefb06b303
2 changed files with 12 additions and 9 deletions

View File

@@ -253,8 +253,8 @@ void init_paging(void)
}
/* Map all memory regions to UC attribute */
mmu_add((uint64_t *)ppt_mmu_pml4_addr, e820_mem.mem_bottom, e820_mem.mem_bottom,
high64_max_ram - e820_mem.mem_bottom, attr_uc, &ppt_mem_ops);
mmu_add((uint64_t *)ppt_mmu_pml4_addr, 0UL, 0UL,
high64_max_ram - 0UL, attr_uc, &ppt_mem_ops);
/* Modify WB attribute for E820_TYPE_RAM */
for (i = 0U; i < e820_entries; i++) {