blob: 6c7682511bfc51a0fce5a8949c6badbb5bcbbd36 [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>
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -05008#include <console/console.h>
Kyösti Mälkkic4fdb7b2019-08-10 15:51:59 +03009#include <cpu/x86/smm.h>
10
11#include "smi.h"
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -050012
13void smm_setup_structures(void *gnvs, void *tcg, void *smi1)
14{
Elyes HAOUASbfc255a2020-03-07 13:05:14 +010015 printk(BIOS_DEBUG, "%s STUB!!!\n", __func__);
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -050016}
17
18/** Set the EOS bit and enable SMI generation from southbridge */
Kyösti Mälkkib264c5c2020-06-10 11:13:24 +030019void global_smi_enable(void)
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -050020{
21 uint32_t reg = smi_read32(SMI_REG_SMITRIG0);
22 reg &= ~SMITRG0_SMIENB; /* Enable SMI generation */
23 reg |= SMITRG0_EOS; /* Set EOS bit */
24 smi_write32(SMI_REG_SMITRIG0, reg);
25}