Felix Held submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved
cpu/x86/smi_trigger: call pm_acpi_smi_cmd_port to get APMC SMI IO port

Instead of hard-coding the APMC SMI command IO port in the FADT, call
pm_acpi_smi_cmd_port() to get the APMC SMI command IO port. Also update
the comment in apm_get_apmc to match what it's doing.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0f36b8a0e93a82b8c6d23c5c5d8fbebb1bc6b0bc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79567
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
---
M src/cpu/x86/smi_trigger.c
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/cpu/x86/smi_trigger.c b/src/cpu/x86/smi_trigger.c
index 470ecde..9781642 100644
--- a/src/cpu/x86/smi_trigger.c
+++ b/src/cpu/x86/smi_trigger.c
@@ -38,7 +38,7 @@
apmc_log(__func__, cmd);

/* Now raise the SMI. */
- outb(cmd, APM_CNT);
+ outb(cmd, pm_acpi_smi_cmd_port());

printk(BIOS_DEBUG, "APMC done.\n");
return 0;
@@ -46,8 +46,8 @@

u8 apm_get_apmc(void)
{
- /* Emulate B2 register as the FADT / Linux expects it */
- u8 cmd = inb(APM_CNT);
+ /* Read command byte from APMC SMI IO port */
+ u8 cmd = inb(pm_acpi_smi_cmd_port());

apmc_log("SMI#", cmd);
return cmd;

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

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I0f36b8a0e93a82b8c6d23c5c5d8fbebb1bc6b0bc
Gerrit-Change-Number: 79567
Gerrit-PatchSet: 6
Gerrit-Owner: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Jérémy Compostella <jeremy.compostella@intel.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph@9elements.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged