aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/cpu/Makefile
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-04-25 21:58:52 -0600
committerBin Meng <bmeng.cn@gmail.com>2019-05-08 13:02:13 +0800
commit051c31b7a49933f25bcf2ffe8c7764642fcff0d4 (patch)
tree06a8696d480ed074a7a46718c7a65b73f1206d82 /arch/x86/cpu/Makefile
parent9231206b73a3eee6e68e4dd708abdb4e625eac71 (diff)
downloadu-boot-051c31b7a49933f25bcf2ffe8c7764642fcff0d4.zip
u-boot-051c31b7a49933f25bcf2ffe8c7764642fcff0d4.tar.gz
u-boot-051c31b7a49933f25bcf2ffe8c7764642fcff0d4.tar.bz2
x86: Add support for starting from SPL/TPL
When a previous phase of U-Boot has run we need to adjust the init of subsequent states to avoid messing up the CPU state. Add a new version of the start logic for SPL, when it boots from TPL (start_from tpl.c) and a new version for U-Boot when it boots from SPL. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/Makefile')
-rw-r--r--arch/x86/cpu/Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile
index 54668aa..85fd5e6 100644
--- a/arch/x86/cpu/Makefile
+++ b/arch/x86/cpu/Makefile
@@ -9,9 +9,22 @@
ifeq ($(CONFIG_$(SPL_)X86_64),y)
extra-y = start64.o
else
+ifeq ($(CONFIG_$(SPL_TPL_)X86_16BIT_INIT),y)
extra-y = start.o
+else
+ifndef CONFIG_SPL
+extra-y = start.o
+else
+ifdef CONFIG_SPL_BUILD
+extra-y = start_from_tpl.o
+else
+extra-y = start_from_spl.o
endif
-extra-$(CONFIG_$(SPL_)X86_16BIT_INIT) += resetvec.o start16.o
+endif
+endif
+endif
+
+extra-$(CONFIG_$(SPL_TPL_)X86_16BIT_INIT) += resetvec.o start16.o
obj-y += cpu.o cpu_x86.o