aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/smm/smm.c
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2019-03-15 17:13:15 -0700
committerPatrick Georgi <pgeorgi@google.com>2019-03-18 09:14:25 +0000
commitaf39c82a36119158ffcee955cf83d880c9560e5f (patch)
tree0a461061e6abf51477a55b53a3c5152c499806ff /src/soc/intel/common/block/smm/smm.c
parentc563cf3030d3aaf588223c6db838540ef49f53c6 (diff)
soc/intel/common: Update ESPI disable option
Update the Kconfig option for disabling ESPI SMI source to disable it entirely, not just when ACPI mode is disabled. For the situations where this is needed (just the sarien board) it is better to completely stop the EC from sending any SMI events as no actions are taken. Change-Id: Id94481bb2f0cfc948f350be45d360bfe40ddf018 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31918 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/soc/intel/common/block/smm/smm.c')
-rw-r--r--src/soc/intel/common/block/smm/smm.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/soc/intel/common/block/smm/smm.c b/src/soc/intel/common/block/smm/smm.c
index dd8bab3483..75b933e0e9 100644
--- a/src/soc/intel/common/block/smm/smm.c
+++ b/src/soc/intel/common/block/smm/smm.c
@@ -41,6 +41,8 @@ void smm_southbridge_clear_state(void)
void smm_southbridge_enable(uint16_t pm1_events)
{
+ uint32_t smi_params = ENABLE_SMI_PARAMS;
+
printk(BIOS_DEBUG, "Enabling SMIs.\n");
/* Configure events */
pmc_enable_pm1(pm1_events);
@@ -60,14 +62,16 @@ void smm_southbridge_enable(uint16_t pm1_events)
* - on APMC writes (io 0xb2)
* - on writes to SLP_EN (sleep states)
* - on writes to GBL_RLS (bios commands)
- * - on eSPI events (does nothing on LPC systems)
+ * - on eSPI events, unless disabled (does nothing on LPC systems)
* No SMIs:
* - on microcontroller writes (io 0x62/0x66)
* - on TCO events
*/
+ if (CONFIG(SOC_INTEL_COMMON_BLOCK_SMM_ESPI_DISABLE))
+ smi_params &= ~ESPI_SMI_EN;
/* Enable SMI generation: */
- pmc_enable_smi(ENABLE_SMI_PARAMS);
+ pmc_enable_smi(smi_params);
}
void smm_setup_structures(void *gnvs, void *tcg, void *smi1)
@@ -94,11 +98,3 @@ void smm_region_info(void **start, size_t *size)
*start = (void *)sa_get_tseg_base();
*size = sa_get_tseg_size();
}
-
-#if CONFIG(SOC_INTEL_COMMON_BLOCK_SMM_ESPI_ACPI_DIS)
-static void smm_disable_espi(void *dest)
-{
- pmc_disable_smi(ESPI_SMI_EN);
-}
-BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY, smm_disable_espi, NULL);
-#endif