mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-14 06:35:12 +00:00
4e508b259e
For concerns about security, the register to enable/disable IOMMU of SMI LARB should only be configured in secure world. Thus, we add some SMC command for multimedia master to enable/disable MM IOMMU in ATF by setting the register of SMI LARB. This function is prepared for MT8188. Signed-off-by: Chengci.Xu <chengci.xu@mediatek.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220817124608.10062-4-chengci.xu@mediatek.com
28 lines
743 B
C
28 lines
743 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2019 MediaTek Inc.
|
|
*/
|
|
#ifndef __MTK_SIP_SVC_H
|
|
#define __MTK_SIP_SVC_H
|
|
|
|
/* Error Code */
|
|
#define SIP_SVC_E_SUCCESS 0
|
|
#define SIP_SVC_E_NOT_SUPPORTED -1
|
|
#define SIP_SVC_E_INVALID_PARAMS -2
|
|
#define SIP_SVC_E_INVALID_RANGE -3
|
|
#define SIP_SVC_E_PERMISSION_DENIED -4
|
|
|
|
#ifdef CONFIG_ARM64
|
|
#define MTK_SIP_SMC_CONVENTION ARM_SMCCC_SMC_64
|
|
#else
|
|
#define MTK_SIP_SMC_CONVENTION ARM_SMCCC_SMC_32
|
|
#endif
|
|
|
|
#define MTK_SIP_SMC_CMD(fn_id) \
|
|
ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, MTK_SIP_SMC_CONVENTION, \
|
|
ARM_SMCCC_OWNER_SIP, fn_id)
|
|
|
|
/* IOMMU related SMC call */
|
|
#define MTK_SIP_KERNEL_IOMMU_CONTROL MTK_SIP_SMC_CMD(0x514)
|
|
|
|
#endif
|