Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 1 | /* |
Martin Roth | ebace9f | 2018-05-26 18:56:17 -0600 | [diff] [blame] | 2 | * This file is part of the coreboot project. |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2014 Alexandru Gagniuc <mr.nuke.me@gmail.com> |
Martin Roth | ebace9f | 2018-05-26 18:56:17 -0600 | [diff] [blame] | 5 | * |
| 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 Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 19 | */ |
| 20 | |
Michał Żygowski | f3db2ae | 2019-11-24 13:26:10 +0100 | [diff] [blame^] | 21 | #include <amdblocks/acpimmio.h> |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 22 | #include <console/console.h> |
Kyösti Mälkki | c4fdb7b | 2019-08-10 15:51:59 +0300 | [diff] [blame] | 23 | #include <cpu/x86/smm.h> |
| 24 | |
| 25 | #include "smi.h" |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 26 | |
| 27 | void 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 */ |
| 33 | void 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 | } |