From 3321bb3eb3cf81e75e8b59f28d1bb92a3bece19a Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Thu, 4 May 2023 12:44:10 +0200 Subject: {sb,soc}/amd/cmn/acpi/sleepstates.asl: Hook up configs Commit cbc5d3f34b87db779829eabc90c32780a3865a56 ("soc/intel: Don't report _S1 state when unsupported") added the `ACPI_S1_NOT_SUPPORTED` option and commit 0eb5974def63a2fc0dce6dfdad62b0b4c6f4b865 ("acpigen: Add a runtime method to override exposed _Sx sleep states") added a mechanism to override the enabled sleep states at runtime. However, these were only hooked up to Intel sleepstates. so the options would not have any effect on AMD platforms. Apply the changes from these two commits to AMD sleepstates so that both options can be used on AMD platforms as well. Change-Id: I7d5ef2361e36659ac5c6f54b2c236d48713a07c9 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/74959 Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/southbridge/amd/common/acpi/sleepstates.asl | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/southbridge') diff --git a/src/southbridge/amd/common/acpi/sleepstates.asl b/src/southbridge/amd/common/acpi/sleepstates.asl index 97646a704a..e56dfb01e5 100644 --- a/src/southbridge/amd/common/acpi/sleepstates.asl +++ b/src/southbridge/amd/common/acpi/sleepstates.asl @@ -6,10 +6,20 @@ Name (SSFG, 0x0D) #else Name (SSFG, 0x09) #endif + +If (CONFIG(ACPI_S1_NOT_SUPPORTED)) { + SSFG &= 0xfe +} + If (CONFIG(DISABLE_ACPI_HIBERNATE)) { SSFG &= 0xf7 } +External (\OSFG, IntObj) +If (CondRefOf(\OSFG)) { + SSFG = \OSFG +} + /* Supported sleep states: */ Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */ -- cgit v1.2.3