diff options
author | Angel Pons <th3fanbus@gmail.com> | 2023-05-04 12:44:10 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-05-05 13:21:43 +0000 |
commit | 3321bb3eb3cf81e75e8b59f28d1bb92a3bece19a (patch) | |
tree | a8ad9c584a69992eb274feb3104aad82cfb930a0 | |
parent | 27900ea9f85f81a55246f1c27d662f92121c0563 (diff) |
{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 <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74959
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/soc/amd/common/acpi/sleepstates.asl | 10 | ||||
-rw-r--r-- | src/southbridge/amd/common/acpi/sleepstates.asl | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/soc/amd/common/acpi/sleepstates.asl b/src/soc/amd/common/acpi/sleepstates.asl index 03d28bb4f8..887f6df4d0 100644 --- a/src/soc/amd/common/acpi/sleepstates.asl +++ b/src/soc/amd/common/acpi/sleepstates.asl @@ -5,10 +5,20 @@ Name(SSFG, 0x09) If (CONFIG(HAVE_ACPI_RESUME)) { SSFG = 0x0D } + +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 */ 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 */ |