blob: 560b66679b5ae9affd74f9572f22423236bd7074 [file] [log] [blame]
Patrick Georgiac959032020-05-05 22:49:26 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Martin Rothebace9f2018-05-26 18:56:17 -06002
3/*
4 * Utilities for SMM setup
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -05005 */
6
Michał Żygowskif3db2ae2019-11-24 13:26:10 +01007#include <amdblocks/acpimmio.h>
Kyösti Mälkkic4fdb7b2019-08-10 15:51:59 +03008#include <cpu/x86/smm.h>
9
10#include "smi.h"
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -050011
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -050012/** Set the EOS bit and enable SMI generation from southbridge */
Kyösti Mälkkib264c5c2020-06-10 11:13:24 +030013void global_smi_enable(void)
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -050014{
15 uint32_t reg = smi_read32(SMI_REG_SMITRIG0);
16 reg &= ~SMITRG0_SMIENB; /* Enable SMI generation */
17 reg |= SMITRG0_EOS; /* Set EOS bit */
18 smi_write32(SMI_REG_SMITRIG0, reg);
19}