From 66e62da4c7830598c52cd0291bc8d10f4d0ff9c4 Mon Sep 17 00:00:00 2001 From: Marshall Dawson Date: Wed, 27 Sep 2017 13:32:38 -0600 Subject: amd/stoneyridge: Check SMI command address before reading Use the currently programmed address of the SMI command port before checking the passed command. This ensures we're reading the right port in case the port was relocated without our knowledge. Change-Id: I8a3ca285d3a9afd4a107cd471c202abf03f372ac Signed-off-by: Marshall Dawson Reviewed-on: https://review.coreboot.org/21744 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/soc/amd/stoneyridge/smihandler.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/soc/amd/stoneyridge/smihandler.c') diff --git a/src/soc/amd/stoneyridge/smihandler.c b/src/soc/amd/stoneyridge/smihandler.c index 45dada5227..c3c85e364d 100644 --- a/src/soc/amd/stoneyridge/smihandler.c +++ b/src/soc/amd/stoneyridge/smihandler.c @@ -5,7 +5,6 @@ * Subject to the GNU GPL v2, or (at your option) any later version. */ - #include #include #include @@ -27,7 +26,7 @@ enum smi_source { static void sb_apmc_smi_handler(void) { u32 reg32; - const uint8_t cmd = inb(APM_CNT); + const uint8_t cmd = inb(pm_acpi_smi_cmd_port()); switch (cmd) { case APM_CNT_ACPI_ENABLE: -- cgit v1.2.3