Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/57320 )
Change subject: [WIP] soc/amd/picasso: introduce AMD_SOC_SEPARATE_EFS_SECTION ......................................................................
[WIP] soc/amd/picasso: introduce AMD_SOC_SEPARATE_EFS_SECTION
On systems that use the first 128kByte of the SPI flash for the EC firmware, it is not possible to place the EFS/amdfw part at the lowest location in flash where the on-chip PSP firmware will look for the EFS, since this is at an offset of 128kByte into the flash which is where the cbfs master header resides when the main CBFS is placed right after the EC firmware. This patch introduces the AMD_SOC_SEPARATE_EFS_SECTION option that allows putting the EFS in a separate FMAP section that can be located right after the EC firmware FMAP section.
TODO: check if the EFS FMAP partition begins at the expected location
TEST=Mandolin which only uses one CBFS still boots. The case with RO/A/B CBFS isn't tested.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I88824e4d0c1ead203f46f8cd64e1d1b4f1aa6cf7 --- M src/soc/amd/picasso/Kconfig M src/soc/amd/picasso/Makefile.inc 2 files changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/57320/1
diff --git a/src/soc/amd/picasso/Kconfig b/src/soc/amd/picasso/Kconfig index addff5e..e079cd6 100644 --- a/src/soc/amd/picasso/Kconfig +++ b/src/soc/amd/picasso/Kconfig @@ -457,6 +457,14 @@
endmenu
+config AMD_SOC_SEPARATE_EFS_SECTION + bool + help + Use separate EFS FMAP section instead of putting EFS into CBFS. The + FMAP section must begin exactly at the location the EFS needs to be + placed in the flash. This option can be used to place the EFS right + after the 128kByte EC firmware at the beginning of the flash. + config VBOOT select VBOOT_VBNV_CMOS select VBOOT_VBNV_CMOS_BACKUP_TO_FLASH diff --git a/src/soc/amd/picasso/Makefile.inc b/src/soc/amd/picasso/Makefile.inc index d873079..b2d3071 100644 --- a/src/soc/amd/picasso/Makefile.inc +++ b/src/soc/amd/picasso/Makefile.inc @@ -268,10 +268,19 @@ --anywhere \ --output $@
+ifeq ($(CONFIG_AMD_SOC_SEPARATE_EFS_SECTION),y) +$(call add_intermediate, amdfw_fmap_section) +#FWM_POSITION_BASE=$(shell printf "%#x" $(PICASSO_FWM_POSITION)) +#EFS_SECTION_BASE=$(shell awk '$$2 == "FMAP_SECTION_EFS_START" {print $$3}' $(obj)/fmap_config.h) +#TODO: error out if FWM_POSITION_BASE != EFS_SECTION_BASE; depends on $(obj)/fmap_config.h bing generated though +amdfw_fmap_section: $(obj)/coreboot.pre $(obj)/amdfw.rom $(obj)/fmap_config.h + $(CBFSTOOL) $(obj)/coreboot.pre write -r EFS -f $(obj)/amdfw.rom --fill-upward +else # CONFIG_AMD_SOC_SEPARATE_EFS_SECTION cbfs-files-y += apu/amdfw apu/amdfw-file := $(obj)/amdfw.rom apu/amdfw-position := $(PICASSO_FWM_POSITION) apu/amdfw-type := raw +endif # CONFIG_AMD_SOC_SEPARATE_EFS_SECTION
ifeq ($(CONFIG_VBOOT_SLOTS_RW_AB)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy) cbfs-files-y += apu/amdfw_a