ACRN/HV: Refine the function of init_vboot to initialize the depriv_boot env correctly

Currently when get_rsdp is called, the EFI depriv_boot env is not initialized.
In such case it will fallback to the legacy mechanism of ACPI table.
If the ACPI table based on legacy mechanism is not found, it will fail to get
the ACPI table and then the system will hang.
On the old platform it still can parse the ACPI table from legacy mechanism.
In fact when EFI RSDP exists, the EFI RSDP is preferred instead of legacy ACPI
RSDP.

In order to avoid multiple calling of depriv_init_boot, the init_boot_operations
is renamed and called after X2apic is enabled(early_init_lapic).

Tracked-On: #3184
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Zhao Yakui
2019-05-28 09:13:40 +08:00
committed by wenlingz
parent 1c36508e83
commit cee2f8b288
5 changed files with 9 additions and 14 deletions

View File

@@ -119,8 +119,6 @@ void init_pcpu_pre(uint16_t pcpu_id_args)
*/
init_pcpu_capabilities();
init_vboot_operations();
init_pcpu_model_name();
load_pcpu_state_data();
@@ -135,6 +133,8 @@ void init_pcpu_pre(uint16_t pcpu_id_args)
early_init_lapic();
init_vboot();
if (!init_percpu_lapic_id()) {
panic("failed to init_percpu_lapic_id!");
}

View File

@@ -64,9 +64,6 @@ static void enter_guest_mode(uint16_t pcpu_id)
static void init_primary_pcpu_post(void)
{
/* Perform any necessary guest vboot initialization */
init_vboot();
init_debug_pre();
init_pcpu_post(BOOT_CPU_ID);