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 SMI handlers and SMM setup |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _SOUTHBRIDGE_AMD_AGESA_HUDSON_SMI_H |
| 8 | #define _SOUTHBRIDGE_AMD_AGESA_HUDSON_SMI_H |
| 9 | |
Kyösti Mälkki | 13f6650 | 2019-03-03 08:01:05 +0200 | [diff] [blame] | 10 | #include <device/mmio.h> |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 11 | |
| 12 | /* ACPI_MMIO_BASE + 0x200 -- leave this string here so grep catches it. |
| 13 | * This is defined by AGESA, but we dpn't include AGESA headers to avoid |
| 14 | * polluting the namesace. |
| 15 | */ |
| 16 | #define SMI_BASE 0xfed80200 |
| 17 | |
| 18 | #define SMI_REG_SMITRIG0 0x98 |
| 19 | #define SMITRG0_EOS (1 << 28) |
| 20 | #define SMITRG0_SMIENB (1 << 31) |
| 21 | |
| 22 | #define SMI_REG_CONTROL0 0xa0 |
| 23 | |
Alexandru Gagniuc | 599d668 | 2014-04-17 23:33:50 -0500 | [diff] [blame] | 24 | enum smi_mode { |
| 25 | SMI_MODE_DISABLE = 0, |
| 26 | SMI_MODE_SMI = 1, |
| 27 | SMI_MODE_NMI = 2, |
| 28 | SMI_MODE_IRQ13 = 3, |
| 29 | }; |
| 30 | |
| 31 | enum smi_lvl { |
| 32 | SMI_LVL_LOW = 0, |
| 33 | SMI_LVL_HIGH = 1, |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 34 | }; |
| 35 | |
Alexandru Gagniuc | 599d668 | 2014-04-17 23:33:50 -0500 | [diff] [blame] | 36 | void hudson_configure_gevent_smi(uint8_t gevent, uint8_t mode, uint8_t level); |
| 37 | void hudson_disable_gevent_smi(uint8_t gevent); |
| 38 | void hudson_enable_acpi_cmd_smi(void); |
| 39 | |
Alexandru Gagniuc | 2dbd08f | 2014-04-10 14:35:59 -0500 | [diff] [blame] | 40 | #endif /* _SOUTHBRIDGE_AMD_AGESA_HUDSON_SMI_H */ |