hv: mmu: add hpa2hva_early API for earlt boot

When need hpa and hva translation before init_paging, we need hpa2hva_early and
hva2hpa_early since init_paging may modify hva2hpa to not be identical mapping.

Tracked-On: #2987
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Li, Fei1
2019-07-24 18:03:44 +08:00
committed by ACRN System Integration
parent 40475e22b8
commit 11cf9a4a8a
5 changed files with 33 additions and 5 deletions

View File

@@ -109,7 +109,6 @@ void init_pcpu_pre(bool is_bsp)
(void)parse_hv_cmdline();
/*
* WARNNING: here assume that vaddr2paddr is identical mapping.
* Enable UART as early as possible.
* Then we could use printf for debugging on early boot stage.
*/
@@ -132,6 +131,12 @@ void init_pcpu_pre(bool is_bsp)
init_e820();
init_paging();
/*
* Need update uart_base_address here for vaddr2paddr mapping may changed
* WARNNING: DO NOT CALL PRINTF BETWEEN ENABLE PAGING IN init_paging AND HERE!
*/
uart16550_init(false);
early_init_lapic();
init_vboot();