summaryrefslogtreecommitdiff
path: root/src/arch/x86/boot/acpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/boot/acpi.c')
-rw-r--r--src/arch/x86/boot/acpi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index 012c10127f..d76882a216 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -645,14 +645,26 @@ void acpi_resume(void *wake_vec)
/* This is to be filled by SB code - startup value what was found. */
u8 acpi_slp_type = 0;
+static void acpi_handoff_wakeup(void)
+{
+ static int once = 0;
+ if (once)
+ return;
+ if (acpi_get_sleep_type)
+ acpi_slp_type = acpi_get_sleep_type();
+ once = 1;
+}
+
int acpi_is_wakeup(void)
{
+ acpi_handoff_wakeup();
/* Both resume from S2 and resume from S3 restart at CPU reset */
return (acpi_slp_type == 3 || acpi_slp_type == 2);
}
int acpi_is_wakeup_s3(void)
{
+ acpi_handoff_wakeup();
return (acpi_slp_type == 3);
}