Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/58274 )
Change subject: soc/amd/common/acpi/upep: Add Low Power State Entry Notifications ......................................................................
soc/amd/common/acpi/upep: Add Low Power State Entry Notifications
Add support to handle S0ix entry and exit notifications by adding the corresponding _DSM functions. The function indices are chosen based on the s2idle kernel driver - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/driver.... Inside the notification functions perform any mainboard specific S0ix entry and exit actions.
BUG=b:195748540 TEST=Build and boot to OS in Guybrush. Ensure that the notification functions are invoked on S0ix entry and exit. Perform suspend/resume cycles for multiple iterations.
Change-Id: I3014551f6e281d466628559453a0141a3dd6abad Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/soc/amd/common/acpi/upep.asl 1 file changed, 20 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/58274/1
diff --git a/src/soc/amd/common/acpi/upep.asl b/src/soc/amd/common/acpi/upep.asl index ef06845..5443efd 100644 --- a/src/soc/amd/common/acpi/upep.asl +++ b/src/soc/amd/common/acpi/upep.asl @@ -4,10 +4,14 @@ #define PEPD_DSM_LPI_ENUM_FUNCTIONS 0 #define PEPD_DSM_LPI_ADDITIONAL_FUNCTIONS 1 #define PEPD_DSM_LPI_GET_DEVICE_CONSTRAINTS 1 +#define PEPD_DSM_LPI_S0IX_ENTRY 2 +#define PEPD_DSM_LPI_S0IX_EXIT 3
#define PEPD_DSM_NOTIFICATIONS_UUID "11e00d56-ce64-47ce-837b-1f898f9aa461" #define PEPD_DSM_NOTIFICATION_ENUM_FUNCTIONS 0
+External(_SB.MS0X, MethodObj) + /* * Power Engine Plug-in Device * @@ -64,12 +68,28 @@
SUPP = PEPD_DSM_LPI_ADDITIONAL_FUNCTIONS SUPP |= 1 << PEPD_DSM_LPI_GET_DEVICE_CONSTRAINTS + SUPP |= 1 << PEPD_DSM_LPI_S0IX_ENTRY + SUPP |= 1 << PEPD_DSM_LPI_S0IX_EXIT
Return (Local0) } Case (PEPD_DSM_LPI_GET_DEVICE_CONSTRAINTS) { Return (DEVL) } + Case (PEPD_DSM_LPI_S0IX_ENTRY) { + /* provide board level S0ix hook */ + If (CondRefOf (_SB.MS0X)) { + _SB.MS0X(1) + } + Return (Buffer() { 0x00 }) + } + Case (PEPD_DSM_LPI_S0IX_EXIT) { + /* provide board level S0ix hook */ + If (CondRefOf (_SB.MS0X)) { + _SB.MS0X(0) + } + Return (Buffer() { 0x00 }) + } Default { /* Unknown function */ Return (Buffer() { 0x00 })