Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/72961?usp=email )
Change subject: amd/soc/common: Use relative offset for AMDFW ......................................................................
amd/soc/common: Use relative offset for AMDFW
The amdfw.rom is mostly in region COREBOOT. Calculate the relative address as the CBFS module address. That is for future 32M flash size support.
TEST=binary identical test on amd/birman amd/majolica amd/gardenia amd/mayan amd/bilby amd/mandolin amd/chausie amd/pademelon pcengines/apu2 google/skyrim google/guybrush google/zork google/kahlee google/myst
This commit is part of a series of patches to support 32/64M flash. BUG=b:255374782
Change-Id: I2add8e4e6755e582b3be6a150cf83d1468f2f1be Signed-off-by: Zheng Bao fishbaozi@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/72961 Reviewed-by: Fred Reitberger reitbergerfred@gmail.com Reviewed-by: Felix Held felix-coreboot@felixheld.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/amd/common/Makefile.inc 1 file changed, 9 insertions(+), 3 deletions(-)
Approvals: Felix Held: Looks good to me, approved Fred Reitberger: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/src/soc/amd/common/Makefile.inc b/src/soc/amd/common/Makefile.inc index e388305..78ab4ff 100644 --- a/src/soc/amd/common/Makefile.inc +++ b/src/soc/amd/common/Makefile.inc @@ -41,13 +41,19 @@ amd_microcode_bins += $(wildcard ${FIRMWARE_LOCATION}/*UcodePatch_*.bin)
ifeq ($(CONFIG_RESET_VECTOR_IN_RAM),y) -$(objcbfs)/bootblock.bin: $(obj)/amdfw.rom +$(objcbfs)/bootblock.bin: $(obj)/amdfw.rom $(obj)/fmap_config.h cp $< $@
+amdfw_region_start=$(subst $(spc),,FMAP_SECTION_$(call regions-for-file,apu/amdfw)_START) +amdfw_offset=$(call int-subtract, \ + $(CONFIG_AMD_FWM_POSITION) \ + $(call int-subtract, \ + $(call get_fmap_value,$(amdfw_region_start)) \ + $(call get_fmap_value,FMAP_SECTION_FLASH_START))) + add_bootblock = \ $(CBFSTOOL) $(1) add -f $(2) -n apu/amdfw -t amdfw \ - -b $(call int-add, \ - $(call int-subtract, 0xffffffff $(CONFIG_ROM_SIZE)) 1 $(CONFIG_AMD_FWM_POSITION)) + -b $(amdfw_offset) -r $(call regions-for-file,apu/amdfw)
endif # ifeq ($(CONFIG_RESET_VECTOR_IN_RAM),y)