soc/amd/stoneyridge: Update AMD firmware placement options

- Don't force the selection of placing the firmware outside of cbfs
when using vboot.
- Set a prompt to allow the option of placing it outside of  cbfs.
- Leave all Kconfig defaults the same.
- Place the AMD firmware directory table in the specified location
even when using the 'outside of cbfs" option.
- Print where the firmware is being placed when placing it outside
of cbfs.

BUG=b:65484600
TEST=Assign PSP firmware location, build & test.  Firmware shows up
inside CBFS.  Set 'outside of cbfs' option, verify firmware gets
written to the correct location.

Change-Id: Ia8258b5c2ecfaaa42d623e3376ec3233115aed58
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/21867
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Martin Roth 2017-10-03 15:54:45 -06:00
parent fc9d5011a9
commit 30f9b953a8
2 changed files with 18 additions and 10 deletions

View File

@ -60,7 +60,6 @@ config CPU_SPECIFIC_OPTIONS
select SSE2 select SSE2
config VBOOT config VBOOT
select AMDFW_OUTSIDE_CBFS
select VBOOT_SEPARATE_VERSTAGE select VBOOT_SEPARATE_VERSTAGE
select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_STARTS_IN_BOOTBLOCK
select VBOOT_SAVE_RECOVERY_REASON_ON_REBOOT select VBOOT_SAVE_RECOVERY_REASON_ON_REBOOT
@ -253,13 +252,6 @@ config STONEYRIDGE_LEGACY_FREE
Select y if there is no keyboard controller in the system. Select y if there is no keyboard controller in the system.
This sets variables in AGESA and ACPI. This sets variables in AGESA and ACPI.
config AMDFW_OUTSIDE_CBFS
def_bool n
help
The AMDFW (PSP) is typically locatable in cbfs. Select this
option to manually attach the generated amdfw.rom at an
offset of 0x20000 from the bottom of the coreboot ROM image.
config SERIRQ_CONTINUOUS_MODE config SERIRQ_CONTINUOUS_MODE
bool bool
default n default n
@ -310,6 +302,14 @@ config USE_PSPSCUREOS
If unsure, answer 'y' If unsure, answer 'y'
config AMDFW_OUTSIDE_CBFS
bool "The AMD firmware is outside CBFS"
default n
help
The AMDFW (PSP) is typically locatable in cbfs. Select this
option to manually attach the generated amdfw.rom outside of
cbfs. The location is selected by the FWM position.
config AMD_FWM_POSITION_INDEX config AMD_FWM_POSITION_INDEX
int "Firmware Directory Table location (0 to 5)" int "Firmware Directory Table location (0 to 5)"
range 0 5 range 0 5

View File

@ -248,10 +248,18 @@ ifeq ($(CONFIG_AMDFW_OUTSIDE_CBFS),y)
PHONY+=add_amdfw PHONY+=add_amdfw
INTERMEDIATE+=add_amdfw INTERMEDIATE+=add_amdfw
# Calculate firmware position inside the ROM
STONEYRIDGE_FWM_ROM_POSITION=$(call int-add, \
$(call int-subtract, $(CONFIG_ROM_SIZE) \
$(call int-shift-left, \
0x80000 $(CONFIG_AMD_FWM_POSITION_INDEX))) 0x20000)
add_amdfw: $(obj)/coreboot.pre $(obj)/amdfw.rom add_amdfw: $(obj)/coreboot.pre $(obj)/amdfw.rom
printf " DD Adding AMD Firmware\n" printf " DD Adding AMD Firmware at ROM offset 0x%x\n" \
"$(STONEYRIDGE_FWM_ROM_POSITION)"
dd if=$(obj)/amdfw.rom \ dd if=$(obj)/amdfw.rom \
of=$(obj)/coreboot.pre conv=notrunc bs=1 seek=131072 >/dev/null 2>&1 of=$(obj)/coreboot.pre conv=notrunc bs=1 \
seek=$(STONEYRIDGE_FWM_ROM_POSITION) >/dev/null 2>&1
else # ifeq ($(CONFIG_AMDFW_OUTSIDE_CBFS),y) else # ifeq ($(CONFIG_AMDFW_OUTSIDE_CBFS),y)