From 0d01d069123e8943e19e2c6c345052c40069e19a Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Wed, 19 Jun 2024 15:14:29 +0800 Subject: soc/mediatek/mt8188: Respect ARM64_BL31_OPTEE_WITH_SMC option Since BL31_MAKEARGS is already handled in arm64/Makefile.mk, remove the duplication from mt8188/Makefile.mk. In addition, reserve the memory range for running OP-TEE only if ARM64_BL31_OPTEE_WITH_SMC is enabled. BUG=b:347851571 TEST=emerge-geralt coreboot BRANCH=geralt Change-Id: I88a9a07a685a6c9fe9739b6101ccb8a5ce23fd8b Signed-off-by: Yu-Ping Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/83128 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/soc/mediatek/mt8188/soc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/soc/mediatek/mt8188/soc.c') diff --git a/src/soc/mediatek/mt8188/soc.c b/src/soc/mediatek/mt8188/soc.c index e7124ba14e..f2911aec10 100644 --- a/src/soc/mediatek/mt8188/soc.c +++ b/src/soc/mediatek/mt8188/soc.c @@ -21,7 +21,8 @@ void bootmem_platform_add_ranges(void) { if (CONFIG(MTK_DFD)) bootmem_add_range(DFD_DUMP_ADDRESS, DFD_DUMP_SIZE, BM_MEM_RESERVED); - bootmem_add_range(OPTEE_ADDRESS, OPTEE_SIZE, BM_MEM_RESERVED); + if (CONFIG(ARM64_BL31_OPTEE_WITH_SMC)) + bootmem_add_range(OPTEE_ADDRESS, OPTEE_SIZE, BM_MEM_RESERVED); } static void soc_read_resources(struct device *dev) -- cgit v1.2.3