soc/mediatek/mt8196: Add mtk-fsp loader in romstage

Reserve 64KB memory at 0x02140000 for mtk_fsp_romstage.elf.

BUG=b:373797027
TEST=build pass

Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Change-Id: I73710227e6d9e3f0c717e17db0cc798265eb1f72
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86014
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Jarried Lin 2025-01-16 13:59:58 +08:00 committed by Yidi Lin
commit 194d0c45de
3 changed files with 12 additions and 0 deletions

View file

@ -18,6 +18,9 @@
_ = ASSERT(size % 4K == 0, \
"DRAM DMA buffer should be multiple of smallest page size (4K)!");
#define FSP_ROMSTAGE_INIT_CODE(addr, size) \
REGION(fsp_romstage_init_code, addr, size, 64K)
#define FSP_RAMSTAGE_INIT_CODE(addr, size) \
REGION(fsp_ramstage_init_code, addr, size, 64K)

View file

@ -97,6 +97,14 @@ $(DRAM_CBFS)-type := stage
$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
cbfs-files-y += $(DRAM_CBFS)
FSP_ROMSTAGE_CBFS := $(CONFIG_CBFS_PREFIX)/mtk_fsp_romstage
$(FSP_ROMSTAGE_CBFS)-file := $(MT8196_BLOB_DIR)/mtk_fsp_romstage.elf
$(FSP_ROMSTAGE_CBFS)-type := stage
$(FSP_ROMSTAGE_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
ifneq ($(wildcard $($(FSP_ROMSTAGE_CBFS)-file)),)
cbfs-files-y += $(FSP_ROMSTAGE_CBFS)
endif
FSP_RAMSTAGE_CBFS := $(CONFIG_CBFS_PREFIX)/mtk_fsp_ramstage
$(FSP_RAMSTAGE_CBFS)-file := $(MT8196_BLOB_DIR)/mtk_fsp_ramstage.elf
$(FSP_RAMSTAGE_CBFS)-type := stage

View file

@ -57,6 +57,7 @@ SECTIONS
OVERLAP_DECOMPRESSOR_VERSTAGE_ROMSTAGE(0x02096000, 272K)
PRERAM_CBFS_CACHE(0x020DA000, 48K)
PRERAM_CBMEM_CONSOLE(0x020E6000, 340K)
FSP_ROMSTAGE_INIT_CODE(0x02140000, 64K)
SRAM_L2C_END(0x02200000)
DRAM_START(0x80000000)