soc/amd/stoney: Allow alternative placement for AMD FW directory
Allow the AMD FW directory to be placed at one of the alternative locations within the ROM. BUG=b:65484600 TEST=Assign PSP firmware location, build & test. Change-Id: I9c95b9805c60ab6204750f7929049c7382e0c6cd Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/21456 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
parent
ca3e121607
commit
6d8ef24566
|
@ -310,4 +310,37 @@ config USE_PSPSCUREOS
|
||||||
|
|
||||||
If unsure, answer 'y'
|
If unsure, answer 'y'
|
||||||
|
|
||||||
|
config AMD_FWM_POSITION_INDEX
|
||||||
|
int "Firmware Directory Table location (0 to 5)"
|
||||||
|
range 0 5
|
||||||
|
default 0 if BOARD_ROMSIZE_KB_512
|
||||||
|
default 1 if BOARD_ROMSIZE_KB_1024
|
||||||
|
default 2 if BOARD_ROMSIZE_KB_2048
|
||||||
|
default 3 if BOARD_ROMSIZE_KB_4096
|
||||||
|
default 4 if BOARD_ROMSIZE_KB_8192
|
||||||
|
default 5 if BOARD_ROMSIZE_KB_16384
|
||||||
|
help
|
||||||
|
Typically this is calculated by the ROM size, but there may
|
||||||
|
be situations where you want to put the firmware directory
|
||||||
|
table in a different location.
|
||||||
|
0: 512 KB - 0xFFFA0000
|
||||||
|
1: 1 MB - 0xFFF20000
|
||||||
|
2: 2 MB - 0xFFE20000
|
||||||
|
3: 4 MB - 0xFFC20000
|
||||||
|
4: 8 MB - 0xFF820000
|
||||||
|
5: 16 MB - 0xFF020000
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
endif # SOC_AMD_STONEYRIDGE_FP4 || SOC_AMD_STONEYRIDGE_FT4
|
endif # SOC_AMD_STONEYRIDGE_FP4 || SOC_AMD_STONEYRIDGE_FT4
|
||||||
|
|
|
@ -101,7 +101,8 @@ CPPFLAGS_common += -I$(src)/soc/amd/stoneyridge
|
||||||
CPPFLAGS_common += -I$(src)/soc/amd/stoneyridge/include
|
CPPFLAGS_common += -I$(src)/soc/amd/stoneyridge/include
|
||||||
CPPFLAGS_common += -I$(src)/soc/amd/stoneyridge/acpi
|
CPPFLAGS_common += -I$(src)/soc/amd/stoneyridge/acpi
|
||||||
|
|
||||||
# ROMSIG At ROMBASE + 0x20000:
|
# ROMSIG Normally At ROMBASE + 0x20000
|
||||||
|
# Overridden by CONFIG_AMD_FWM_POSITION_INDEX
|
||||||
# +-----------+---------------+----------------+------------+
|
# +-----------+---------------+----------------+------------+
|
||||||
# |0x55AA55AA |EC ROM Address |GEC ROM Address |USB3 ROM |
|
# |0x55AA55AA |EC ROM Address |GEC ROM Address |USB3 ROM |
|
||||||
# +-----------+---------------+----------------+------------+
|
# +-----------+---------------+----------------+------------+
|
||||||
|
@ -109,7 +110,10 @@ CPPFLAGS_common += -I$(src)/soc/amd/stoneyridge/acpi
|
||||||
# +-----------+
|
# +-----------+
|
||||||
#
|
#
|
||||||
# EC ROM should be 64K aligned.
|
# EC ROM should be 64K aligned.
|
||||||
STONEYRIDGE_FWM_POSITION=$(call int-add, $(call int-subtract, 0xffffffff $(CONFIG_ROM_SIZE)) 0x20000 1)
|
STONEYRIDGE_FWM_POSITION=$(call int-add, \
|
||||||
|
$(call int-subtract, 0xffffffff \
|
||||||
|
$(call int-shift-left, \
|
||||||
|
0x80000 $(CONFIG_AMD_FWM_POSITION_INDEX))) 0x20000 1)
|
||||||
|
|
||||||
### 0
|
### 0
|
||||||
FIRMWARE_LOCATE=$(dir $(call strip_quotes, $(CONFIG_AMD_PUBKEY_FILE)))
|
FIRMWARE_LOCATE=$(dir $(call strip_quotes, $(CONFIG_AMD_PUBKEY_FILE)))
|
||||||
|
|
Loading…
Reference in New Issue