From 61ab3fe6ef0ac93d8ef1235bfe4090c9623fae9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Wed, 17 Jun 2020 14:17:41 +0300 Subject: [PATCH] lib/hardwaremain: Drop HAVE_ACPI_RESUME guards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Header was moved outside arch/. Change-Id: I1f2f0d96d49b5d921f77512ad5e2bf3f60adb484 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/42457 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Angel Pons --- src/lib/hardwaremain.c | 23 ++++++++++------------- 1 file 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 +#include #include #include #include @@ -19,9 +20,6 @@ #include #include #include -#if CONFIG(HAVE_ACPI_RESUME) -#include -#endif #include #include #include @@ -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. */