summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/Kconfig7
-rw-r--r--src/arch/x86/Makefile.inc5
-rw-r--r--src/arch/x86/apmc_smi_port.c9
3 files changed, 21 insertions, 0 deletions
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index e149f0864e..0c11653675 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -316,6 +316,13 @@ config HAVE_CF9_RESET_PREPARE
bool
depends on HAVE_CF9_RESET
+config HAVE_CONFIGURABLE_APMC_SMI_PORT
+ bool
+ help
+ SoCs that have a configurable APMC SMI command port, should select
+ this option and implement pm_acpi_smi_cmd_port() that returns the IO
+ port.
+
config PIRQ_ROUTE
bool
default n
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 62294a65ce..04a0e58dbf 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -336,3 +336,8 @@ smm-$(CONFIG_X86_TOP4G_BOOTMEDIA_MAP) += mmap_boot.c
smm-$(CONFIG_DEBUG_NULL_DEREF_BREAKPOINTS_IN_ALL_STAGES) += null_breakpoint.c
smm-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/smihandler.c)
+
+ifneq ($(CONFIG_HAVE_CONFIGURABLE_APMC_SMI_PORT),y)
+ramstage-y += apmc_smi_port.c
+smm-y += apmc_smi_port.c
+endif
diff --git a/src/arch/x86/apmc_smi_port.c b/src/arch/x86/apmc_smi_port.c
new file mode 100644
index 0000000000..ac8f3364c5
--- /dev/null
+++ b/src/arch/x86/apmc_smi_port.c
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <cpu/x86/smm.h>
+
+/* default implementation of the !HAVE_CONFIGURABLE_APMC_SMI_PORT case */
+uint16_t pm_acpi_smi_cmd_port(void)
+{
+ return APM_CNT;
+}