Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Martin Roth | ebace9f | 2018-05-26 18:56:17 -0600 | [diff] [blame] | 2 | |
| 3 | /* |
| 4 | * Utilities for SMM setup |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 5 | */ |
| 6 | |
Michał Żygowski | f3db2ae | 2019-11-24 13:26:10 +0100 | [diff] [blame] | 7 | #include <amdblocks/acpimmio.h> |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 8 | #include <console/console.h> |
Kyösti Mälkki | c4fdb7b | 2019-08-10 15:51:59 +0300 | [diff] [blame] | 9 | #include <cpu/x86/smm.h> |
| 10 | |
| 11 | #include "smi.h" |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 12 | |
| 13 | void smm_setup_structures(void *gnvs, void *tcg, void *smi1) |
| 14 | { |
Elyes HAOUAS | bfc255a | 2020-03-07 13:05:14 +0100 | [diff] [blame] | 15 | printk(BIOS_DEBUG, "%s STUB!!!\n", __func__); |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 16 | } |
| 17 | |
| 18 | /** Set the EOS bit and enable SMI generation from southbridge */ |
Kyösti Mälkki | b264c5c | 2020-06-10 11:13:24 +0300 | [diff] [blame^] | 19 | void global_smi_enable(void) |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 20 | { |
| 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 | } |