amd/stoneyridge: Implement vboot_platform_is_resuming

Change-Id: I23882ad8cd93fbc25acd8a07eca6a78b6bafc191
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22414
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Marshall Dawson 2017-11-07 12:37:12 -07:00 committed by Aaron Durbin
parent 0756880b80
commit bf131b2616
2 changed files with 12 additions and 0 deletions

View File

@ -58,6 +58,7 @@ romstage-y += ramtop.c
romstage-$(CONFIG_STONEYRIDGE_UART) += uart.c romstage-$(CONFIG_STONEYRIDGE_UART) += uart.c
romstage-y += tsc_freq.c romstage-y += tsc_freq.c
verstage-y += sb_util.c
verstage-y += pmutil.c verstage-y += pmutil.c
verstage-y += reset.c verstage-y += reset.c
verstage-$(CONFIG_STONEYRIDGE_UART) += uart.c verstage-$(CONFIG_STONEYRIDGE_UART) += uart.c

View File

@ -13,6 +13,9 @@
* GNU General Public License for more details. * GNU General Public License for more details.
*/ */
#include <arch/acpi.h>
#include <soc/southbridge.h>
#include <security/vboot/vboot_common.h>
#include <security/vboot/vbnv.h> #include <security/vboot/vbnv.h>
int vbnv_cmos_failed(void) int vbnv_cmos_failed(void)
@ -20,3 +23,11 @@ int vbnv_cmos_failed(void)
/* FIXME: RTC failure checking not supported. */ /* FIXME: RTC failure checking not supported. */
return 0; return 0;
} }
int vboot_platform_is_resuming(void)
{
if (!(inw(pm_acpi_pm_evt_blk()) & WAK_STS))
return 0;
return acpi_sleep_from_pm1(inw(pm_acpi_pm_cnt_blk())) == ACPI_S3;
}