summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/cpu.c
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2017-04-21 14:24:37 (GMT)
committerBin Meng <bmeng.cn@gmail.com>2017-05-17 09:11:46 (GMT)
commit3a34cae01160d207d50db267585b963cf0a0018d (patch)
treea6fcaae9a38548e2900bc8e98c0223ff16e20aa9 /arch/x86/cpu/cpu.c
parente76bf38f180b0c9325b17506f1518329d82cbed8 (diff)
downloadu-boot-fsl-qoriq-3a34cae01160d207d50db267585b963cf0a0018d.tar.xz
x86: acpi: Resume OS if resume vector is found
In an S3 resume path, U-Boot does everything like a cold boot except in the last_stage_init() it jumps to the OS resume vector. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/x86/cpu/cpu.c')
-rw-r--r--arch/x86/cpu/cpu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 7222ec8..f686ad4 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -26,6 +26,7 @@
#include <malloc.h>
#include <syscon.h>
#include <asm/acpi_s3.h>
+#include <asm/acpi_table.h>
#include <asm/control_regs.h>
#include <asm/coreboot_tables.h>
#include <asm/cpu.h>
@@ -204,6 +205,13 @@ __weak void board_final_cleanup(void)
int last_stage_init(void)
{
+#if CONFIG_HAVE_ACPI_RESUME
+ void *wake_vector = acpi_find_wakeup_vector();
+
+ if (wake_vector != NULL && gd->arch.prev_sleep_state == ACPI_S3)
+ acpi_resume(wake_vector);
+#endif
+
write_tables();
board_final_cleanup();