summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-04-26 09:12:59 -0600
committerBin Meng <bmeng.cn@gmail.com>2020-04-30 17:48:16 +0800
commitcfe7a1068b4b84768dca82e81118d8bac9c4b8d5 (patch)
tree6e174ec449923650ae7868bcb8a338d6f6a9d802 /arch/x86
parent33139a0bc7645f73f6e7dd152336e1ee00c9d40e (diff)
x86: Add a way to detect running from coreboot
If U-Boot is running from coreboot we need to skip low-level init. Add an way to detect this and to set the gd flag. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/cpu/i386/cpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c
index cc20456c89..0312a26bbb 100644
--- a/arch/x86/cpu/i386/cpu.c
+++ b/arch/x86/cpu/i386/cpu.c
@@ -476,6 +476,8 @@ int x86_cpu_reinit_f(void)
{
setup_identity();
setup_pci_ram_top();
+ if (locate_coreboot_table() >= 0)
+ gd->flags |= GD_FLG_SKIP_LL_INIT;
return 0;
}