mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-09-22 23:52:03 +00:00
x86: coreboot: Rearrange arch_cpu_init()
Init errors in SPL are currently ignored by this function. Change the code to init the CPU, reporting an error if something is wrong. After that, look for the coreboot table. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
04ecda0e1d
commit
2c6b979ec1
1 changed files with 9 additions and 3 deletions
|
@ -21,7 +21,14 @@
|
|||
|
||||
int arch_cpu_init(void)
|
||||
{
|
||||
int ret = get_coreboot_info(&lib_sysinfo);
|
||||
int ret;
|
||||
|
||||
ret = IS_ENABLED(CONFIG_X86_RUN_64BIT) ? x86_cpu_reinit_f() :
|
||||
x86_cpu_init_f();
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = get_coreboot_info(&lib_sysinfo);
|
||||
if (ret != 0) {
|
||||
printf("Failed to parse coreboot tables.\n");
|
||||
return ret;
|
||||
|
@ -29,8 +36,7 @@ int arch_cpu_init(void)
|
|||
|
||||
timestamp_init();
|
||||
|
||||
return IS_ENABLED(CONFIG_X86_RUN_64BIT) ? x86_cpu_reinit_f() :
|
||||
x86_cpu_init_f();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int checkcpu(void)
|
||||
|
|
Loading…
Reference in a new issue