blob: f8196b4e658909567762e0c0a1909a97fa84cc45 [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
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -050021#include <console/console.h>
Kyösti Mälkkic4fdb7b2019-08-10 15:51:59 +030022#include <cpu/x86/smm.h>
23
24#include "smi.h"
Alexandru Gagniuc2dbd08f2014-04-10 14:35:59 -050025
26void smm_setup_structures(void *gnvs, void *tcg, void *smi1)
27{
28 printk(BIOS_DEBUG, "smm_setup_structures STUB!!!\n");
29}
30
31/** Set the EOS bit and enable SMI generation from southbridge */
32void hudson_enable_smi_generation(void)
33{
34 uint32_t reg = smi_read32(SMI_REG_SMITRIG0);
35 reg &= ~SMITRG0_SMIENB; /* Enable SMI generation */
36 reg |= SMITRG0_EOS; /* Set EOS bit */
37 smi_write32(SMI_REG_SMITRIG0, reg);
38}