diff options
author | Simon Glass <sjg@chromium.org> | 2019-10-20 21:37:55 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2019-11-03 07:20:28 +0800 |
commit | 0e72ac715007a85cf89683883bd84bdcfa185b0a (patch) | |
tree | efb1c2578a24c7764809cdb06881442875a0eec5 /arch/x86/lib/spl.c | |
parent | ece3a4607010226082f2e08afa37419e01ad853f (diff) | |
download | u-boot-0e72ac715007a85cf89683883bd84bdcfa185b0a.zip u-boot-0e72ac715007a85cf89683883bd84bdcfa185b0a.tar.gz u-boot-0e72ac715007a85cf89683883bd84bdcfa185b0a.tar.bz2 |
x86: Move CPU init to before spl_init()
At present we call spl_init() before identifying the CPU. This is not a
good idea - e.g. if bootstage is enabled then it will try to set up the
timer which works better if the CPU is identified.
Put explicit code at each entry pointer to identify the CPU.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/lib/spl.c')
-rw-r--r-- | arch/x86/lib/spl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index a8eaafe..1677f80 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -67,6 +67,10 @@ static int x86_spl_init(void) int ret; debug("%s starting\n", __func__); + if (IS_ENABLED(TPL)) + ret = x86_cpu_reinit_f(); + else + ret = x86_cpu_init_f(); ret = spl_init(); if (ret) { debug("%s: spl_init() failed\n", __func__); |