mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
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>
This commit is contained in:
parent
ece3a46070
commit
0e72ac7150
3 changed files with 10 additions and 0 deletions
|
@ -31,6 +31,7 @@ _start:
|
|||
|
||||
call board_init_f_init_reserve
|
||||
|
||||
call x86_cpu_reinit_f
|
||||
xorl %eax, %eax
|
||||
call board_init_f
|
||||
call board_init_f_r
|
||||
|
|
|
@ -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__);
|
||||
|
|
|
@ -24,6 +24,11 @@ static int x86_tpl_init(void)
|
|||
int ret;
|
||||
|
||||
debug("%s starting\n", __func__);
|
||||
ret = x86_cpu_init_tpl();
|
||||
if (ret) {
|
||||
debug("%s: x86_cpu_init_tpl() failed\n", __func__);
|
||||
return ret;
|
||||
}
|
||||
ret = spl_init();
|
||||
if (ret) {
|
||||
debug("%s: spl_init() failed\n", __func__);
|
||||
|
|
Loading…
Add table
Reference in a new issue