mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
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:
@@ -43,13 +43,11 @@ static void init_depri_boot(void)
|
||||
|
||||
const struct depri_boot_context *get_depri_boot_ctx(void)
|
||||
{
|
||||
init_depri_boot();
|
||||
return &depri_boot_ctx;
|
||||
}
|
||||
|
||||
const struct lapic_regs *get_depri_boot_lapic_regs(void)
|
||||
{
|
||||
init_depri_boot();
|
||||
return &depri_boot_lapic_regs;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ static enum vboot_mode sos_boot_mode;
|
||||
* @pre: this function is called during detect mode which is very early stage,
|
||||
* other exported interfaces should not be called beforehand.
|
||||
*/
|
||||
void init_vboot_operations(void)
|
||||
void init_vboot(void)
|
||||
{
|
||||
|
||||
struct multiboot_info *mbi;
|
||||
@@ -61,15 +61,16 @@ void init_vboot_operations(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* @pre: vboot_ops->init != NULL */
|
||||
void init_vboot(void)
|
||||
{
|
||||
/*
|
||||
* vboot_ops is mandatory and it will be initialized correctly.
|
||||
* The vboot_ops->init is called to assure that the boot env is
|
||||
* initialized before calling other vboot_ops interface.
|
||||
*/
|
||||
vboot_ops->init();
|
||||
#ifdef CONFIG_ACPI_PARSE_ENABLED
|
||||
acpi_fixup();
|
||||
#endif
|
||||
vboot_ops->init();
|
||||
}
|
||||
|
||||
/* @pre: vboot_ops != NULL */
|
||||
|
||||
@@ -20,7 +20,6 @@ struct vboot_operations {
|
||||
void (*init_irq)(void);
|
||||
};
|
||||
|
||||
void init_vboot_operations(void);
|
||||
void init_vboot(void);
|
||||
void init_vboot_irq(void);
|
||||
uint64_t get_ap_trampoline_buf(void);
|
||||
|
||||
Reference in New Issue
Block a user