[coreboot-gerrit] Change in coreboot[master]: amd/stoneyridge: Implement vboot_platform_is_resuming

Marshall Dawson (Code Review) gerrit at coreboot.org
Fri Nov 10 01:31:26 CET 2017


Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/22414


Change subject: amd/stoneyridge: Implement vboot_platform_is_resuming
......................................................................

amd/stoneyridge: Implement vboot_platform_is_resuming

Change-Id: I23882ad8cd93fbc25acd8a07eca6a78b6bafc191
Signed-off-by: Marshall Dawson <marshalldawson3rd at gmail.com>
---
M src/soc/amd/stoneyridge/Makefile.inc
M src/soc/amd/stoneyridge/pmutil.c
2 files changed, 12 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/22414/1

diff --git a/src/soc/amd/stoneyridge/Makefile.inc b/src/soc/amd/stoneyridge/Makefile.inc
index a4cdcf5..f2a9d8d 100644
--- a/src/soc/amd/stoneyridge/Makefile.inc
+++ b/src/soc/amd/stoneyridge/Makefile.inc
@@ -58,6 +58,7 @@
 romstage-$(CONFIG_STONEYRIDGE_UART) += uart.c
 romstage-y += tsc_freq.c
 
+verstage-y += sb_util.c
 verstage-y += pmutil.c
 verstage-y += reset.c
 verstage-$(CONFIG_STONEYRIDGE_UART) += uart.c
diff --git a/src/soc/amd/stoneyridge/pmutil.c b/src/soc/amd/stoneyridge/pmutil.c
index 89d3640..25c9ec1 100644
--- a/src/soc/amd/stoneyridge/pmutil.c
+++ b/src/soc/amd/stoneyridge/pmutil.c
@@ -13,6 +13,9 @@
  * 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>
 
 int vbnv_cmos_failed(void)
@@ -20,3 +23,11 @@
 	/* FIXME: RTC failure checking not supported. */
 	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;
+}

-- 
To view, visit https://review.coreboot.org/22414
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I23882ad8cd93fbc25acd8a07eca6a78b6bafc191
Gerrit-Change-Number: 22414
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171110/f933057a/attachment-0001.html>


More information about the coreboot-gerrit mailing list