[U-Boot] [PATCH 5/6] Add Poseidon platform, based on BDE with memory down

vnktux vnktux at protonmail.com
Fri Jan 26 11:22:56 UTC 2018


This patch include a board called Poseidon. That is a platform based on Broadwell-DE with memory down enabled on channel 0 dimm 0. This platform was used to implement the architecture in U-Boot.

Signed-off-by: Vincenzo Bove <vnktux at protonmail.com>
---
board/prodrive/Kconfig                     |  23 ++++
board/prodrive/poseidon/.gitignore         |   5 +
board/prodrive/poseidon/Kconfig            |  45 +++++++
board/prodrive/poseidon/MAINTAINERS        |   6 +
board/prodrive/poseidon/Makefile           |   8 ++
board/prodrive/poseidon/acpi/mainboard.asl |  11 ++
board/prodrive/poseidon/dsdt.asl           | 187 +++++++++++++++++++++++++++++
board/prodrive/poseidon/poseidon.c         |  18 +++
board/prodrive/poseidon/start.S            |   9 ++
configs/poseidon_defconfig                 |  70 +++++++++++
include/configs/poseidon.h                 |  29 +++++
11 files changed, 411 insertions(+)
create mode 100644 board/prodrive/Kconfig
create mode 100644 board/prodrive/poseidon/.gitignore
create mode 100644 board/prodrive/poseidon/Kconfig
create mode 100644 board/prodrive/poseidon/MAINTAINERS
create mode 100644 board/prodrive/poseidon/Makefile
create mode 100644 board/prodrive/poseidon/acpi/mainboard.asl
create mode 100644 board/prodrive/poseidon/dsdt.asl
create mode 100644 board/prodrive/poseidon/poseidon.c
create mode 100644 board/prodrive/poseidon/start.S
create mode 100644 configs/poseidon_defconfig
create mode 100644 include/configs/poseidon.h

diff --git a/board/prodrive/Kconfig b/board/prodrive/Kconfig
new file mode 100644
index 0000000000..4828b65b2b
--- /dev/null
+++ b/board/prodrive/Kconfig
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2017, Vincenzo Bove <vincenzo.bove at prodrive-technologies.com>
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+if VENDOR_PRODRIVE
+
+choice
+ prompt "Mainboard model"
+ optional
+
+config TARGET_POSEIDON
+ bool "Poseidon"
+ help
+   This target is for Prodrive Poseidon.
+   Embedded board hosting x86 Broadwell-DE Xeon processor.
+
+endchoice
+
+source "board/prodrive/poseidon/Kconfig"
+
+endif
diff --git a/board/prodrive/poseidon/.gitignore b/board/prodrive/poseidon/.gitignore
new file mode 100644
index 0000000000..c782010f5b
--- /dev/null
+++ b/board/prodrive/poseidon/.gitignore
@@ -0,0 +1,5 @@
+dsdt.aml
+dsdt.asl.tmp
+dsdt.c
+
+!*.bin
\ No newline at end of file
diff --git a/board/prodrive/poseidon/Kconfig b/board/prodrive/poseidon/Kconfig
new file mode 100644
index 0000000000..4fa9feff6e
--- /dev/null
+++ b/board/prodrive/poseidon/Kconfig
@@ -0,0 +1,45 @@
+#
+# Copyright (C) 2017, Vincenzo Bove <vincenzo.bove at prodrive-technologies.com>
+#
+# SPDX-License-Identifier: GPL-2.0+
+
+if TARGET_POSEIDON
+
+config SYS_BOARD
+ default "poseidon"
+
+config SYS_VENDOR
+ default "prodrive"
+
+config SYS_SOC
+ default "broadwell-de"
+
+config SYS_CONFIG_NAME
+ default "poseidon"
+
+config SYS_TEXT_BASE
+ default 0xffdb0000
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+ def_bool y
+ select X86_RESET_VECTOR
+ select INTEL_BROADWELL_DE
+ select BOARD_ROMSIZE_KB_16384
+ select SPI_FLASH_MACRONIX
+
+config PCIE_ECAM_BASE
+ default 0x80000000
+
+config SYS_CAR_ADDR
+ hex
+ default 0xfef00000
+
+config SYS_CAR_SIZE
+ hex
+ default 0x40000
+
+config SYS_PROMPT
+ string
+ default "Poseidon => "
+
+endif
diff --git a/board/prodrive/poseidon/MAINTAINERS b/board/prodrive/poseidon/MAINTAINERS
new file mode 100644
index 0000000000..c21f2e6374
--- /dev/null
+++ b/board/prodrive/poseidon/MAINTAINERS
@@ -0,0 +1,6 @@
+Prodrive Poseidon x86 Broadwell-DE
+M: Vincenzo Bove <vincenzo.bove at prodrive-technologies.com>
+S: Maintained
+F: board/prodrive/poseidon
+F: include/configs/poseidon.h
+F: configs/poseidon_defconfig
diff --git a/board/prodrive/poseidon/Makefile b/board/prodrive/poseidon/Makefile
new file mode 100644
index 0000000000..83fd499814
--- /dev/null
+++ b/board/prodrive/poseidon/Makefile
@@ -0,0 +1,8 @@
+#
+# Copyright (C) 2017, Vincenzo Bove <vincenzo.bove at prodrive-technologies.com>
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y += poseidon.o start.o
+obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o
diff --git a/board/prodrive/poseidon/acpi/mainboard.asl b/board/prodrive/poseidon/acpi/mainboard.asl
new file mode 100644
index 0000000000..4cc8ad376d
--- /dev/null
+++ b/board/prodrive/poseidon/acpi/mainboard.asl
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2017, Vincenzo Bove <vincenzo.bove at prodrive-technologies.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+/* Power Button */
+Device (PWRB)
+{
+ Name(_HID, EISAID("PNP0C0C"))
+}
diff --git a/board/prodrive/poseidon/dsdt.asl b/board/prodrive/poseidon/dsdt.asl
new file mode 100644
index 0000000000..951f320b74
--- /dev/null
+++ b/board/prodrive/poseidon/dsdt.asl
@@ -0,0 +1,187 @@
+/*
+ * Copyright (C) 2017, Vincenzo Bove <vincenzo.bove at prodrive-technologies.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+DefinitionBlock("dsdt.aml", "DSDT", 2, "U-BOOT", "U-BOOTBL", 0x20110725)
+{
+ /* platform specific */
+ #include <asm/arch/acpi/platform.asl>
+
+ Name(_S0, Package() { 0x00, 0x00, 0x00, 0x00 })
+ Name(_S5, Package() { 0x07, 0x00, 0x00, 0x00 })
+
+ Scope (\_SB)
+ {
+ Device (PCI0)
+ {
+ #include <asm/arch/acpi/southcluster.asl>
+ #include <asm/arch/acpi/pcie1.asl>
+ }
+
+ Name (PRUN, Package() {
+ Package() { 0x0008FFFF, 0, \_SB.PCI0.LPC0.LNKA, 0 },
+ Package() { 0x0008FFFF, 1, \_SB.PCI0.LPC0.LNKB, 0 },
+ Package() { 0x0008FFFF, 2, \_SB.PCI0.LPC0.LNKC, 0 },
+ Package() { 0x0008FFFF, 3, \_SB.PCI0.LPC0.LNKD, 0 },
+
+ Package() { 0x0009FFFF, 0, \_SB.PCI0.LPC0.LNKA, 0 },
+ Package() { 0x0009FFFF, 1, \_SB.PCI0.LPC0.LNKB, 0 },
+ Package() { 0x0009FFFF, 2, \_SB.PCI0.LPC0.LNKC, 0 },
+ Package() { 0x0009FFFF, 3, \_SB.PCI0.LPC0.LNKD, 0 },
+
+ Package() { 0x000AFFFF, 0, \_SB.PCI0.LPC0.LNKA, 0 },
+ Package() { 0x000AFFFF, 1, \_SB.PCI0.LPC0.LNKB, 0 },
+ Package() { 0x000AFFFF, 2, \_SB.PCI0.LPC0.LNKC, 0 },
+ Package() { 0x000AFFFF, 3, \_SB.PCI0.LPC0.LNKD, 0 },
+
+ Package() { 0x000BFFFF, 0, \_SB.PCI0.LPC0.LNKA, 0 },
+ Package() { 0x000BFFFF, 1, \_SB.PCI0.LPC0.LNKB, 0 },
+ Package() { 0x000BFFFF, 2, \_SB.PCI0.LPC0.LNKC, 0 },
+ Package() { 0x000BFFFF, 3, \_SB.PCI0.LPC0.LNKD, 0 },
+
+ Package() { 0x000CFFFF, 0, \_SB.PCI0.LPC0.LNKA, 0 },
+ Package() { 0x000CFFFF, 1, \_SB.PCI0.LPC0.LNKB, 0 },
+ Package() { 0x000CFFFF, 2, \_SB.PCI0.LPC0.LNKC, 0 },
+ Package() { 0x000CFFFF, 3, \_SB.PCI0.LPC0.LNKD, 0 },
+
+ Package() { 0x000DFFFF, 0, \_SB.PCI0.LPC0.LNKA, 0 },
+ Package() { 0x000DFFFF, 1, \_SB.PCI0.LPC0.LNKB, 0 },
+ Package() { 0x000DFFFF, 2, \_SB.PCI0.LPC0.LNKC, 0 },
+ Package() { 0x000DFFFF, 3, \_SB.PCI0.LPC0.LNKD, 0 },
+
+ Package() { 0x000EFFFF, 0, \_SB.PCI0.LPC0.LNKA, 0 },
+ Package() { 0x000EFFFF, 1, \_SB.PCI0.LPC0.LNKB, 0 },
+ Package() { 0x000EFFFF, 2, \_SB.PCI0.LPC0.LNKC, 0 },
+ Package() { 0x000EFFFF, 3, \_SB.PCI0.LPC0.LNKD, 0 },
+
+ Package() { 0x000FFFFF, 0, \_SB.PCI0.LPC0.LNKA, 0 },
+ Package() { 0x000FFFFF, 1, \_SB.PCI0.LPC0.LNKB, 0 },
+ Package() { 0x000FFFFF, 2, \_SB.PCI0.LPC0.LNKC, 0 },
+ Package() { 0x000FFFFF, 3, \_SB.PCI0.LPC0.LNKD, 0 },
+
+ Package() { 0x0010FFFF, 0, \_SB.PCI0.LPC0.LNKA, 0 },
+ Package() { 0x0010FFFF, 1, \_SB.PCI0.LPC0.LNKB, 0 },
+ Package() { 0x0010FFFF, 2, \_SB.PCI0.LPC0.LNKC, 0 },
+ Package() { 0x0010FFFF, 3, \_SB.PCI0.LPC0.LNKD, 0 },
+
+ Package() { 0x0011FFFF, 0, \_SB.PCI0.LPC0.LNKA, 0 },
+ Package() { 0x0011FFFF, 1, \_SB.PCI0.LPC0.LNKB, 0 },
+ Package() { 0x0011FFFF, 2, \_SB.PCI0.LPC0.LNKC, 0 },
+ Package() { 0x0011FFFF, 3, \_SB.PCI0.LPC0.LNKD, 0 },
+
+ Package() { 0x0012FFFF, 0, \_SB.PCI0.LPC0.LNKA, 0 },
+ Package() { 0x0012FFFF, 1, \_SB.PCI0.LPC0.LNKB, 0 },
+ Package() { 0x0012FFFF, 2, \_SB.PCI0.LPC0.LNKC, 0 },
+ Package() { 0x0012FFFF, 3, \_SB.PCI0.LPC0.LNKD, 0 },
+
+ Package() { 0x0013FFFF, 0, \_SB.PCI0.LPC0.LNKA, 0 },
+ Package() { 0x0013FFFF, 1, \_SB.PCI0.LPC0.LNKB, 0 },
+ Package() { 0x0013FFFF, 2, \_SB.PCI0.LPC0.LNKC, 0 },
+ Package() { 0x0013FFFF, 3, \_SB.PCI0.LPC0.LNKD, 0 },
+ })
+
+ Name (ARUN, Package() {
+ Package() { 0x0008FFFF, 0, 0, 16 },
+ Package() { 0x0008FFFF, 1, 0, 17 },
+ Package() { 0x0008FFFF, 2, 0, 18 },
+ Package() { 0x0008FFFF, 3, 0, 19 },
+
+ Package() { 0x0009FFFF, 0, 0, 16 },
+ Package() { 0x0009FFFF, 1, 0, 17 },
+ Package() { 0x0009FFFF, 2, 0, 18 },
+ Package() { 0x0009FFFF, 3, 0, 19 },
+
+ Package() { 0x000AFFFF, 0, 0, 16 },
+ Package() { 0x000AFFFF, 1, 0, 17 },
+ Package() { 0x000AFFFF, 2, 0, 18 },
+ Package() { 0x000AFFFF, 3, 0, 19 },
+
+ Package() { 0x000BFFFF, 0, 0, 16 },
+ Package() { 0x000BFFFF, 1, 0, 17 },
+ Package() { 0x000BFFFF, 2, 0, 18 },
+ Package() { 0x000BFFFF, 3, 0, 19 },
+
+ Package() { 0x000CFFFF, 0, 0, 16 },
+ Package() { 0x000CFFFF, 1, 0, 17 },
+ Package() { 0x000CFFFF, 2, 0, 18 },
+ Package() { 0x000CFFFF, 3, 0, 19 },
+
+ Package() { 0x000DFFFF, 0, 0, 16 },
+ Package() { 0x000DFFFF, 1, 0, 17 },
+ Package() { 0x000DFFFF, 2, 0, 18 },
+ Package() { 0x000DFFFF, 3, 0, 19 },
+
+ Package() { 0x000EFFFF, 0, 0, 16 },
+ Package() { 0x000EFFFF, 1, 0, 17 },
+ Package() { 0x000EFFFF, 2, 0, 18 },
+ Package() { 0x000EFFFF, 3, 0, 19 },
+
+ Package() { 0x000FFFFF, 0, 0, 16 },
+ Package() { 0x000FFFFF, 1, 0, 17 },
+ Package() { 0x000FFFFF, 2, 0, 18 },
+ Package() { 0x000FFFFF, 3, 0, 19 },
+
+ Package() { 0x0010FFFF, 0, 0, 16 },
+ Package() { 0x0010FFFF, 1, 0, 17 },
+ Package() { 0x0010FFFF, 2, 0, 18 },
+ Package() { 0x0010FFFF, 3, 0, 19 },
+
+ Package() { 0x0011FFFF, 0, 0, 16 },
+ Package() { 0x0011FFFF, 1, 0, 17 },
+ Package() { 0x0011FFFF, 2, 0, 18 },
+ Package() { 0x0011FFFF, 3, 0, 19 },
+
+ Package() { 0x0012FFFF, 0, 0, 16 },
+ Package() { 0x0012FFFF, 1, 0, 17 },
+ Package() { 0x0012FFFF, 2, 0, 18 },
+ Package() { 0x0012FFFF, 3, 0, 19 },
+
+ Package() { 0x0013FFFF, 0, 0, 16 },
+ Package() { 0x0013FFFF, 1, 0, 17 },
+ Package() { 0x0013FFFF, 2, 0, 18 },
+ Package() { 0x0013FFFF, 3, 0, 19 },
+ })
+
+ Device (UNC0)
+ {
+ Name (_HID, EisaId ("PNP0A03"))
+ Name (_UID, 0x3F)
+ Method (_BBN, 0, NotSerialized)
+ {
+ Return (0xff)
+ }
+
+ Name (_ADR, 0x00)
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (0xf)
+ }
+
+ Name (_CRS, ResourceTemplate ()
+ {
+ WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
+ 0x0000,             // Granularity
+ 0x00FF,             // Range Minimum
+ 0x00FF,             // Range Maximum
+ 0x0000,             // Translation Offset
+ 0x0001,             // Length
+ ,, )
+ })
+
+ Method (_PRT, 0, NotSerialized)
+ {
+ If (LEqual (PICM, Zero))
+ {
+ Return (PRUN)
+ }
+
+ Return (ARUN)
+ }
+ }
+ }
+
+ /* board specific */
+ #include "acpi/mainboard.asl"
+}
diff --git a/board/prodrive/poseidon/poseidon.c b/board/prodrive/poseidon/poseidon.c
new file mode 100644
index 0000000000..9323b3c669
--- /dev/null
+++ b/board/prodrive/poseidon/poseidon.c
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2017, Vincenzo Bove <vincenzo.bove at prodrive-technologies.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <asm/gpio.h>
+#include <dm/device-internal.h>
+#include <dm/uclass-internal.h>
+
+
+int misc_init_r(void)
+{
+
+ return 0;
+}
diff --git a/board/prodrive/poseidon/start.S b/board/prodrive/poseidon/start.S
new file mode 100644
index 0000000000..bf9374b8f7
--- /dev/null
+++ b/board/prodrive/poseidon/start.S
@@ -0,0 +1,9 @@
+/*
+ * Copyright (C) 2017, Vincenzo Bove <vincenzo.bove at prodrive-technologies.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+.globl early_board_init
+early_board_init:
+ jmp early_board_init_ret
diff --git a/configs/poseidon_defconfig b/configs/poseidon_defconfig
new file mode 100644
index 0000000000..accf0a1b80
--- /dev/null
+++ b/configs/poseidon_defconfig
@@ -0,0 +1,70 @@
+CONFIG_X86=y
+CONFIG_SYS_CONFIG_NAME="poseidon"
+CONFIG_VENDOR_PRODRIVE=y
+CONFIG_DEFAULT_DEVICE_TREE="poseidon"
+CONFIG_TARGET_POSEIDON=y
+CONFIG_FSP_MEMORY_DOWN=y
+CONFIG_HAVE_SPD=y
+CONFIG_INTERNAL_UART=y
+CONFIG_SMP=y
+#CONFIG_HAVE_VGA_BIOS=y
+#CONFIG_VGA_BIOS_ADDR=0xfffd0001
+#CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
+#CONFIG_FRAMEBUFFER_VESA_MODE_11A=y
+CONFIG_GENERATE_PIRQ_TABLE=y
+#CONFIG_GENERATE_MP_TABLE=y
+CONFIG_GENERATE_ACPI_TABLE=y
+CONFIG_HAVE_ACPI_RESUME=y
+CONFIG_SEABIOS=y
+CONFIG_FIT=y
+CONFIG_BOOTSTAGE=y
+CONFIG_BOOTSTAGE_REPORT=y
+#CONFIG_USE_BOOTARGS=y
+#CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/sdb3 init=/sbin/init rootwait ro"
+CONFIG_SYS_CONSOLE_INFO_QUIET=y
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_CPU=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_BOOTSTAGE=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_CPU=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_CONSOLE_SCROLL_LINES=5
+#CONFIG_CMD_IMLS=n
+CONFIG_SYS_NS16550=y
+#CONFIG_CMD_TPM=y
+#CONFIG_CMD_TPM_TEST=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_GIGADEVICE=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_DM_ETH=y
+CONFIG_E1000=y
+CONFIG_DM_PCI=y
+#CONFIG_DM_RTC=y
+CONFIG_TIMER=y
+#CONFIG_TPM_TIS_LPC=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_UHCI_HCD=y
+#CONFIG_DM_VIDEO=y
+CONFIG_USE_PRIVATE_LIBGCC=y
+#CONFIG_TPM=y
+CONFIG_OF_CONTROL=y
+CONFIG_I8259_PIC=y
+CONFIG_I8254_TIMER=y
diff --git a/include/configs/poseidon.h b/include/configs/poseidon.h
new file mode 100644
index 0000000000..739ca8ec50
--- /dev/null
+++ b/include/configs/poseidon.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2017, Vincenzo Bove <vincenzo.bove at prodrive-technologies.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#include <configs/x86-common.h>
+
+#define CONFIG_SYS_MONITOR_LEN (1 << 20)
+
+#define CONFIG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd\0" \
+ "stdout=serial,vidconsole\0" \
+ "stderr=serial,vidconsole\0"
+
+#define CONFIG_USB_ETHER_ASIX88179
+
+#define CONFIG_SCSI_AHCI
+#define CONFIG_SCSI_DEV_LIST \
+ {PCI_VENDOR_ID_INTEL, 0x8c02}
+
+#undef CONFIG_ENV_IS_IN_SPI_FLASH
+
+#define DEBUG
+
+#endif /* __CONFIG_H */
--
2.11.0


More information about the U-Boot mailing list