HV: Add acpi_fixup api to override acpi on needs
Add acpi_fixup() api in bsp that can override platform ACPI info when do init_bsp(), this is useful when platform bootloader is not lock down before production. In current code only the wake vector addresses would be parsed after boot and then override to host_acpi_info, we can add more in furture based on our needs. Tracked-On: #1264 Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
0d5ad8a522
commit
2197f4306a
|
@ -364,4 +364,19 @@ static void *get_facs_table(void)
|
||||||
return facs_addr;
|
return facs_addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* put all ACPI fix up code here */
|
||||||
|
void acpi_fixup(void)
|
||||||
|
{
|
||||||
|
uint8_t *facs_addr;
|
||||||
|
|
||||||
|
facs_addr = get_facs_table();
|
||||||
|
|
||||||
|
if (facs_addr != NULL) {
|
||||||
|
host_acpi_info.pm_s_state.wake_vector_32 =
|
||||||
|
(uint32_t *)(facs_addr + OFFSET_WAKE_VECTOR_32);
|
||||||
|
host_acpi_info.pm_s_state.wake_vector_64 =
|
||||||
|
(uint64_t *)(facs_addr + OFFSET_WAKE_VECTOR_64);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -36,4 +36,8 @@ extern struct acpi_info host_acpi_info;
|
||||||
/* BSP Interfaces */
|
/* BSP Interfaces */
|
||||||
void init_bsp(void);
|
void init_bsp(void);
|
||||||
|
|
||||||
|
#ifndef CONFIG_CONSTANT_ACPI
|
||||||
|
void acpi_fixup(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* BSP_EXTERN_H */
|
#endif /* BSP_EXTERN_H */
|
||||||
|
|
|
@ -62,4 +62,7 @@ struct dmar_info *get_dmar_info(void)
|
||||||
|
|
||||||
void init_bsp(void)
|
void init_bsp(void)
|
||||||
{
|
{
|
||||||
|
#ifndef CONFIG_CONSTANT_ACPI
|
||||||
|
acpi_fixup();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,6 +115,9 @@ static void efi_init(void)
|
||||||
|
|
||||||
void init_bsp(void)
|
void init_bsp(void)
|
||||||
{
|
{
|
||||||
|
#ifndef CONFIG_CONSTANT_ACPI
|
||||||
|
acpi_fixup();
|
||||||
|
#endif
|
||||||
parse_hv_cmdline();
|
parse_hv_cmdline();
|
||||||
|
|
||||||
#ifdef CONFIG_EFI_STUB
|
#ifdef CONFIG_EFI_STUB
|
||||||
|
|
Loading…
Reference in New Issue