Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/52930 )
Change subject: sb/intel/common: Fix platform_is_resuming() ......................................................................
sb/intel/common: Fix platform_is_resuming()
platform_is_resuming() was using the wrong register (PM1_STS) to figure out if the platform was resuming (PM1_CNT).
Change-Id: I1f69dca1da158aae15c6da6d4c898c71d9cdb51f Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/52930 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Rudolph siro@das-labor.org --- M src/southbridge/intel/common/pmbase.c 1 file changed, 5 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved
diff --git a/src/southbridge/intel/common/pmbase.c b/src/southbridge/intel/common/pmbase.c index bbd2c25..d5578fc 100644 --- a/src/southbridge/intel/common/pmbase.c +++ b/src/southbridge/intel/common/pmbase.c @@ -80,6 +80,10 @@ return acpi_sleep_from_pm1(read_pmbase32(PM1_CNT)); }
+/* + * Note that southbridge_detect_s3_resume clears the sleep state, + * so this may not be used reliable throughout romstage. + */ int platform_is_resuming(void) { u16 reg16 = read_pmbase16(PM1_STS); @@ -87,5 +91,5 @@ if (!(reg16 & WAK_STS)) return 0;
- return acpi_sleep_from_pm1(reg16) == ACPI_S3; + return acpi_get_sleep_type() == ACPI_S3; }