From e66ce2f4181b14ffe323e559805b2a5f97b0c1bd Mon Sep 17 00:00:00 2001 From: Fred Reitberger Date: Wed, 5 Jul 2023 15:43:19 -0400 Subject: soc/amd/*/Makefile.inc: Use _tohex instead of printf Use the _tohex function to convert values to hex instead of 'shell printf' TEST=timeless builds identical for grunt,dalboz,guybrush,chausie,birman Signed-off-by: Fred Reitberger Change-Id: Ic7f7d1b764479088cc0980b208d8d603bc712832 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76314 Reviewed-by: Eric Lai Reviewed-by: Marshall Dawson Tested-by: build bot (Jenkins) Reviewed-by: Felix Held Reviewed-by: Matt DeVillier --- src/soc/amd/cezanne/Makefile.inc | 6 +++--- src/soc/amd/glinda/Makefile.inc | 6 +++--- src/soc/amd/mendocino/Makefile.inc | 10 +++++----- src/soc/amd/phoenix/Makefile.inc | 10 +++++----- src/soc/amd/picasso/Makefile.inc | 6 +++--- src/soc/amd/stoneyridge/Makefile.inc | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/soc/amd/cezanne/Makefile.inc b/src/soc/amd/cezanne/Makefile.inc index c4b23d1b3a..2908674774 100644 --- a/src/soc/amd/cezanne/Makefile.inc +++ b/src/soc/amd/cezanne/Makefile.inc @@ -219,7 +219,7 @@ $(obj)/amdfw.rom: $(call strip_quotes, $(PSP_BIOSBIN_FILE)) \ $(OPT_APOB_NV_BASE) \ $(OPT_VERSTAGE_FILE) \ $(OPT_VERSTAGE_SIG_FILE) \ - --location $(shell printf "%#x" $(CEZANNE_FWM_POSITION)) \ + --location $(call _tohex,$(CEZANNE_FWM_POSITION)) \ --multilevel \ --output $@ @@ -236,7 +236,7 @@ $(obj)/amdfw_a.rom: $(obj)/amdfw.rom $(AMDFW_COMMON_ARGS) \ $(OPT_APOB_NV_SIZE) \ $(OPT_APOB_NV_BASE) \ - --location $(shell printf "%#x" $(CEZANNE_FW_A_POSITION)) \ + --location $(call _tohex,$(CEZANNE_FW_A_POSITION)) \ --anywhere \ --multilevel \ --output $@ @@ -248,7 +248,7 @@ $(obj)/amdfw_b.rom: $(obj)/amdfw.rom $(AMDFW_COMMON_ARGS) \ $(OPT_APOB_NV_SIZE) \ $(OPT_APOB_NV_BASE) \ - --location $(shell printf "%#x" $(CEZANNE_FW_B_POSITION)) \ + --location $(call _tohex,$(CEZANNE_FW_B_POSITION)) \ --anywhere \ --multilevel \ --output $@ diff --git a/src/soc/amd/glinda/Makefile.inc b/src/soc/amd/glinda/Makefile.inc index c35c3fea13..a537378372 100644 --- a/src/soc/amd/glinda/Makefile.inc +++ b/src/soc/amd/glinda/Makefile.inc @@ -238,7 +238,7 @@ $(obj)/amdfw.rom: $(call strip_quotes, $(PSP_BIOSBIN_FILE)) \ $(OPT_VERSTAGE_FILE) \ $(OPT_VERSTAGE_SIG_FILE) \ $(OPT_SPL_TABLE_FILE) \ - --location $(shell printf "%#x" $(GLINDA_FWM_POSITION)) \ + --location $(call _tohex,$(GLINDA_FWM_POSITION)) \ --output $@ $(PSP_BIOSBIN_FILE): $(PSP_ELF_FILE) $(AMDCOMPRESS) @@ -257,7 +257,7 @@ $(obj)/amdfw_a.rom: $(obj)/amdfw.rom $(OPT_SPL_RW_AB_TABLE_FILE) \ $(OPT_SIGNED_AMDFW_A_POSITION) \ $(OPT_SIGNED_AMDFW_A_FILE) \ - --location $(shell printf "%#x" $(GLINDA_FW_A_POSITION)) \ + --location $(call _tohex,$(GLINDA_FW_A_POSITION)) \ --anywhere \ --output $@ @@ -271,7 +271,7 @@ $(obj)/amdfw_b.rom: $(obj)/amdfw.rom $(OPT_SPL_RW_AB_TABLE_FILE) \ $(OPT_SIGNED_AMDFW_B_POSITION) \ $(OPT_SIGNED_AMDFW_B_FILE) \ - --location $(shell printf "%#x" $(GLINDA_FW_B_POSITION)) \ + --location $(call _tohex,$(GLINDA_FW_B_POSITION)) \ --anywhere \ --output $@ diff --git a/src/soc/amd/mendocino/Makefile.inc b/src/soc/amd/mendocino/Makefile.inc index 466123461c..d3d5601e13 100644 --- a/src/soc/amd/mendocino/Makefile.inc +++ b/src/soc/amd/mendocino/Makefile.inc @@ -262,7 +262,7 @@ $(obj)/amdfw.rom: $(call strip_quotes, $(PSP_BIOSBIN_FILE)) \ $(OPT_VERSTAGE_SIG_FILE) \ $(OPT_SPL_TABLE_FILE) \ $(OPT_MANIFEST) \ - --location $(shell printf "%#x" $(MENDOCINO_FWM_POSITION)) \ + --location $(call _tohex,$(MENDOCINO_FWM_POSITION)) \ --output $@ ifeq ($(CONFIG_CBFS_VERIFICATION)$(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK),yy) @@ -288,8 +288,8 @@ $(obj)/amdfw_a.rom: $(obj)/amdfw.rom $(OPT_SIGNED_AMDFW_A_POSITION) \ $(OPT_SIGNED_AMDFW_A_FILE) \ $(OPT_PSP_LOAD_MP2_FW) \ - --location $(shell printf "%#x" $(MENDOCINO_FW_A_POSITION)) \ - --body-location $(shell printf "%#x" $$(($(MENDOCINO_FW_A_POSITION) + $(MENDOCINO_FW_BODY_OFFSET)))) \ + --location $(call _tohex,$(MENDOCINO_FW_A_POSITION)) \ + --body-location $(call _tohex,$$(($(MENDOCINO_FW_A_POSITION) + $(MENDOCINO_FW_BODY_OFFSET)))) \ --anywhere \ --output $@ @@ -304,8 +304,8 @@ $(obj)/amdfw_b.rom: $(obj)/amdfw.rom $(OPT_SIGNED_AMDFW_B_POSITION) \ $(OPT_SIGNED_AMDFW_B_FILE) \ $(OPT_PSP_LOAD_MP2_FW) \ - --location $(shell printf "%#x" $(MENDOCINO_FW_B_POSITION)) \ - --body-location $(shell printf "%#x" $$(($(MENDOCINO_FW_B_POSITION) + $(MENDOCINO_FW_BODY_OFFSET)))) \ + --location $(call _tohex,$(MENDOCINO_FW_B_POSITION)) \ + --body-location $(call _tohex,$$(($(MENDOCINO_FW_B_POSITION) + $(MENDOCINO_FW_BODY_OFFSET)))) \ --anywhere \ --output $@ diff --git a/src/soc/amd/phoenix/Makefile.inc b/src/soc/amd/phoenix/Makefile.inc index c65c36979a..b15b5d6a47 100644 --- a/src/soc/amd/phoenix/Makefile.inc +++ b/src/soc/amd/phoenix/Makefile.inc @@ -134,14 +134,14 @@ PSP_BIOSBIN_DEST=$(shell $(READELF_bootblock) -Wl $(PSP_ELF_FILE) | grep LOAD | # type = 0x63 - construct APOB NV base/size from flash map # 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, \ +APOB_NV_BASE=$(call _tohex,$(call int-subtract, \ $(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, \ +APOB_NV_RO_BASE=$(call _tohex,$(call int-subtract, \ $(call get_fmap_value,FMAP_SECTION_RECOVERY_MRC_CACHE_START) $(FMAP_FLASH_START))) else APOB_NV_RO_SIZE=$(APOB_NV_SIZE) @@ -263,7 +263,7 @@ $(obj)/amdfw.rom: $(call strip_quotes, $(PSP_BIOSBIN_FILE)) \ $(OPT_VERSTAGE_FILE) \ $(OPT_VERSTAGE_SIG_FILE) \ $(OPT_SPL_TABLE_FILE) \ - --location $(shell printf "%#x" $(PHOENIX_FWM_POSITION)) \ + --location $(call _tohex,$(PHOENIX_FWM_POSITION)) \ --output $@ ifeq ($(CONFIG_AMDFW_SPLIT),y) @@ -288,7 +288,7 @@ $(obj)/amdfw_a.rom: $(obj)/amdfw.rom $(OPT_SPL_RW_AB_TABLE_FILE) \ $(OPT_SIGNED_AMDFW_A_POSITION) \ $(OPT_SIGNED_AMDFW_A_FILE) \ - --location $(shell printf "%#x" $(PHOENIX_FW_A_POSITION)) \ + --location $(call _tohex,$(PHOENIX_FW_A_POSITION)) \ --anywhere \ --output $@ @@ -302,7 +302,7 @@ $(obj)/amdfw_b.rom: $(obj)/amdfw.rom $(OPT_SPL_RW_AB_TABLE_FILE) \ $(OPT_SIGNED_AMDFW_B_POSITION) \ $(OPT_SIGNED_AMDFW_B_FILE) \ - --location $(shell printf "%#x" $(PHOENIX_FW_B_POSITION)) \ + --location $(call _tohex,$(PHOENIX_FW_B_POSITION)) \ --anywhere \ --output $@ diff --git a/src/soc/amd/picasso/Makefile.inc b/src/soc/amd/picasso/Makefile.inc index 1d275b02fb..948e272235 100644 --- a/src/soc/amd/picasso/Makefile.inc +++ b/src/soc/amd/picasso/Makefile.inc @@ -236,7 +236,7 @@ $(obj)/amdfw.rom: $(call strip_quotes, $(PSP_BIOSBIN_FILE)) \ $(OPT_APOB0_NV_BASE) \ $(OPT_VERSTAGE_FILE) \ $(OPT_VERSTAGE_SIG_FILE) \ - --location $(shell printf "%#x" $(PICASSO_FWM_POSITION)) \ + --location $(call _tohex,$(PICASSO_FWM_POSITION)) \ --output $@ $(PSP_BIOSBIN_FILE): $(PSP_ELF_FILE) $(AMDCOMPRESS) @@ -252,7 +252,7 @@ $(obj)/amdfw_a.rom: $(obj)/amdfw.rom $(AMDFW_COMMON_ARGS) \ $(OPT_APOB_NV_SIZE) \ $(OPT_APOB_NV_BASE) \ - --location $(shell printf "%#x" $(PICASSO_FW_A_POSITION)) \ + --location $(call _tohex,$(PICASSO_FW_A_POSITION)) \ --anywhere \ --output $@ @@ -263,7 +263,7 @@ $(obj)/amdfw_b.rom: $(obj)/amdfw.rom $(AMDFW_COMMON_ARGS) \ $(OPT_APOB_NV_SIZE) \ $(OPT_APOB_NV_BASE) \ - --location $(shell printf "%#x" $(PICASSO_FW_B_POSITION)) \ + --location $(call _tohex,$(PICASSO_FW_B_POSITION)) \ --anywhere \ --output $@ diff --git a/src/soc/amd/stoneyridge/Makefile.inc b/src/soc/amd/stoneyridge/Makefile.inc index 65edea048b..33328fa958 100644 --- a/src/soc/amd/stoneyridge/Makefile.inc +++ b/src/soc/amd/stoneyridge/Makefile.inc @@ -137,7 +137,7 @@ $(obj)/amdfw.rom: $(call strip_quotes, $(CONFIG_STONEYRIDGE_XHCI_FWM_FILE)) \ $(OPT_DEBUG_AMDFWTOOL) \ --config $(CONFIG_AMDFW_CONFIG_FILE) \ --flashsize $(CONFIG_ROM_SIZE) \ - --location $(shell printf "0x%x" $(STONEYRIDGE_FWM_POSITION)) \ + --location $(call _tohex,$(STONEYRIDGE_FWM_POSITION)) \ --output $@ ifeq ($(CONFIG_AMDFW_OUTSIDE_CBFS),y) -- cgit v1.2.3