blob: 1c04b95d730c16d29c1b00d0214532de98bb98e1 [file] [log] [blame]
Rocky Phagura17a798b2020-10-08 13:32:41 -07001/* SPDX-License-Identifier: GPL-2.0-only */
2
Marc Jones352ca5b2021-03-18 17:01:06 -06003#include <console/console.h>
Rocky Phagura17a798b2020-10-08 13:32:41 -07004#include <cpu/x86/smm.h>
Marc Jones352ca5b2021-03-18 17:01:06 -06005#include <device/pci.h>
6#include <intelblocks/smihandler.h>
7#include <soc/pci_devs.h>
8#include <soc/pm.h>
9
10/*
11 * Specific SOC SMI handler during ramstage finalize phase
12 */
13void smihandler_soc_at_finalize(void)
14{
15 /* SMM_FEATURE_CONTROL can only be written within SMM. */
16 printk(BIOS_DEBUG, "Lock SMM_FEATURE_CONTROL\n");
17 const pci_devfn_t dev = UBOX_DEV_PMON;
18 pci_or_config32(dev, SMM_FEATURE_CONTROL,
19 SMM_CODE_CHK_EN | SMM_FEATURE_CONTROL_LOCK);
20
21}
Rocky Phagura17a798b2020-10-08 13:32:41 -070022
23/* This is needed by common SMM code */
24const smi_handler_t southbridge_smi[SMI_STS_BITS] = {
25 [APM_STS_BIT] = smihandler_southbridge_apmc,
26 [PM1_STS_BIT] = smihandler_southbridge_pm1,
27#if CONFIG(SOC_INTEL_COMMON_BLOCK_SMM_TCO_ENABLE)
28 [TCO_STS_BIT] = smihandler_southbridge_tco,
29#endif
30};