summaryrefslogtreecommitdiff
path: root/src/arch/x86/boot
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2015-01-09 23:55:09 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-01-10 13:52:10 +0100
commit7a846e7acc64c191a217710234c90ae3634d09ea (patch)
treea5bd6c0d222f4fb60020521b631a1aeade94f53f /src/arch/x86/boot
parent054c83ac72f162b7686a4bfa0013658aef11e0f6 (diff)
downloadcoreboot-7a846e7acc64c191a217710234c90ae3634d09ea.tar.xz
ACPI: Prepare for HAVE_ACPI_RESUME changes
Change-Id: I71d522b135dff8b3c287699cc649caece9e4342c Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/8186 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/arch/x86/boot')
-rw-r--r--src/arch/x86/boot/acpi.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index 61f09546af..621df2f72f 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -854,8 +854,8 @@ void acpi_resume(void *wake_vec)
acpi_jump_to_wakeup(wake_vec);
}
-/* This is to be filled by SB code - startup value what was found. */
-u8 acpi_slp_type = 0;
+/* This is filled with acpi_is_wakeup() call early in ramstage. */
+int acpi_slp_type = -1;
int __attribute__((weak)) acpi_get_sleep_type(void)
{
@@ -864,12 +864,8 @@ int __attribute__((weak)) acpi_get_sleep_type(void)
static void acpi_handoff_wakeup(void)
{
- static int once = 0;
- if (once)
- return;
-
- acpi_slp_type = acpi_get_sleep_type();
- once = 1;
+ if (acpi_slp_type < 0)
+ acpi_slp_type = acpi_get_sleep_type();
}
int acpi_is_wakeup(void)