From f6efa4a345e6e2cb778f4898730aec6f043d7121 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Thu, 8 Aug 2024 16:55:08 +0530 Subject: soc/intel/cmn/block/cse: Add support for explicit CSE_RW_VERSION This change adds support for specifying the CSE_RW_VERSION directly in Kconfig. * If `CONFIG_SOC_INTEL_CSE_RW_VERSION` is defined, its value will be used directly as the CSE_RW version. * Otherwise, the version will be extracted from the CSE_RW binary file as before. Platform prior to Intel Meteor Lake still requires to override the CSE RW version using CONFIG_SOC_INTEL_CSE_RW_VERSION config rather reading the CSE RW version from CSE RW partition. BUG=b:327842062 TEST=CSE RW update successful on Karis with this patch using below recipe: 1. Overriding the CONFIG_SOC_INTEL_CSE_RW_VERSION="18.0.5.2269" 2. Without overriding the CONFIG_SOC_INTEL_CSE_RW_VERSION="" Platform prior to Intel Meteor Lake would be using #1 and platform starting with Meteor Lake expected to use #2 recipe. Change-Id: I1327c813b7aef77c65766eb9c40003bb8a71d4b6 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/83831 Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) Reviewed-by: Dinesh Gehlot --- src/soc/intel/common/block/cse/Makefile.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/soc/intel/common/block/cse/Makefile.mk b/src/soc/intel/common/block/cse/Makefile.mk index d41d735462..9196cf8031 100644 --- a/src/soc/intel/common/block/cse/Makefile.mk +++ b/src/soc/intel/common/block/cse/Makefile.mk @@ -91,6 +91,7 @@ ifeq ($(CONFIG_SOC_INTEL_CSE_LITE_COMPRESS_ME_RW),y) $(CSE_LITE_ME_RW)-compression := LZMA endif +ifeq ($(CONFIG_SOC_INTEL_CSE_RW_VERSION),"") INPUT_FILE := $(call strip_quotes,$(CONFIG_SOC_INTEL_CSE_RW_FILE)) TEMP_FILE := $(shell mktemp) OFFSETS := 16 18 20 22 # Offsets for CSE version components @@ -105,6 +106,10 @@ $(obj)/cse_rw.version: rm -f $(TEMP_FILE) $(eval CSE_RW_CBFS_VERSION := $(shell printf "%d.%d.%d.%d" $(CSE_VERSION_MAJOR)$(CSE_VERSION_MINOR)$(CSE_VERSION_HOTFIX)$(CSE_VERSION_BUILD))) @echo '$(CSE_RW_CBFS_VERSION)' > $@ +else +$(obj)/cse_rw.version: + @echo '$(call strip_quotes,$(CONFIG_SOC_INTEL_CSE_RW_VERSION))' > $@ +endif CSE_RW_VERSION = $(call strip_quotes,$(CONFIG_SOC_INTEL_CSE_RW_VERSION_CBFS_NAME)) regions-for-file-$(CSE_RW_VERSION) = FW_MAIN_A,FW_MAIN_B -- cgit v1.2.3