Martin Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/51300 )
Change subject: soc/amd/picasso: Fix PSP_SHAREDMEM_BASE ......................................................................
soc/amd/picasso: Fix PSP_SHAREDMEM_BASE
PSP_SHAREDMEM_BASE made the assumption that _psp_sharedmem_dram would only match once. With CB:49332 there are now two symbols, and it was grabbing the wrong one.
This change makes it so we match the exact symbol. It also switches to using awk to simplify the code.
The bootblock.elf target that is added to the list of prerequisites also creates the bootblock.map file that gets used to extract the base address of the _psp_sharedmem_dram symbol.
BUG=b:181354692 TEST=Boot zork past bootblock
Fixes: 82d16b150ce3 ("memlayout: Store region sizes as separate symbols") Suggested-by: Julius Werner jwerner@chromium.org Signed-off-by: Raul E Rangel rrangel@chromium.org Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I79675bd73f964282b54bca858830e26de64037c7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/51300 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Julius Werner jwerner@chromium.org --- M src/soc/amd/picasso/Makefile.inc 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved Raul Rangel: Looks good to me, but someone else must approve
diff --git a/src/soc/amd/picasso/Makefile.inc b/src/soc/amd/picasso/Makefile.inc index 6b8285c..b7e5071 100644 --- a/src/soc/amd/picasso/Makefile.inc +++ b/src/soc/amd/picasso/Makefile.inc @@ -137,8 +137,7 @@ # type = 0x6B - PSP Shared memory location ifneq ($(CONFIG_PSP_SHAREDMEM_SIZE),0x0) PSP_SHAREDMEM_SIZE=$(CONFIG_PSP_SHAREDMEM_SIZE) -_PSP_SHAREDMEM_BASE=$(shell grep _psp_sharedmem_dram $(obj)/cbfs/$(CONFIG_CBFS_PREFIX)/bootblock.map | cut -f1 -d' ') -PSP_SHAREDMEM_BASE=$(shell printf "0x%s" $(_PSP_SHAREDMEM_BASE)) +PSP_SHAREDMEM_BASE=$(shell awk '$$3 == "_psp_sharedmem_dram" {printf "0x" $$1}' $(objcbfs)/bootblock.map) endif
# type = 0x52 - PSP Bootloader Userspace Application (verstage) @@ -225,7 +224,8 @@ $$(PSP_APCB_FILES) \ $(DEP_FILES) \ $(AMDFWTOOL) \ - $(obj)/fmap_config.h + $(obj)/fmap_config.h \ + $(objcbfs)/bootblock.elf # this target also creates the .map file $(if $(PSP_APCB_FILES), ,$(error APCB_SOURCES is not set)) rm -f $@ @printf " AMDFWTOOL $(subst $(obj)/,,$(@))\n"