feat(mt8188): add support for SMC from OP-TEE
- Add MTK_SIP_SMC_FROM_S_EL1_TABLE to handle the SMC call from OP-TEE.
- Register optee for EMI MPU.
Change-Id: Ie94542f0e3966c4c25f2b7233b9355d41f8f36a5
diff --git a/plat/mediatek/drivers/emi_mpu/emi_mpu_common.c b/plat/mediatek/drivers/emi_mpu/emi_mpu_common.c
index bf77791..7eeadec 100644
--- a/plat/mediatek/drivers/emi_mpu/emi_mpu_common.c
+++ b/plat/mediatek/drivers/emi_mpu/emi_mpu_common.c
@@ -7,6 +7,8 @@
#include <string.h>
#include <common/debug.h>
#include <lib/mmio.h>
+#include <smccc_helpers.h>
+
#include <emi_mpu.h>
#include <lib/mtk_init/mtk_init.h>
#include <mtk_sip_svc.h>
@@ -116,7 +118,10 @@
u_register_t x3, u_register_t x4,
void *handle, struct smccc_res *smccc_ret)
{
- /* TODO: implement emi mpu handler */
+ int ret;
+
+ ret = emi_mpu_optee_handler(x1, x2, x3);
+ SMC_RET2(handle, ret, 0U);
return 0;
}