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 | |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 21 | #include <console/console.h> |
Kyösti Mälkki | c4fdb7b | 2019-08-10 15:51:59 +0300 | [diff] [blame^] | 22 | #include <cpu/x86/smm.h> |
| 23 | |
| 24 | #include "smi.h" |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 25 | |
| 26 | void 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 */ |
| 32 | void 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 | } |