Yidi Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/70344 )
Change subject: soc/mediatek/mt8173: Allow BL31 payload not targeting RAM ......................................................................
soc/mediatek/mt8173: Allow BL31 payload not targeting RAM
selfboot.c blocks the payload that does not target RAM. But MT8173 loads and runs BL31 payload in SRAM. Make the exception by implementing `payload_arch_usable_ram_quirk()`.
TEST=load and initialize BL31 successfully
Change-Id: I8951b1c4673cdae7d1ad0c11d7d6c12376acd328 Signed-off-by: Yidi Lin yidilin@chromium.org --- M src/soc/mediatek/mt8173/soc.c 1 file changed, 27 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/70344/1
diff --git a/src/soc/mediatek/mt8173/soc.c b/src/soc/mediatek/mt8173/soc.c index c1bb621..23c23a4 100644 --- a/src/soc/mediatek/mt8173/soc.c +++ b/src/soc/mediatek/mt8173/soc.c @@ -2,9 +2,20 @@
#include <bootmem.h> #include <device/device.h> +#include <program_loading.h> #include <symbols.h> #include <soc/emi.h>
+int payload_arch_usable_ram_quirk(uint64_t start, uint64_t size) +{ + if (start < 0x130000 && (start + size) <= 0x130000) { + printk(BIOS_DEBUG, "MT8173 uses SRAM for loading BL31.\n"); + return 1; + } + + return 0; +} + void bootmem_platform_add_ranges(void) { bootmem_add_range(0x101000, 124 * KiB, BM_MEM_BL31);