intel/skylake: implement vboot_platform_is_resuming()
To allow skylake platforms to run with verified memory init code the chipset needs to implement vboot_platform_is_resuming() so that the vboot code can make proper decisions. BUG=chrome-os-partner:46049 BRANCH=glados TEST=Suspended and resumed on chell. Also, tested with an EC build which returns a bad hash to ensure that is properly caught. Change-Id: I508a339c07dcc9e7c56a0df4201660827b3ae07a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: a3e11789339bcd8fc8fc99b704c6a1110acf5302 Original-Change-Id: I40264019eb28e85795258112c720056a6a3fc523 Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/323503 Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://review.coreboot.org/13578 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
49b2383ddb
commit
a1faa4cfc7
|
@ -1,5 +1,6 @@
|
||||||
verstage-y += cpu.c
|
verstage-y += cpu.c
|
||||||
verstage-y += pch.c
|
verstage-y += pch.c
|
||||||
|
verstage-y += power_state.c
|
||||||
verstage-y += report_platform.c
|
verstage-y += report_platform.c
|
||||||
verstage-y += romstage.c
|
verstage-y += romstage.c
|
||||||
verstage-y += smbus.c
|
verstage-y += smbus.c
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include <soc/pci_devs.h>
|
#include <soc/pci_devs.h>
|
||||||
#include <soc/pm.h>
|
#include <soc/pm.h>
|
||||||
#include <soc/romstage.h>
|
#include <soc/romstage.h>
|
||||||
|
#include <vendorcode/google/chromeos/vboot_common.h>
|
||||||
|
|
||||||
static struct chipset_power_state power_state CAR_GLOBAL;
|
static struct chipset_power_state power_state CAR_GLOBAL;
|
||||||
|
|
||||||
|
@ -151,3 +152,9 @@ struct chipset_power_state *fill_power_state(void)
|
||||||
|
|
||||||
return ps;
|
return ps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int vboot_platform_is_resuming(void)
|
||||||
|
{
|
||||||
|
int typ = (inl(ACPI_BASE_ADDRESS + PM1_CNT) & SLP_TYP) >> SLP_TYP_SHIFT;
|
||||||
|
return typ == SLP_TYP_S3;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue