blob: 7958da6bb6f662bddedeb1e4200e153e46a9f408 [file] [log] [blame]
Angel Pons32abdd62020-04-05 15:47:03 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Aamir Bohra3ee54bb2018-10-17 11:55:01 +05302
Aamir Bohra3ee54bb2018-10-17 11:55:01 +05303#include <device/pci_def.h>
Subrata Banik00b75332020-02-20 12:09:45 +05304#include <intelblocks/cse.h>
Aamir Bohra3ee54bb2018-10-17 11:55:01 +05305#include <intelblocks/smihandler.h>
Subrata Banik00b75332020-02-20 12:09:45 +05306#include <soc/soc_chip.h>
Aamir Bohra3ee54bb2018-10-17 11:55:01 +05307#include <soc/pci_devs.h>
Aamir Bohra3ee54bb2018-10-17 11:55:01 +05308#include <soc/pm.h>
Elyes HAOUASc3385072019-03-21 15:38:06 +01009
Aamir Bohra3ee54bb2018-10-17 11:55:01 +053010/*
11 * Specific SOC SMI handler during ramstage finalize phase
12 *
13 * BIOS can't make CSME function disable as is due to POSTBOOT_SAI
14 * restriction in place from ICP chipset. Hence create SMI Handler to
15 * perform CSME function disabling logic during SMM mode.
16 */
17void smihandler_soc_at_finalize(void)
18{
Subrata Banikcef67702022-01-03 19:19:41 +000019 if (CONFIG(DISABLE_HECI1_AT_PRE_BOOT))
Subrata Banik32e06732022-01-28 02:05:15 +053020 heci1_disable();
Aamir Bohra3ee54bb2018-10-17 11:55:01 +053021}
22
Aamir Bohra3ee54bb2018-10-17 11:55:01 +053023const smi_handler_t southbridge_smi[SMI_STS_BITS] = {
24 [SMI_ON_SLP_EN_STS_BIT] = smihandler_southbridge_sleep,
25 [APM_STS_BIT] = smihandler_southbridge_apmc,
26 [PM1_STS_BIT] = smihandler_southbridge_pm1,
27 [GPE0_STS_BIT] = smihandler_southbridge_gpe0,
28 [GPIO_STS_BIT] = smihandler_southbridge_gpi,
29 [ESPI_SMI_STS_BIT] = smihandler_southbridge_espi,
30 [MCSMI_STS_BIT] = smihandler_southbridge_mc,
Patrick Georgia7ec4262020-03-11 16:31:59 +010031#if CONFIG(SOC_INTEL_COMMON_BLOCK_SMM_TCO_ENABLE)
Aamir Bohra3ee54bb2018-10-17 11:55:01 +053032 [TCO_STS_BIT] = smihandler_southbridge_tco,
Patrick Georgia7ec4262020-03-11 16:31:59 +010033#endif
Aamir Bohra3ee54bb2018-10-17 11:55:01 +053034 [PERIODIC_STS_BIT] = smihandler_southbridge_periodic,
35 [MONITOR_STS_BIT] = smihandler_southbridge_monitor,
36};