From cb28f3f8ed13cdd9ae17441dacf6409eaf390105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Fri, 3 Jan 2014 15:15:22 +0200 Subject: CBMEM ACPI: Move resume handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Handler is ACPI/x86 specific so move details out of cbmem code. With static CBMEM initialisation, ramstage will need to test for S3 wakeup condition so publish also acpi_is_wakeup(). Change-Id: If591535448cdd24a54262b534c1a828fc13da759 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/4619 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Aaron Durbin --- src/arch/x86/boot/acpi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/arch/x86/boot/acpi.c') diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c index 96cb270814..0e09ec58c6 100644 --- a/src/arch/x86/boot/acpi.c +++ b/src/arch/x86/boot/acpi.c @@ -645,12 +645,18 @@ 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 int acpi_is_wakeup(void) +int acpi_is_wakeup(void) { /* Both resume from S2 and resume from S3 restart at CPU reset */ return (acpi_slp_type == 3 || acpi_slp_type == 2); } +void acpi_fail_wakeup(void) +{ + if (acpi_slp_type == 3 || acpi_slp_type == 2) + acpi_slp_type = 0; +} + static acpi_rsdp_t *valid_rsdp(acpi_rsdp_t *rsdp) { if (strncmp((char *)rsdp, RSDP_SIG, sizeof(RSDP_SIG) - 1) != 0) -- cgit v1.2.3