From c842cc0e5d1432a681cbddce62a852ff282169ae Mon Sep 17 00:00:00 2001 From: Bo-Chen Chen Date: Tue, 6 Dec 2022 15:22:33 +0800 Subject: [PATCH] feat(mediatek): add SMC handler for EMI MPU EMI MPU will handle the SMC call from optee, so we need to add this patch to support it. Signed-off-by: Bo-Chen Chen Signed-off-by: jason-ch chen Change-Id: I22e128c4246814cbd5855f51a26e4e11ccfe3a6b --- plat/mediatek/drivers/emi_mpu/emi_mpu_common.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plat/mediatek/drivers/emi_mpu/emi_mpu_common.c b/plat/mediatek/drivers/emi_mpu/emi_mpu_common.c index 27b2b07f9..bf777912d 100644 --- a/plat/mediatek/drivers/emi_mpu/emi_mpu_common.c +++ b/plat/mediatek/drivers/emi_mpu/emi_mpu_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2022-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -9,6 +9,7 @@ #include #include #include +#include #if ENABLE_EMI_MPU_SW_LOCK static unsigned char region_lock_state[EMI_MPU_REGION_NUM]; @@ -111,6 +112,16 @@ int emi_mpu_set_protection(struct emi_region_info_t *region_info) return 0; } +u_register_t mtk_emi_mpu_sip_handler(u_register_t x1, u_register_t x2, + u_register_t x3, u_register_t x4, + void *handle, struct smccc_res *smccc_ret) +{ + /* TODO: implement emi mpu handler */ + + return 0; +} +DECLARE_SMC_HANDLER(MTK_SIP_TEE_MPU_PERM_SET, mtk_emi_mpu_sip_handler); + int emi_mpu_init(void) { INFO("[%s] emi mpu initialization\n", __func__); -- 2.39.5