soc/intel/common/block/smm: Add option to have SOC specific SMI Handler at finalize()
This patch ensures common code provides an option to register a SOC specific SMI handler before booting to OS (specifically during ramstage). Change-Id: I50fb154cc1ad4b3459bc352d2065f2c582711c20 Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/23810 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Tung Lun Loo <tung.lun.loo@intel.com>
This commit is contained in:
parent
736a03fd24
commit
f9eaede518
|
@ -148,6 +148,9 @@ struct global_nvs_t *smm_get_gnvs(void);
|
|||
|
||||
/* SoC overrides. */
|
||||
|
||||
/* Specific SOC SMI handler during ramstage finalize phase */
|
||||
void smihandler_soc_at_finalize(void);
|
||||
|
||||
/*
|
||||
* This function returns a 1 or 0 depending on whether disable_busmaster
|
||||
* needs to be done for the specified device on S5 entry
|
||||
|
|
|
@ -38,6 +38,12 @@ static struct global_nvs_t *gnvs;
|
|||
|
||||
/* SoC overrides. */
|
||||
|
||||
/* Specific SOC SMI handler during ramstage finalize phase */
|
||||
__attribute__((weak)) void smihandler_soc_at_finalize(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
__attribute__((weak)) int smihandler_soc_disable_busmaster(device_t dev)
|
||||
{
|
||||
return 1;
|
||||
|
@ -278,6 +284,9 @@ static void finalize(void)
|
|||
if (IS_ENABLED(CONFIG_SPI_FLASH_SMM))
|
||||
/* Re-init SPI driver to handle locked BAR */
|
||||
fast_spi_init();
|
||||
|
||||
/* Specific SOC SMI handler during ramstage finalize phase */
|
||||
smihandler_soc_at_finalize();
|
||||
}
|
||||
|
||||
void smihandler_southbridge_apmc(
|
||||
|
|
Loading…
Reference in New Issue