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>
This commit is contained in:
parent
6bc06983ed
commit
69cef8e694
|
@ -41,13 +41,19 @@ DEP_FILES = $(patsubst %,$(FIRMWARE_LOCATION)/%, $(AMDFW_CFG_IN_FW_LOC)) \
|
|||
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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue