summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/common/pmbase.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/intel/common/pmbase.c')
-rw-r--r--src/southbridge/intel/common/pmbase.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/southbridge/intel/common/pmbase.c b/src/southbridge/intel/common/pmbase.c
index 360b63d9e4..2de57d6da4 100644
--- a/src/southbridge/intel/common/pmbase.c
+++ b/src/southbridge/intel/common/pmbase.c
@@ -14,13 +14,16 @@
*/
#include <stdint.h>
+#include <arch/acpi.h>
#include <arch/io.h>
#include <device/device.h>
#include <device/pci.h>
#include <arch/early_variables.h>
#include <assert.h>
+#include <security/vboot/vboot_common.h>
#include "pmbase.h"
+#include "pmutil.h"
/* LPC PM Base Address Register */
#define PMBASE 0x40
@@ -91,3 +94,13 @@ u8 read_pmbase8(const u8 addr)
return inb(lpc_get_pmbase() + addr);
}
+
+int vboot_platform_is_resuming(void)
+{
+ u16 reg16 = read_pmbase16(PM1_STS);
+
+ if (!(reg16 & WAK_STS))
+ return 0;
+
+ return acpi_sleep_from_pm1(reg16) == ACPI_S3;
+}