Felix Held submitted this change.

View Change

Approvals: Matt DeVillier: Looks good to me, approved build bot (Jenkins): Verified
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>
---
M src/southbridge/amd/pi/hudson/Kconfig
M src/southbridge/amd/pi/hudson/smi_util.c
2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/southbridge/amd/pi/hudson/Kconfig b/src/southbridge/amd/pi/hudson/Kconfig
index 0b90b9a..04d77fd 100644
--- a/src/southbridge/amd/pi/hudson/Kconfig
+++ b/src/southbridge/amd/pi/hudson/Kconfig
@@ -13,6 +13,7 @@
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 3dc2d8a..70b3585 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 @@
{
configure_smi(HUDSON_SMI_ACPI_COMMAND, SMI_MODE_SMI);
}
+
+uint16_t pm_acpi_smi_cmd_port(void)
+{
+ return pm_read16(PM_ACPI_SMI_CMD);
+}

To view, visit change 79849. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I8f79d8c1d59aa1b6c1145dd0b1cbc9010a1c57e7
Gerrit-Change-Number: 79849
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged