summaryrefslogtreecommitdiffstats
path: root/board/coreboot
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2018-08-10 02:39:33 -0700
committerBin Meng <bmeng.cn@gmail.com>2018-08-20 13:52:06 +0800
commitceeee8f7b5f10d7736840b169249e891da0f6a47 (patch)
tree0d4e059b4cf53c67d1fca1d7fd1404c6bc347759 /board/coreboot
parent6ace36e19a8cfdd16ce7c02625edf36864897bf5 (diff)
downloadu-boot-ceeee8f7b5f10d7736840b169249e891da0f6a47.tar.gz
u-boot-ceeee8f7b5f10d7736840b169249e891da0f6a47.tar.xz
u-boot-ceeee8f7b5f10d7736840b169249e891da0f6a47.zip
x86: coreboot: Add generic coreboot payload support
Currently building U-Boot as the coreboot payload requires user to change the build configuration for a specific board during menuconfig process. This uses the board's native device tree to configure the hardware. For example, the device tree provides PCI address range for the PCI host controller and U-Boot will re-program all PCI devices' BAR to be within this range. In order to make sure we don't mess up the hardware, we should guarantee the range matches what coreboot programs the chipset. But we really should make the coreboot payload support easier. Just like EFI payload, we can create a generic coreboot payload for all x86 boards as well. The payload is configured to include as many generic drivers as possible. All stuff that touches low level initialization are not allowed as such is the coreboot's responsibility. Platform specific drivers (like gpio, spi, etc) are not included. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Diffstat (limited to 'board/coreboot')
-rw-r--r--board/coreboot/coreboot/Kconfig28
-rw-r--r--board/coreboot/coreboot/Makefile2
-rw-r--r--board/coreboot/coreboot/coreboot.c17
-rw-r--r--board/coreboot/coreboot/start.S (renamed from board/coreboot/coreboot/coreboot_start.S)0
4 files changed, 22 insertions, 25 deletions
diff --git a/board/coreboot/coreboot/Kconfig b/board/coreboot/coreboot/Kconfig
index cfa1d50ee4..5bd6465d98 100644
--- a/board/coreboot/coreboot/Kconfig
+++ b/board/coreboot/coreboot/Kconfig
@@ -9,35 +9,15 @@ config SYS_VENDOR
config SYS_SOC
default "coreboot"
+config SYS_CONFIG_NAME
+ default "coreboot"
+
config SYS_TEXT_BASE
default 0x01110000
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
- imply SPI_FLASH_ATMEL
- imply SPI_FLASH_EON
- imply SPI_FLASH_GIGADEVICE
- imply SPI_FLASH_MACRONIX
- imply SPI_FLASH_SPANSION
- imply SPI_FLASH_STMICRO
- imply SPI_FLASH_SST
- imply SPI_FLASH_WINBOND
-
-comment "coreboot-specific options"
-
-config SYS_CONFIG_NAME
- string "Board configuration file"
- default "qemu-x86"
- help
- This option selects the board configuration file in include/configs/
- directory to be used to build U-Boot for coreboot.
-
-config DEFAULT_DEVICE_TREE
- string "Board Device Tree Source (dts) file"
- default "qemu-x86_i440fx"
- help
- This option selects the board Device Tree Source (dts) file in
- arch/x86/dts/ directory to be used to build U-Boot for coreboot.
+ select BOARD_EARLY_INIT_R
config SYS_CAR_ADDR
hex "Board specific Cache-As-RAM (CAR) address"
diff --git a/board/coreboot/coreboot/Makefile b/board/coreboot/coreboot/Makefile
index ea0f3ee1ae..8db7cc62f3 100644
--- a/board/coreboot/coreboot/Makefile
+++ b/board/coreboot/coreboot/Makefile
@@ -10,4 +10,4 @@
# (C) Copyright 2002
# Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
-obj-y += coreboot_start.o
+obj-y += start.o coreboot.o
diff --git a/board/coreboot/coreboot/coreboot.c b/board/coreboot/coreboot/coreboot.c
new file mode 100644
index 0000000000..ed5606d4a4
--- /dev/null
+++ b/board/coreboot/coreboot/coreboot.c
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
+ */
+
+#include <common.h>
+
+int board_early_init_r(void)
+{
+ /*
+ * Make sure PCI bus is enumerated so that peripherals on the PCI bus
+ * can be discovered by their drivers
+ */
+ pci_init();
+
+ return 0;
+}
diff --git a/board/coreboot/coreboot/coreboot_start.S b/board/coreboot/coreboot/start.S
index aa702622d4..aa702622d4 100644
--- a/board/coreboot/coreboot/coreboot_start.S
+++ b/board/coreboot/coreboot/start.S