diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-06-18 12:24:06 +0300 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2020-11-18 13:36:37 +0000 |
commit | 561b5cfe422917dae709f6406ab78e97b2b1a2f1 (patch) | |
tree | 03b505338617b005fe78d227c9d716610f3c9b28 /src/arch/x86/acpi_s3.c | |
parent | 9004f1d99d4d88ee2170cc8087053458f19d6c1d (diff) |
ACPI S3: Do some minor cleanup
Drop extra function in the middle and adjust the post_code()
to happen right before jump to wakeup vector.
Change-Id: I951c3292f5dbf52a58471da9de94b0c4f4ca7c20
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42613
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/x86/acpi_s3.c')
-rw-r--r-- | src/arch/x86/acpi_s3.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/arch/x86/acpi_s3.c b/src/arch/x86/acpi_s3.c index 2802bd32ab..e805ca3582 100644 --- a/src/arch/x86/acpi_s3.c +++ b/src/arch/x86/acpi_s3.c @@ -55,18 +55,6 @@ asmlinkage void (*acpi_do_wakeup)(uintptr_t vector) = (void *)WAKEUP_BASE; extern unsigned char __wakeup; extern unsigned int __wakeup_size; -static void acpi_jump_to_wakeup(void *vector) -{ - /* Copy wakeup trampoline in place. */ - memcpy((void *)WAKEUP_BASE, &__wakeup, __wakeup_size); - - set_boot_successful(); - - timestamp_add_now(TS_ACPI_WAKE_JUMP); - - acpi_do_wakeup((uintptr_t)vector); -} - void __weak mainboard_suspend_resume(void) { } @@ -79,8 +67,15 @@ void __noreturn acpi_resume(void *wake_vec) /* Call mainboard resume handler first, if defined. */ mainboard_suspend_resume(); + /* Copy wakeup trampoline in place. */ + memcpy((void *)WAKEUP_BASE, &__wakeup, __wakeup_size); + + set_boot_successful(); + + timestamp_add_now(TS_ACPI_WAKE_JUMP); + post_code(POST_OS_RESUME); - acpi_jump_to_wakeup(wake_vec); + acpi_do_wakeup((uintptr_t)wake_vec); die("Failed the jump to wakeup vector\n"); } |