diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/mediatek/mt8173/soc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8173/soc.c b/src/soc/mediatek/mt8173/soc.c index c1bb6212d1..ebdf4e5420 100644 --- a/src/soc/mediatek/mt8173/soc.c +++ b/src/soc/mediatek/mt8173/soc.c @@ -2,9 +2,23 @@ #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 (size > REGION_SIZE(sram)) + return 0; + + if (start >= (uintptr_t)_sram && (start + size) <= (uintptr_t)_esram) { + 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); |