diff options
author | Fred Reitberger <reitbergerfred@gmail.com> | 2023-06-30 13:44:14 -0400 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-07-05 19:00:21 +0000 |
commit | dbf1b63b112550b3b504aef48bb57276802fff7d (patch) | |
tree | cb1862db34a45e98c8b97fb5e9d547b8f39f5291 /src | |
parent | 41a162b7a8e407a42e052fe745c8995c29e762a5 (diff) |
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 <reitbergerfred@gmail.com>
Change-Id: I4eb262adb3bbda04add79b2e2b8bee9a609a1e5b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76197
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/amd/phoenix/Makefile.inc | 15 |
1 files changed, 7 insertions, 8 deletions
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 |