2020-04-05 15:47:21 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2019-11-01 14:00:01 +01:00
|
|
|
|
|
|
|
#include <device/pci_def.h>
|
2020-02-20 07:39:45 +01:00
|
|
|
#include <intelblocks/cse.h>
|
2019-11-01 14:00:01 +01:00
|
|
|
#include <intelblocks/smihandler.h>
|
2020-02-20 07:39:45 +01:00
|
|
|
#include <soc/soc_chip.h>
|
2019-11-01 14:00:01 +01:00
|
|
|
#include <soc/pci_devs.h>
|
|
|
|
#include <soc/pm.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Specific SOC SMI handler during ramstage finalize phase
|
|
|
|
*
|
|
|
|
* BIOS can't make CSME function disable as is due to POSTBOOT_SAI
|
|
|
|
* restriction in place from TGP chipset. Hence create SMI Handler to
|
|
|
|
* perform CSME function disabling logic during SMM mode.
|
|
|
|
*/
|
|
|
|
void smihandler_soc_at_finalize(void)
|
|
|
|
{
|
|
|
|
const struct soc_intel_tigerlake_config *config;
|
|
|
|
|
|
|
|
config = config_of_soc();
|
|
|
|
|
|
|
|
if (!config->HeciEnabled && CONFIG(HECI_DISABLE_USING_SMM))
|
2018-05-17 14:58:26 +02:00
|
|
|
heci_disable();
|
2019-11-01 14:00:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
const smi_handler_t southbridge_smi[SMI_STS_BITS] = {
|
|
|
|
[SMI_ON_SLP_EN_STS_BIT] = smihandler_southbridge_sleep,
|
|
|
|
[APM_STS_BIT] = smihandler_southbridge_apmc,
|
|
|
|
[PM1_STS_BIT] = smihandler_southbridge_pm1,
|
|
|
|
[GPE0_STS_BIT] = smihandler_southbridge_gpe0,
|
|
|
|
[GPIO_STS_BIT] = smihandler_southbridge_gpi,
|
|
|
|
[ESPI_SMI_STS_BIT] = smihandler_southbridge_espi,
|
|
|
|
[MCSMI_STS_BIT] = smihandler_southbridge_mc,
|
2020-03-11 16:31:59 +01:00
|
|
|
#if CONFIG(SOC_INTEL_COMMON_BLOCK_SMM_TCO_ENABLE)
|
2019-11-01 14:00:01 +01:00
|
|
|
[TCO_STS_BIT] = smihandler_southbridge_tco,
|
2020-03-11 16:31:59 +01:00
|
|
|
#endif
|
2019-11-01 14:00:01 +01:00
|
|
|
[PERIODIC_STS_BIT] = smihandler_southbridge_periodic,
|
|
|
|
[MONITOR_STS_BIT] = smihandler_southbridge_monitor,
|
|
|
|
};
|