From a4c0e1a51fc724680cb54a1f17813a67ab3b4250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Thu, 18 Jun 2020 08:28:12 +0300 Subject: ACPI S3: Clean up resume path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the obscure path in source code, where ACPI S3 resume was prohibited and acpi_resume() would return and continue to BS_WRITE_TABLES. The condition when ACPI S3 would be prohibited needs to be checked early in romstage already. For the time being, there has been little interest to have CMOS option to disable ACPI S3 resume feature. Change-Id: If5105912759427f94f84d46d1a3141aa75cbd6ef Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/42498 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Angel Pons --- src/arch/x86/acpi_s3.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/arch') diff --git a/src/arch/x86/acpi_s3.c b/src/arch/x86/acpi_s3.c index 4872c07228..2802bd32ab 100644 --- a/src/arch/x86/acpi_s3.c +++ b/src/arch/x86/acpi_s3.c @@ -57,11 +57,6 @@ extern unsigned int __wakeup_size; static void acpi_jump_to_wakeup(void *vector) { - if (!acpi_s3_resume_allowed()) { - printk(BIOS_WARNING, "ACPI: S3 resume not allowed.\n"); - return; - } - /* Copy wakeup trampoline in place. */ memcpy((void *)WAKEUP_BASE, &__wakeup, __wakeup_size); @@ -76,7 +71,7 @@ void __weak mainboard_suspend_resume(void) { } -void acpi_resume(void *wake_vec) +void __noreturn acpi_resume(void *wake_vec) { /* Restore GNVS pointer in SMM if found. */ apm_control(APM_CNT_GNVS_UPDATE); @@ -86,4 +81,6 @@ void acpi_resume(void *wake_vec) post_code(POST_OS_RESUME); acpi_jump_to_wakeup(wake_vec); + + die("Failed the jump to wakeup vector\n"); } -- cgit v1.2.3