Attention is currently required from: Jason Glenesk, Raul Rangel, Matt DeVillier, Zheng Bao, Fred Reitberger, Felix Held.
Hello Zheng Bao,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/72961
to review the following change.
Change subject: amd/soc/common: Use relative offset for AMDFW ......................................................................
amd/soc/common: Use relative offset for AMDFW
The amdfw.rom is 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/majolica amd/birman amd/mandolin amd/gardenia
Change-Id: I2add8e4e6755e582b3be6a150cf83d1468f2f1be Signed-off-by: Zheng Bao fishbaozi@gmail.com --- M src/soc/amd/common/Makefile.inc 1 file changed, 24 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/72961/1
diff --git a/src/soc/amd/common/Makefile.inc b/src/soc/amd/common/Makefile.inc index e88b6ee..3a89406 100644 --- a/src/soc/amd/common/Makefile.inc +++ b/src/soc/amd/common/Makefile.inc @@ -16,13 +16,18 @@ 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_offset=$(call int-subtract, \ + $(CONFIG_AMD_FWM_POSITION) \ + $(call int-subtract, \ + $(shell awk '$$2 == "FMAP_SECTION_COREBOOT_START" {print $$3}' $(obj)/fmap_config.h) \ + $(shell awk '$$2 == "FMAP_SECTION_FLASH_START" {print $$3}' $(obj)/fmap_config.h))) + 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)
endif # ifeq ($(CONFIG_RESET_VECTOR_IN_RAM),y)