mb/google/brya: Create telith variant
[coreboot.git] / src / arch / x86 / acpi_s3.c
blobf893e3a9f6b50259cda94af1ea8f88f81f472121
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <string.h>
5 #include <acpi/acpi.h>
6 #include <arch/cpu.h>
7 #include <commonlib/helpers.h>
8 #include <fallback.h>
9 #include <timestamp.h>
11 #define WAKEUP_BASE 0x600
13 asmlinkage void (*acpi_do_wakeup)(uintptr_t vector) = (void *)WAKEUP_BASE;
15 extern unsigned char __wakeup;
16 extern unsigned int __wakeup_size;
18 void __noreturn acpi_resume(void *wake_vec)
20 /* Call mainboard resume handler first, if defined. */
21 mainboard_suspend_resume();
23 /* Copy wakeup trampoline in place. */
24 memcpy((void *)WAKEUP_BASE, &__wakeup, __wakeup_size);
26 set_boot_successful();
28 timestamp_add_now(TS_ACPI_WAKE_JUMP);
30 post_code(POSTCODE_OS_RESUME);
31 acpi_do_wakeup((uintptr_t)wake_vec);
33 die("Failed the jump to wakeup vector\n");