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>
This commit is contained in:
Furquan Shaikh 2017-10-14 19:25:30 -07:00 committed by Furquan Shaikh
parent 3efeeb2c8f
commit c565bd44d1
2 changed files with 9 additions and 0 deletions

View File

@ -72,6 +72,7 @@ ramstage-y += uart.c
ramstage-$(CONFIG_UART_DEBUG) += uart_debug.c
ramstage-y += vr_config.c
smm-y += elog.c
smm-y += gpio.c
smm-y += pch.c
smm-y += pmutil.c

View File

@ -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);
}