blob: 7f76cd59d0d1c076fbe8d47a18c43742167168f8 [file] [log] [blame]
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -05001/*
Martin Rothebace9f2018-05-26 18:56:17 -06002 * This file is part of the coreboot project.
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -05003 *
4 * Copyright (C) 2014 Alexandru Gagniuc <mr.nuke.me@gmail.com>
Martin Rothebace9f2018-05-26 18:56:17 -06005 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17/*
18 * Utilities for SMM setup
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -050019 */
20
Michał Żygowskif3db2ae2019-11-24 13:26:10 +010021#include <amdblocks/acpimmio.h>
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -050022#include <console/console.h>
Kyösti Mälkkic4fdb7b2019-08-10 15:51:59 +030023#include <cpu/x86/smm.h>
24
25#include "smi.h"
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -050026
27void smm_setup_structures(void *gnvs, void *tcg, void *smi1)
28{
29 printk(BIOS_DEBUG, "smm_setup_structures STUB!!!\n");
30}
31
32/** Set the EOS bit and enable SMI generation from southbridge */
33void hudson_enable_smi_generation(void)
34{
35 uint32_t reg = smi_read32(SMI_REG_SMITRIG0);
36 reg &= ~SMITRG0_SMIENB; /* Enable SMI generation */
37 reg |= SMITRG0_EOS; /* Set EOS bit */
38 smi_write32(SMI_REG_SMITRIG0, reg);
39}