soc/intel/common/acpi: Add dynamic method around sleep
Declare plaform level hook method before and after system sleep for
possible power management related usage.
BUG=N/A
TEST=pass with make what-jenkins-does
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Change-Id: Ie63711748b6dbb99d34910824f2059464543e162
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32366
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/intel/common/acpi/platform.asl b/src/soc/intel/common/acpi/platform.asl
index bdc0d5c..8b85d44 100644
--- a/src/soc/intel/common/acpi/platform.asl
+++ b/src/soc/intel/common/acpi/platform.asl
@@ -17,6 +17,9 @@
#include <include/console/post_codes.h>
+External(\_SB.MPTS, MethodObj)
+External(\_SB.MWAK, MethodObj)
+
/* Port 80 POST */
OperationRegion (POST, SystemIO, CONFIG_POST_IO_PORT, 1)
@@ -38,6 +41,10 @@
/* Call EC _PTS handler */
\_SB.PCI0.LPCB.EC0.PTS (Arg0)
#endif
+ If (CondRefOf (\_SB.MPTS))
+ {
+ \_SB.MPTS (Arg0)
+ }
}
/* The _WAK method is called on system wakeup */
@@ -46,6 +53,11 @@
{
Store (POST_OS_ENTER_WAKE, DBG0)
+ If (CondRefOf (\_SB.MWAK))
+ {
+ \_SB.MWAK (Arg0)
+ }
+
#if CONFIG(SOC_INTEL_COMMON_ACPI_EC_PTS_WAK)
/* Call EC _WAK handler */
\_SB.PCI0.LPCB.EC0.WAK (Arg0)