summaryrefslogtreecommitdiff
path: root/src/southbridge/amd
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-01-08 17:09:09 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-01-10 14:48:57 +0000
commit78113d48970115d3c4a3bd789fe07c4c6e0b5282 (patch)
tree00bfdb02376a62e3a59d5be147c0bbfb58755960 /src/southbridge/amd
parent74beb5de844e054dc1a08169e6cccaf53e04c5db (diff)
sb/amd/pi/hudson: select HAVE_CONFIGURABLE_APMC_SMI_PORT
Select HAVE_CONFIGURABLE_APMC_SMI_PORT and implement the pm_acpi_smi_cmd_port helper function. TEST=APU2 still compiles with HAVE_SMI_HANDLER selected and NO_SMM select removed. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I8f79d8c1d59aa1b6c1145dd0b1cbc9010a1c57e7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/79849 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src/southbridge/amd')
-rw-r--r--src/southbridge/amd/pi/hudson/Kconfig1
-rw-r--r--src/southbridge/amd/pi/hudson/smi_util.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/southbridge/amd/pi/hudson/Kconfig b/src/southbridge/amd/pi/hudson/Kconfig
index 0b90b9a9df..04d77fd89c 100644
--- a/src/southbridge/amd/pi/hudson/Kconfig
+++ b/src/southbridge/amd/pi/hudson/Kconfig
@@ -13,6 +13,7 @@ config SOUTHBRIDGE_SPECIFIC_OPTIONS
select ACPI_COMMON_MADT_IOAPIC
select ACPI_COMMON_MADT_LAPIC
select ACPI_CUSTOM_MADT
+ select HAVE_CONFIGURABLE_APMC_SMI_PORT
select HAVE_USBDEBUG_OPTIONS
select HAVE_CF9_RESET
select HAVE_CF9_RESET_PREPARE
diff --git a/src/southbridge/amd/pi/hudson/smi_util.c b/src/southbridge/amd/pi/hudson/smi_util.c
index 3dc2d8a31e..70b35850d6 100644
--- a/src/southbridge/amd/pi/hudson/smi_util.c
+++ b/src/southbridge/amd/pi/hudson/smi_util.c
@@ -6,7 +6,9 @@
#include <amdblocks/acpimmio.h>
#include <console/console.h>
+#include <cpu/x86/smm.h>
+#include "hudson.h"
#include "smi.h"
#define HUDSON_SMI_ACPI_COMMAND 75
@@ -77,3 +79,8 @@ void hudson_enable_acpi_cmd_smi(void)
{
configure_smi(HUDSON_SMI_ACPI_COMMAND, SMI_MODE_SMI);
}
+
+uint16_t pm_acpi_smi_cmd_port(void)
+{
+ return pm_read16(PM_ACPI_SMI_CMD);
+}