提交 b4d4f592 编写于 作者: S Simon Glass 提交者: Bin Meng

x86: coreboot: Allow building an SPL image

Make a few adjustments to allow us to build an SPL image for coreboot.
Signed-off-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
Tested-by: NBin Meng <bmeng.cn@gmail.com>
上级 fc486371
......@@ -54,9 +54,11 @@ obj-$(CONFIG_INTEL_QUARK) += quark/
obj-$(CONFIG_INTEL_QUEENSBAY) += queensbay/
obj-$(CONFIG_INTEL_TANGIER) += tangier/
obj-$(CONFIG_APIC) += lapic.o ioapic.o
obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += irq.o
obj-$(CONFIG_$(SPL_TPL_)ACPI_GPE) += acpi_gpe.o
obj-$(CONFIG_QFW) += qfw_cpu.o
ifndef CONFIG_SYS_COREBOOT
obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += irq.o
endif
ifndef CONFIG_$(SPL_)X86_64
obj-$(CONFIG_SMP) += mp_init.o
endif
......
......@@ -11,8 +11,14 @@
# (C) Copyright 2002
# Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
ifndef CONFIG_SPL
obj-y += car.o
endif
ifdef CONFIG_SPL_BUILD
obj-y += coreboot_spl.o
else
obj-y += sdram.o
endif
obj-y += coreboot.o
obj-y += tables.o
obj-y += sdram.o
obj-y += timestamp.o
......@@ -27,7 +27,8 @@ int arch_cpu_init(void)
timestamp_init();
return x86_cpu_init_f();
return IS_ENABLED(CONFIG_X86_RUN_64BIT) ? x86_cpu_reinit_f() :
x86_cpu_init_f();
}
int checkcpu(void)
......
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2020 Google LLC
*/
#include <common.h>
#include <init.h>
int dram_init(void)
{
return 0;
}
......@@ -32,6 +32,8 @@ obj-$(CONFIG_HAVE_P2SB) += p2sb.o
ifdef CONFIG_SPL
ifndef CONFIG_SPL_BUILD
ifndef CONFIG_SYS_COREBOOT
obj-y += cpu_from_spl.o
endif
endif
endif
......@@ -53,6 +53,7 @@ int misc_init_r(void)
return 0;
}
#ifndef CONFIG_SYS_COREBOOT
int checkcpu(void)
{
return 0;
......@@ -62,6 +63,7 @@ int print_cpuinfo(void)
{
return 0;
}
#endif
int x86_cpu_reinit_f(void)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册