3 * (C) COPYRIGHT 2015 ARM Limited. All rights reserved.
5 * This program is free software and is provided to you under the terms of the
6 * GNU General Public License version 2 as published by the Free Software
7 * Foundation, and any use by you of this program is subject to the terms
10 * A copy of the licence is included with the program, and can also be obtained
11 * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
12 * Boston, MA 02110-1301, USA.
25 #include <mali_kbase.h>
27 #define SMC_FAST_CALL (1 << 31)
28 #define SMC_64 (1 << 30)
30 #define SMC_OEN_OFFSET 24
31 #define SMC_OEN_MASK (0x3F << SMC_OEN_OFFSET) /* 6 bits */
32 #define SMC_OEN_SIP (2 << SMC_OEN_OFFSET)
33 #define SMC_OEN_STD (4 << SMC_OEN_OFFSET)
37 * kbase_invoke_smc_fid - Perform a secure monitor call
38 * @fid: The SMC function to call, see SMC Calling convention.
39 * @arg0: First argument to the SMC.
40 * @arg1: Second argument to the SMC.
41 * @arg2: Third argument to the SMC.
43 * See SMC Calling Convention for details.
45 * Return: the return value from the SMC.
47 u64 kbase_invoke_smc_fid(u32 fid, u64 arg0, u64 arg1, u64 arg2);
50 * kbase_invoke_smc_fid - Perform a secure monitor call
51 * @oen: Owning Entity number (SIP, STD etc).
52 * @function_number: The function number within the OEN.
53 * @smc64: use SMC64 calling convention instead of SMC32.
54 * @arg0: First argument to the SMC.
55 * @arg1: Second argument to the SMC.
56 * @arg2: Third argument to the SMC.
58 * See SMC Calling Convention for details.
60 * Return: the return value from the SMC call.
62 u64 kbase_invoke_smc(u32 oen, u16 function_number, bool smc64,
63 u64 arg0, u64 arg1, u64 arg2);
65 #endif /* CONFIG_ARM64 */
67 #endif /* _KBASE_SMC_H_ */