diff options
author | Zheng Bao <fishbaozi@gmail.com> | 2023-02-14 13:26:31 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-09-01 11:47:15 +0000 |
commit | 6bc06983ed1d6c545056b584eabc2f7864cb39cd (patch) | |
tree | 85e01a12ae0de1e768747bc3760ff9300faf517e /src/soc/amd/phoenix | |
parent | d0de6c2183af5f6c435e53632fe92793be4d3783 (diff) |
util/amdfwtool: Deal with psp position in flash offset directly
It is based on work by Arthur Heymans, 69852.
Get rid of the confusing "position index" and use the relative flash
offset as the Kconfig setting instead.
TEST=binary identical 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
(The test should be done with INCLUDE_CONFIG_FILE=n)
Change-Id: I26bde0b7c70efe9f5762109f431329ea7f95b7f2
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72939
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/soc/amd/phoenix')
-rw-r--r-- | src/soc/amd/phoenix/Kconfig | 17 | ||||
-rw-r--r-- | src/soc/amd/phoenix/Makefile.inc | 9 |
2 files changed, 1 insertions, 25 deletions
diff --git a/src/soc/amd/phoenix/Kconfig b/src/soc/amd/phoenix/Kconfig index 6bed749731..7f6f879cd8 100644 --- a/src/soc/amd/phoenix/Kconfig +++ b/src/soc/amd/phoenix/Kconfig @@ -312,23 +312,6 @@ config DISABLE_KEYBOARD_RESET_PIN menu "PSP Configuration Options" -config AMD_FWM_POSITION_INDEX - int - default 5 - -comment "AMD Firmware Directory Table set to location for 512KB ROM" - depends on AMD_FWM_POSITION_INDEX = 0 -comment "AMD Firmware Directory Table set to location for 1MB ROM" - depends on AMD_FWM_POSITION_INDEX = 1 -comment "AMD Firmware Directory Table set to location for 2MB ROM" - depends on AMD_FWM_POSITION_INDEX = 2 -comment "AMD Firmware Directory Table set to location for 4MB ROM" - depends on AMD_FWM_POSITION_INDEX = 3 -comment "AMD Firmware Directory Table set to location for 8MB ROM" - depends on AMD_FWM_POSITION_INDEX = 4 -comment "AMD Firmware Directory Table set to location for 16MB ROM" - depends on AMD_FWM_POSITION_INDEX = 5 - config AMDFW_CONFIG_FILE string "AMD PSP Firmware config file" default "src/soc/amd/phoenix/fw.cfg" diff --git a/src/soc/amd/phoenix/Makefile.inc b/src/soc/amd/phoenix/Makefile.inc index 852934ffb3..344ece4e15 100644 --- a/src/soc/amd/phoenix/Makefile.inc +++ b/src/soc/amd/phoenix/Makefile.inc @@ -47,19 +47,12 @@ CPPFLAGS_common += -I$(src)/vendorcode/amd/fsp/phoenix CPPFLAGS_common += -I$(src)/vendorcode/amd/fsp/common # ROMSIG Normally At ROMBASE + 0x20000 -# Overridden by CONFIG_AMD_FWM_POSITION_INDEX # +-----------+---------------+----------------+------------+ # |0x55AA55AA | | | | # +-----------+---------------+----------------+------------+ # | | PSPDIR ADDR | BIOSDIR ADDR | # +-----------+---------------+----------------+ -$(if $(CONFIG_AMD_FWM_POSITION_INDEX), ,\ - $(error Invalid AMD firmware position index. Check if the board sets a valid ROM size)) - -# Fixed EFS location -PHOENIX_FWM_POSITION=0xff020000 - # 0x40 accounts for the cbfs_file struct + filename + metadata structs, aligned to 64 bytes # Building the cbfs image will fail if the offset isn't large enough AMD_FW_AB_POSITION := 0x40 @@ -269,7 +262,7 @@ $(obj)/amdfw.rom: $(call strip_quotes, $(PSP_BIOSBIN_FILE)) \ $(OPT_VERSTAGE_SIG_FILE) \ $(OPT_SPL_TABLE_FILE) \ $(OPT_MANIFEST) \ - --location $(call _tohex,$(PHOENIX_FWM_POSITION)) \ + --location $(CONFIG_AMD_FWM_POSITION) \ --output $@ ifeq ($(CONFIG_AMDFW_SPLIT),y) |