Bora Guvendik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/61437 )
Change subject: [WIP] cse: Add ability to configure CSE component sizes/offsets ......................................................................
[WIP] cse: Add ability to configure CSE component sizes/offsets
Signed-off-by: Bora Guvendik bora.guvendik@intel.com Change-Id: Ib5f6a6f765fbe59d1677d771029138b01ade8d01 --- M src/soc/intel/Makefile.inc M src/soc/intel/alderlake/Makefile.inc M src/soc/intel/common/block/cse/Kconfig M src/soc/intel/common/block/cse/Makefile.inc 4 files changed, 139 insertions(+), 20 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/61437/1
diff --git a/src/soc/intel/Makefile.inc b/src/soc/intel/Makefile.inc index bf0d52c..86c5bc8 100644 --- a/src/soc/intel/Makefile.inc +++ b/src/soc/intel/Makefile.inc @@ -20,25 +20,27 @@ $(eval cse_$(3)_ingredients+=$(4)) $(eval file=$(2)) $(eval $(4)-file=$(file)) +$(eval $(3)_$(4)_offset=$(5)) +$(eval $(3)_$(4)_size=$(6)) $(eval $(1)+=$(if $(filter $(file),$($(1))),,$(file))) endef
define cse_add_decomp -$(call cse_add_file,cse_decomp_files,$(objcse)/$(2),$(1),$(2)) +$(call cse_add_file,cse_decomp_files,$(objcse)/$(2),$(1),$(2),$(3),$(4)) endef
define cse_add_decomp_to_bp1_bp2 -$(call cse_add_decomp,bp1,$(1)) -$(call cse_add_decomp,bp2,$(1)) +$(call cse_add_decomp,bp1,$(1),$(2),$(4)) +$(call cse_add_decomp,bp2,$(1),$(3),$(4)) endef
define cse_add_input -$(call cse_add_file,cse_input_files,$(call cse_input_path,$(CONFIG_CSE_$(2)_FILE)),$(1),$(2)) +$(call cse_add_file,cse_input_files,$(call cse_input_path,$(CONFIG_CSE_$(2)_FILE)),$(1),$(2),$(3),$(4)) endef
define cse_add_input_to_bp1_bp2 -$(call cse_add_input,bp1,$(1)) -$(call cse_add_input,bp2,$(1)) +$(call cse_add_input,bp1,$(1),$(2),$(4)) +$(call cse_add_input,bp2,$(1),$(3),$(4)) endef
endif diff --git a/src/soc/intel/alderlake/Makefile.inc b/src/soc/intel/alderlake/Makefile.inc index 095d210..629e090 100644 --- a/src/soc/intel/alderlake/Makefile.inc +++ b/src/soc/intel/alderlake/Makefile.inc @@ -65,20 +65,20 @@ $(eval $(call cse_add_dummy_to_bp1_bp2,DLMP)) $(eval $(call cse_add_dummy_to_bp1_bp2,IFPP)) $(eval $(call cse_add_dummy_to_bp1_bp2,SBDT)) -$(eval $(call cse_add_decomp_to_bp1_bp2,RBEP)) +$(eval $(call cse_add_decomp_to_bp1_bp2,RBEP,$(CONFIG_CSE_BP1_RBEP_OFFSET),$(CONFIG_CSE_BP2_RBEP_OFFSET),$(CONFIG_CSE_RBEP_SIZE))) $(eval $(call cse_add_dummy_to_bp1_bp2,UFSP)) $(eval $(call cse_add_dummy_to_bp1_bp2,UFSG)) -$(eval $(call cse_add_input_to_bp1_bp2,OEMP)) -$(eval $(call cse_add_input_to_bp1_bp2,PMCP)) -$(eval $(call cse_add_decomp,bp1,MFTP)) -$(eval $(call cse_add_decomp,bp2,FTPR)) -$(eval $(call cse_add_input_to_bp1_bp2,IOMP)) -$(eval $(call cse_add_input_to_bp1_bp2,NPHY)) -$(eval $(call cse_add_input_to_bp1_bp2,TBTP)) -$(eval $(call cse_add_input_to_bp1_bp2,PCHC)) -$(eval $(call cse_add_decomp,bp2,NFTP)) +$(eval $(call cse_add_input_to_bp1_bp2,OEMP,$(CONFIG_CSE_BP1_OEMP_OFFSET),$(CONFIG_CSE_BP2_OEMP_OFFSET),$(CONFIG_CSE_OEMP_SIZE))) +$(eval $(call cse_add_input_to_bp1_bp2,PMCP,$(CONFIG_CSE_BP1_PMCP_OFFSET),$(CONFIG_CSE_BP2_PMCP_OFFSET),$(CONFIG_CSE_PMCP_SIZE))) +$(eval $(call cse_add_decomp,bp1,MFTP,$(CONFIG_CSE_BP1_MFTP_OFFSET),$(CONFIG_CSE_MFTP_SIZE))) +$(eval $(call cse_add_decomp,bp2,FTPR,$(CONFIG_CSE_BP2_FTPR_OFFSET),$(CONFIG_CSE_FTPR_SIZE))) +$(eval $(call cse_add_input_to_bp1_bp2,IOMP,$(CONFIG_CSE_BP1_IOMP_OFFSET),$(CONFIG_CSE_BP2_IOMP_OFFSET),$(CONFIG_CSE_IOMP_SIZE))) +$(eval $(call cse_add_input_to_bp1_bp2,NPHY,$(CONFIG_CSE_BP1_NPHY_OFFSET),$(CONFIG_CSE_BP2_NPHY_OFFSET),$(CONFIG_CSE_NPHY_SIZE))) +$(eval $(call cse_add_input_to_bp1_bp2,TBTP,$(CONFIG_CSE_BP1_TBTP_OFFSET),$(CONFIG_CSE_BP2_TBTP_OFFSET),$(CONFIG_CSE_TBTP_SIZE))) +$(eval $(call cse_add_input_to_bp1_bp2,PCHC,$(CONFIG_CSE_BP1_PCHC_OFFSET),$(CONFIG_CSE_BP2_PCHC_OFFSET),$(CONFIG_CSE_PCHC_SIZE))) +$(eval $(call cse_add_decomp,bp2,NFTP,$(CONFIG_CSE_BP2_NFTP_OFFSET),$(CONFIG_CSE_NFTP_SIZE))) $(eval $(call cse_add_dummy,bp2,ISHP)) -$(eval $(call cse_add_input,bp2,IUNP)) +$(eval $(call cse_add_input,bp2,IUNP,$(CONFIG_CSE_BP2_IUNP_OFFSET),$(CONFIG_CSE_IUNP_SIZE)))
endif
diff --git a/src/soc/intel/common/block/cse/Kconfig b/src/soc/intel/common/block/cse/Kconfig index 23e08e6..d32c6c0 100644 --- a/src/soc/intel/common/block/cse/Kconfig +++ b/src/soc/intel/common/block/cse/Kconfig @@ -197,4 +197,119 @@ OEM created binaries to be loaded. This binary is generated by signing with the key owned by trusted owner.
+config CSE_RBEP_SIZE + string "Size of RBEP" + default 0 + +config CSE_PMCP_SIZE + string "Size of PMCP" + default 0 + +config CSE_IOMP_SIZE + string "Size of IOMP" + default 0 + +config CSE_NPHY_SIZE + string "Size of NPHY" + default 0 + +config CSE_TBTP_SIZE + string "Size of TBTP" + default 0 + +config CSE_PCHC_SIZE + string "Size of PCHC" + default 0 + +config CSE_FTPR_SIZE + string "Size of FTPR" + default 0 + +config CSE_MFTP_SIZE + string "Size of MFTP" + default 0 + +config CSE_NFTP_SIZE + string "Size of NFTP" + default 0 + +config CSE_IUNP_SIZE + string "Size of IUNP" + default 0 + +config CSE_OEMP_SIZE + string "Size of OEMP" + default 0 + +config CSE_BP1_RBEP_OFFSET + string "Offset of BP1 RBEP" + default 0 + +config CSE_BP1_PMCP_OFFSET + string "Offset of BP1 PMCP" + default 0 + +config CSE_BP1_MFTP_OFFSET + string "Offset of BP1 MFTP" + default 0 + +config CSE_BP1_OEMP_OFFSET + string "Offset of BP1 OEMP" + default 0 + +config CSE_BP1_IOMP_OFFSET + string "Offset of BP1 IOMP" + default 0 + +config CSE_BP1_NPHY_OFFSET + string "Offset of BP1 NPHY" + default 0 + +config CSE_BP1_TBTP_OFFSET + string "Offset of BP1 TBTP" + default 0 + +config CSE_BP1_PCHC_OFFSET + string "Offset of BP1 PCHC" + default 0 + +config CSE_BP2_RBEP_OFFSET + string "Offset of BP2 RBEP" + default 0 + +config CSE_BP2_PMCP_OFFSET + string "Offset of BP2 PMCP" + default 0 + +config CSE_BP2_FTPR_OFFSET + string "Offset of BP2 FTPR" + default 0 + +config CSE_BP2_OEMP_OFFSET + string "Offset of BP2 OEMP" + default 0 + +config CSE_BP2_IOMP_OFFSET + string "Offset of BP2 IOMP" + default 0 + +config CSE_BP2_NPHY_OFFSET + string "Offset of BP2 NPHY" + default 0 + +config CSE_BP2_TBTP_OFFSET + string "Offset of BP2 TBTP" + default 0 + +config CSE_BP2_PCHC_OFFSET + string "Offset of BP2 PCHC" + default 0 + +config CSE_BP2_NFTP_OFFSET + string "Offset of BP2 NFTP" + default 0 + +config CSE_BP2_IUNP_OFFSET + string "Offset of BP2 IUNP" + default 0 endif diff --git a/src/soc/intel/common/block/cse/Makefile.inc b/src/soc/intel/common/block/cse/Makefile.inc index 3f4c4d6..b4d5bca 100644 --- a/src/soc/intel/common/block/cse/Makefile.inc +++ b/src/soc/intel/common/block/cse/Makefile.inc @@ -42,8 +42,8 @@
define cse_add_ingredient $(if $($(2)-file), \ - printf " CSEADD $(2) ($($(2)-file)) -> $(1)\n"; - $(CSE_SERGER) $@ add -n $(2) -f $($(2)-file) > /dev/null, + printf " CSEADD $(2) ($($(2)-file)) -m $(3) -e $(4)-> $(1)\n"; + $(CSE_SERGER) $@ add -n $(2) -f $($(2)-file) -m $(3) -e $(4) > /dev/null, printf " CSEADD $(2) (dummy) -> $(1)\n"; $(CSE_SERGER) $@ add -n $(2) > /dev/null) endef @@ -52,7 +52,9 @@ printf " CREATE $(@F) (version $(CSE_BPDT_VERSION))\n" $(CSE_SERGER) $@ create-bpdt -v $(CSE_BPDT_VERSION) > /dev/null $(foreach ingredient,$(cse_$*_ingredients),\ - $(call cse_add_ingredient,$(@F),$(ingredient));) + $(call cse_add_ingredient,$(@F),$(ingredient),\ + $($(patsubst cse_%.bin,%,$(@F))_$(ingredient)_offset),\ + $($(patsubst cse_%.bin,%,$(@F))_$(ingredient)_size));)
$(OBJ_ME_BIN): $(CSE_BP1_BIN) $(CSE_BP2_BIN) $(CSE_DATA_INPUT) $(obj)/fmap_config.h printf " CREATE $(@F)\n"