From dbf1b63b112550b3b504aef48bb57276802fff7d Mon Sep 17 00:00:00 2001 From: Fred Reitberger Date: Fri, 30 Jun 2023 13:44:14 -0400 Subject: soc/amd/phoenix/Makefile.inc: Refactor repeated lines to a variable Rather than repeat the same line multiple times, save it in a variable once and use that variable in the rest of the file. TEST=timeless birman build identical Signed-off-by: Fred Reitberger Change-Id: I4eb262adb3bbda04add79b2e2b8bee9a609a1e5b Reviewed-on: https://review.coreboot.org/c/coreboot/+/76197 Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) Reviewed-by: Felix Held Reviewed-by: Eric Lai --- src/soc/amd/phoenix/Makefile.inc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/soc/amd/phoenix/Makefile.inc b/src/soc/amd/phoenix/Makefile.inc index 566db2612f..c65c36979a 100644 --- a/src/soc/amd/phoenix/Makefile.inc +++ b/src/soc/amd/phoenix/Makefile.inc @@ -69,6 +69,9 @@ PHOENIX_FW_A_POSITION=$(call int-add, \ PHOENIX_FW_B_POSITION=$(call int-add, \ $(call get_fmap_value,FMAP_SECTION_FW_MAIN_B_START) $(AMD_FW_AB_POSITION)) + +FMAP_FLASH_START=$(call get_fmap_value,FMAP_SECTION_FLASH_START) + # # PSP Directory Table items # @@ -132,16 +135,14 @@ PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | # The flashmap section used for this is expected to be named RW_MRC_CACHE APOB_NV_SIZE=$(call get_fmap_value,FMAP_SECTION_RW_MRC_CACHE_SIZE) APOB_NV_BASE=$(shell printf "%#x" $(call int-subtract, \ - $(call get_fmap_value,FMAP_SECTION_RW_MRC_CACHE_START) \ - $(call get_fmap_value,FMAP_SECTION_FLASH_START))) + $(call get_fmap_value,FMAP_SECTION_RW_MRC_CACHE_START) $(FMAP_FLASH_START))) ifeq ($(CONFIG_HAS_RECOVERY_MRC_CACHE),y) # On boards with recovery MRC cache, point type 0x63 entry to RECOVERY_MRC_CACHE. # Else use RW_MRC_CACHE. This entry will be added in the RO section. APOB_NV_RO_SIZE=$(call get_fmap_value,FMAP_SECTION_RECOVERY_MRC_CACHE_SIZE) APOB_NV_RO_BASE=$(shell printf "%#x" $(call int-subtract, \ - $(call get_fmap_value,FMAP_SECTION_RECOVERY_MRC_CACHE_START) \ - $(call get_fmap_value,FMAP_SECTION_FLASH_START))) + $(call get_fmap_value,FMAP_SECTION_RECOVERY_MRC_CACHE_START) $(FMAP_FLASH_START))) else APOB_NV_RO_SIZE=$(APOB_NV_SIZE) APOB_NV_RO_BASE=$(APOB_NV_BASE) @@ -165,11 +166,9 @@ endif # CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK ifeq ($(CONFIG_SEPARATE_SIGNED_PSPFW),y) SIGNED_AMDFW_A_POSITION=$(call int-subtract, \ - $(call get_fmap_value,FMAP_SECTION_SIGNED_AMDFW_A_START) \ - $(call get_fmap_value,FMAP_SECTION_FLASH_START)) + $(call get_fmap_value,FMAP_SECTION_SIGNED_AMDFW_A_START) $(FMAP_FLASH_START)) SIGNED_AMDFW_B_POSITION=$(call int-subtract, \ - $(call get_fmap_value,FMAP_SECTION_SIGNED_AMDFW_B_START) \ - $(call get_fmap_value,FMAP_SECTION_FLASH_START)) + $(call get_fmap_value,FMAP_SECTION_SIGNED_AMDFW_B_START) $(FMAP_FLASH_START)) SIGNED_AMDFW_A_FILE=$(obj)/amdfw_a.rom.signed SIGNED_AMDFW_B_FILE=$(obj)/amdfw_b.rom.signed endif # CONFIG_SEPARATE_SIGNED_PSPFW -- cgit v1.2.3