From: Simon Glass Date: Fri, 26 Apr 2019 03:58:56 +0000 (-0600) Subject: x86: Add common Intel code for SPL X-Git-Tag: v2019.07-rc2~14^2~24 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=17903c06e8d4d960b6d3ae1444905e45fe99a551;p=oweals%2Fu-boot.git x86: Add common Intel code for SPL Add an implementation of arch_cpu_init_f() so that the x86 SPL code builds and identifies the CPU. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- diff --git a/arch/x86/cpu/intel_common/Makefile b/arch/x86/cpu/intel_common/Makefile index 80fbc7ab66..57cca0b930 100644 --- a/arch/x86/cpu/intel_common/Makefile +++ b/arch/x86/cpu/intel_common/Makefile @@ -14,3 +14,9 @@ ifndef CONFIG_TARGET_EFI_APP obj-y += microcode.o endif obj-y += pch.o + +ifdef CONFIG_SPL +ifndef CONFIG_SPL_BUILD +obj-y += cpu_from_spl.o +endif +endif diff --git a/arch/x86/cpu/intel_common/cpu_from_spl.c b/arch/x86/cpu/intel_common/cpu_from_spl.c new file mode 100644 index 0000000000..a6233c75ce --- /dev/null +++ b/arch/x86/cpu/intel_common/cpu_from_spl.c @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2016 Google, Inc + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +int arch_cpu_init(void) +{ + int ret; + + ret = x86_cpu_reinit_f(); + + return ret; +}