diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-06-17 14:17:41 +0300 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2020-06-18 13:01:08 +0000 |
commit | 61ab3fe6ef0ac93d8ef1235bfe4090c9623fae9d (patch) | |
tree | 2459e8e228641406ca8948e3dcc47fe2d6de15ef /src/lib/hardwaremain.c | |
parent | 3635c39237a776cff284118867212a084309d2b4 (diff) |
lib/hardwaremain: Drop HAVE_ACPI_RESUME guards
Header was moved outside arch/.
Change-Id: I1f2f0d96d49b5d921f77512ad5e2bf3f60adb484
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42457
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/lib/hardwaremain.c')
-rw-r--r-- | src/lib/hardwaremain.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c index 59da967e66..4276027a9f 100644 --- a/src/lib/hardwaremain.c +++ b/src/lib/hardwaremain.c @@ -6,6 +6,7 @@ */ #include <adainit.h> +#include <acpi/acpi.h> #include <arch/exception.h> #include <bootstate.h> #include <console/console.h> @@ -19,9 +20,6 @@ #include <stdlib.h> #include <boot/tables.h> #include <program_loading.h> -#if CONFIG(HAVE_ACPI_RESUME) -#include <acpi/acpi.h> -#endif #include <timer.h> #include <timestamp.h> #include <thread.h> @@ -151,16 +149,16 @@ static boot_state_t bs_post_device(void *arg) static boot_state_t bs_os_resume_check(void *arg) { -#if CONFIG(HAVE_ACPI_RESUME) - void *wake_vector; + void *wake_vector = NULL; - wake_vector = acpi_find_wakeup_vector(); + if (CONFIG(HAVE_ACPI_RESUME)) + wake_vector = acpi_find_wakeup_vector(); if (wake_vector != NULL) { boot_states[BS_OS_RESUME].arg = wake_vector; return BS_OS_RESUME; } -#endif + timestamp_add_now(TS_CBMEM_POST); return BS_WRITE_TABLES; @@ -168,10 +166,11 @@ static boot_state_t bs_os_resume_check(void *arg) static boot_state_t bs_os_resume(void *wake_vector) { -#if CONFIG(HAVE_ACPI_RESUME) - arch_bootstate_coreboot_exit(); - acpi_resume(wake_vector); -#endif + if (CONFIG(HAVE_ACPI_RESUME)) { + arch_bootstate_coreboot_exit(); + acpi_resume(wake_vector); + } + return BS_WRITE_TABLES; } @@ -445,9 +444,7 @@ void main(void) post_code(POST_ENTRY_RAMSTAGE); /* Handoff sleep type from romstage. */ -#if CONFIG(HAVE_ACPI_RESUME) acpi_is_wakeup(); -#endif threads_initialize(); /* Schedule the static boot state entries. */ |