summaryrefslogtreecommitdiffstats
path: root/src/soc/intel/skylake/elog.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2017-10-14 19:25:30 -0700
committerFurquan Shaikh <furquan@google.com>2017-10-19 00:43:30 +0000
commitc565bd44d1318c6bb2cc3d88d8446e4a20059753 (patch)
treedc5c8f05f1d50378b9b0f8f23886eb994c6c256b /src/soc/intel/skylake/elog.c
parent3efeeb2c8f64ce741c49745bf237528744c0b2f5 (diff)
downloadcoreboot-c565bd44d1318c6bb2cc3d88d8446e4a20059753.tar.gz
coreboot-c565bd44d1318c6bb2cc3d88d8446e4a20059753.tar.bz2
coreboot-c565bd44d1318c6bb2cc3d88d8446e4a20059753.zip
soc/intel/skylake: Support logging wake source in SMM
This change adds support for logging wake source information in gsmi callbacks. With this change, all the elog logging infrastructure can be used for S0ix as well as S3 on skylake. BUG=b:67874513 Change-Id: Ie1f81e956fe0bbe2e5e4c706f27997b7bd30d5e0 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/22086 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/skylake/elog.c')
-rw-r--r--src/soc/intel/skylake/elog.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/intel/skylake/elog.c b/src/soc/intel/skylake/elog.c
index c015a7849a31..82404578569e 100644
--- a/src/soc/intel/skylake/elog.c
+++ b/src/soc/intel/skylake/elog.c
@@ -20,6 +20,7 @@
#include <device/pci_ops.h>
#include <stdint.h>
#include <elog.h>
+#include <intelblocks/pmclib.h>
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <soc/smbus.h>
@@ -382,3 +383,10 @@ static void pch_log_state(void *unused)
}
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, pch_log_state, NULL);
+
+void elog_gsmi_cb_platform_log_wake_source(void)
+{
+ struct chipset_power_state ps;
+ pmc_fill_pm_reg_info(&ps);
+ pch_log_wake_source(&ps);
+}