From 1e4d9d573c59b68b16927db9f8db9af83338de2f Mon Sep 17 00:00:00 2001 From: Jeff Daly Date: Thu, 6 Jan 2022 16:16:46 -0500 Subject: sb/intel/common/firmware: Hook up adding 10GbE LAN firmware Add ability to use ifdtool to add LAN firmware to image using Kconfig Signed-off-by: Jeff Daly Change-Id: Id45ab4b69a85a5f8e52c0c4b130b6d729222b4c3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/60877 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/southbridge/intel/common/firmware/Kconfig | 35 ++++++++++++++++++++++ src/southbridge/intel/common/firmware/Makefile.inc | 17 ++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) (limited to 'src/southbridge/intel') diff --git a/src/southbridge/intel/common/firmware/Kconfig b/src/southbridge/intel/common/firmware/Kconfig index 2de86de855..45d8be87c3 100644 --- a/src/southbridge/intel/common/firmware/Kconfig +++ b/src/southbridge/intel/common/firmware/Kconfig @@ -146,6 +146,41 @@ config EC_BIN_PATH depends on HAVE_EC_BIN default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/ec.bin" +config MAINBOARD_USES_IFD_10GBE_0_REGION + def_bool n + +config HAVE_10GBE_0_BIN + bool "Add 10GbE Firmware Region 0" + depends on HAVE_IFD_BIN && MAINBOARD_USES_IFD_10GBE_0_REGION + help + The 10GbE region firmware file for LAN device 0. + + Select this if you are going to use the 10GbE 0 region and have the + firmware. The firmware will be added to final image through ifdtool. + +config 10GBE_0_BIN_PATH + string "Path to 10GbE region 0 firmware" + depends on HAVE_10GBE_0_BIN + default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/10gbe0.bin" + +config MAINBOARD_USES_IFD_10GBE_1_REGION + def_bool n + depends on MAINBOARD_USES_IFD_10GBE_0_REGION + +config HAVE_10GBE_1_BIN + bool "Add 10GbE Firmware Region 1" + depends on HAVE_IFD_BIN && MAINBOARD_USES_IFD_10GBE_1_REGION + help + The 10GbE region firmware file for LAN device 1. + + Select this if you are going to use the 10GbE 1 region and have the + firmware. The firmware will be added to final image through ifdtool. + +config 10GBE_1_BIN_PATH + string "Path to 10GbE region 1 firmware" + depends on HAVE_10GBE_1_BIN + default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/10gbe1.bin" + choice prompt "Protect flash regions" if HAVE_IFD_BIN default UNLOCK_FLASH_REGIONS if HAVE_IFD_BIN diff --git a/src/southbridge/intel/common/firmware/Makefile.inc b/src/southbridge/intel/common/firmware/Makefile.inc index 693bafb7a8..ba1d3b1d67 100644 --- a/src/southbridge/intel/common/firmware/Makefile.inc +++ b/src/southbridge/intel/common/firmware/Makefile.inc @@ -86,7 +86,22 @@ ifeq ($(CONFIG_HAVE_EC_BIN),y) -O $(obj)/coreboot.pre \ $(obj)/coreboot.pre endif - +ifeq ($(CONFIG_HAVE_10GBE_0_BIN),y) + printf " IFDTOOL 10gbe0.bin -> coreboot.pre\n" + $(objutil)/ifdtool/ifdtool \ + $(IFDTOOL_USE_CHIPSET) \ + -i 10GbE_0:$(CONFIG_10GBE_0_BIN_PATH) \ + -O $(obj)/coreboot.pre \ + $(obj)/coreboot.pre +endif +ifeq ($(CONFIG_HAVE_10GBE_1_BIN),y) + printf " IFDTOOL 10gbe1.bin -> coreboot.pre\n" + $(objutil)/ifdtool/ifdtool \ + $(IFDTOOL_USE_CHIPSET) \ + -i 10GbE_1:$(CONFIG_10GBE_1_BIN_PATH) \ + -O $(obj)/coreboot.pre \ + $(obj)/coreboot.pre +endif ifeq ($(CONFIG_LOCK_MANAGEMENT_ENGINE),y) printf " IFDTOOL Locking Management Engine\n" $(objutil)/ifdtool/ifdtool \ -- cgit v1.2.3