Attention is currently required from: Jason Glenesk, Matt DeVillier, Zheng Bao, Fred Reitberger, Felix Held.
Hello Zheng Bao,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/69150
to review the following change.
Change subject: soc/amd/morgana: Add 32M support ......................................................................
soc/amd/morgana: Add 32M support
The 32M has to be divided into 2 16M parts, top and bottom. We can only map one part at one time. By default, the bottom 16M is mapped to 0xFF000000-0xFFFFFFFF. By this default setting, the address in the image is not the actual phyical address. So we need to convert the address, or map the upper 16M instead (the easier way UEFI BIOS does). So we push all the modules with running code, like romstage, ramstage, even the fmap table, to upper 16M. For the bootblock part, which is loaded by bootloader, it is unchanged as a tiny relocatable image in bottom 16M in amdfw.rom.
Since the amdfw.rom is not in CFBS, we put it in fmap.
We put only EC FWs and PSP FWs in the botttom, where the PSP can load.
If coreboot need to access bottom 16M, which in fact doesn't seem to be necessary, can be implimented by SMN command.
The bit 15 of soft fuse decides which (top or bottom) 16M is mapped to 4G-16M.
BUG=b:255374782
Change-Id: Ia0b5a75f828033b29c378bed9a939b23d7f19140 Signed-off-by: Zheng Bao fishbaozi@gmail.com --- M src/mainboard/amd/birman/board.fmd M src/soc/amd/morgana/Makefile.inc 2 files changed, 43 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/69150/1
diff --git a/src/mainboard/amd/birman/board.fmd b/src/mainboard/amd/birman/board.fmd index 6c6ad92..6eff85c 100644 --- a/src/mainboard/amd/birman/board.fmd +++ b/src/mainboard/amd/birman/board.fmd @@ -1,8 +1,9 @@ -FLASH@0xFF000000 16M { +FLASH@0xFE000000 32M { BIOS { EC 4K + AMDFW @128K 13M + FMAP @16M 4K RW_MRC_CACHE 120K - FMAP 4K COREBOOT(CBFS) } } diff --git a/src/soc/amd/morgana/Makefile.inc b/src/soc/amd/morgana/Makefile.inc index f4243bc..e82f29a 100644 --- a/src/soc/amd/morgana/Makefile.inc +++ b/src/soc/amd/morgana/Makefile.inc @@ -114,6 +114,10 @@ # Use additional Soft Fuse bits specified in Kconfig PSP_SOFTFUSE_BITS += $(call strip_quotes, $(CONFIG_PSP_SOFTFUSE_BITS))
+ifeq ($(CONFIG_COREBOOT_ROMSIZE_KB_32768),y) +PSP_SOFTFUSE_BITS += 15 +endif + # type = 0x3a ifeq ($(CONFIG_HAVE_PSP_WHITELIST_FILE),y) PSP_WHITELIST_FILE=$(CONFIG_PSP_WHITELIST_FILE) @@ -297,11 +301,9 @@ --anywhere \ --output $@
- -cbfs-files-y += apu/amdfw -apu/amdfw-file := $(obj)/amdfw.rom -apu/amdfw-position := $(MORGANA_FWM_POSITION) -apu/amdfw-type := raw +$(call add_intermediate, add_amdfw, $(obj)/amdfw.rom) + printf " DD Adding AMD Firmware\n" + $(CBFSTOOL) $(obj)/coreboot.pre write -r AMDFW -f $(obj)/amdfw.rom --fill-upward
ifeq ($(CONFIG_VBOOT_SLOTS_RW_AB)$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),yy) cbfs-files-y += apu/amdfw_a