Attention is currently required from: Jason Glenesk, Raul Rangel, Marshall Dawson, Felix Held. Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56363 )
Change subject: soc/amd/cezanne: Add support for Modern Standby event logging ......................................................................
soc/amd/cezanne: Add support for Modern Standby event logging
Log the GPE and PM1 wake events into the event log using the SMI handler platform callback.
BUG=b:186792595, b:186800045 TEST=Build and boot to OS in Guybrush. Ensure that the wake sources are logged into the event logs. 5 | 2021-07-15 16:26:43 | S0ix Enter 6 | 2021-07-15 16:26:49 | S0ix Exit 7 | 2021-07-15 16:26:49 | Wake Source | GPE # | 22 <- Trackpad 8 | 2021-07-15 16:27:07 | S0ix Enter 9 | 2021-07-15 16:27:13 | S0ix Exit 10 | 2021-07-15 16:27:13 | Wake Source | RTC Alarm | 0 25 | 2021-07-15 16:38:13 | S0ix Enter 26 | 2021-07-15 16:38:17 | S0ix Exit 27 | 2021-07-15 16:38:17 | Wake Source | GPE # | 5 <- Fingerprint
Change-Id: Icec6fc03f4871cc46b32886575a7054bc289f4bf Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/soc/amd/cezanne/Makefile.inc A src/soc/amd/cezanne/elog.c 2 files changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/56363/1
diff --git a/src/soc/amd/cezanne/Makefile.inc b/src/soc/amd/cezanne/Makefile.inc index 478eecc..feb8c9d 100644 --- a/src/soc/amd/cezanne/Makefile.inc +++ b/src/soc/amd/cezanne/Makefile.inc @@ -50,6 +50,7 @@ smm-y += gpio.c smm-y += smihandler.c smm-y += smu.c +smm-y += elog.c smm-$(CONFIG_DEBUG_SMI) += uart.c
CPPFLAGS_common += -I$(src)/soc/amd/cezanne/include diff --git a/src/soc/amd/cezanne/elog.c b/src/soc/amd/cezanne/elog.c new file mode 100644 index 0000000..0e945e1 --- /dev/null +++ b/src/soc/amd/cezanne/elog.c @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <amdblocks/acpi.h> +#include <amdblocks/elog.h> +#include <amdblocks/pmlib.h> +#include <elog.h> + +void elog_gsmi_cb_platform_log_wake_source(void) +{ + struct chipset_power_state ps; + + pm_fill_chipset_state(&ps); + elog_pm1_status(&ps.gpe_state); + elog_gpe_events(&ps.gpe_state); +}