From 9c0c925fe6a29afbb8a5c86771fa2af50476cd3a Mon Sep 17 00:00:00 2001 From: Kilian Krause Date: Wed, 1 Oct 2025 10:18:35 +0200 Subject: [PATCH] mb/siemens/mc_rpl1: Send POST codes to NC FPGA via PCI This board uses PCI to send POST codes to the NC FPGA. Enable the feature of sending the POST codes to the NC FPGA via PCI so that the POST codes are visible in coreboot. TEST=Built and booted on mc_rpl1. Check that the POST Codes are correctly displayed on the 7-segment display. Change-Id: I95a1ac7121560b812aea36485c37f39e13de535a Signed-off-by: Kilian Krause Reviewed-on: https://review.coreboot.org/c/coreboot/+/89394 Tested-by: build bot (Jenkins) Reviewed-by: Mario Scheithauer Reviewed-by: Paul Menzel --- .../siemens/mc_rpl/variants/mc_rpl1/Kconfig | 16 ++++++++++++++++ .../siemens/mc_rpl/variants/mc_rpl1/Makefile.mk | 2 ++ .../siemens/mc_rpl/variants/mc_rpl1/post.c | 10 ++++++++++ 3 files changed, 28 insertions(+) create mode 100644 src/mainboard/siemens/mc_rpl/variants/mc_rpl1/post.c diff --git a/src/mainboard/siemens/mc_rpl/variants/mc_rpl1/Kconfig b/src/mainboard/siemens/mc_rpl/variants/mc_rpl1/Kconfig index a56d4c5b7a..858cb3fce8 100644 --- a/src/mainboard/siemens/mc_rpl/variants/mc_rpl1/Kconfig +++ b/src/mainboard/siemens/mc_rpl/variants/mc_rpl1/Kconfig @@ -10,9 +10,25 @@ config BOARD_SPECIFIC_OPTIONS select TPM_MEASURED_BOOT select TPM_MEASURED_BOOT_INIT_BOOTBLOCK select DRIVER_INTEL_I210 + select NC_FPGA_POST_CODE config UART_FOR_CONSOLE int default 2 +config EARLY_PCI_BRIDGE_DEVICE + hex + depends on NC_FPGA_POST_CODE + default 0x1c + +config EARLY_PCI_BRIDGE_FUNCTION + hex + depends on NC_FPGA_POST_CODE + default 0x0 + +config EARLY_PCI_MMIO_BASE + hex + depends on NC_FPGA_POST_CODE + default 0xfe400000 + endif # BOARD_SIEMENS_MC_RPL1 diff --git a/src/mainboard/siemens/mc_rpl/variants/mc_rpl1/Makefile.mk b/src/mainboard/siemens/mc_rpl/variants/mc_rpl1/Makefile.mk index 248d22b18c..03a936c199 100644 --- a/src/mainboard/siemens/mc_rpl/variants/mc_rpl1/Makefile.mk +++ b/src/mainboard/siemens/mc_rpl/variants/mc_rpl1/Makefile.mk @@ -3,3 +3,5 @@ bootblock-y += early_gpio.c ramstage-y += gpio.c romstage-y += variant.c + +all-$(CONFIG_NC_FPGA_POST_CODE) += post.c diff --git a/src/mainboard/siemens/mc_rpl/variants/mc_rpl1/post.c b/src/mainboard/siemens/mc_rpl/variants/mc_rpl1/post.c new file mode 100644 index 0000000000..c34e2539bc --- /dev/null +++ b/src/mainboard/siemens/mc_rpl/variants/mc_rpl1/post.c @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include +#include + +void mainboard_post(uint8_t value) +{ + nc_fpga_post(value); +}