1 /*
2  * Copyright (c) 2006-2019, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  */
9 #ifndef __SMCCC_H__
10 #define __SMCCC_H__
11 
12 /**
13  * result from SMC/HVC call
14  * ARM DEN0028E chapter 5,
15  */
16 typedef struct arm_smccc_res_t
17 {
18     unsigned long a0;
19     // reserved for ARM SMC and HVC Fast Call services
20     unsigned long a1;
21     unsigned long a2;
22     unsigned long a3;
23 } arm_smccc_res_t;
24 
25 /**
26  * quirk is a structure contains vendor specified information,
27  * it just a placeholder currently
28  */
29 struct arm_smccc_quirk_t
30 {
31 };
32 
33 /* smccc version 0.2 */
34 
35 void arm_smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
36                    unsigned long a3, unsigned long a4, unsigned long a5,
37                    unsigned long a6, unsigned long a7, struct arm_smccc_res_t *res,
38                    struct arm_smccc_quirk_t *quirk);
39 
40 void arm_smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2,
41                    unsigned long a3, unsigned long a4, unsigned long a5,
42                    unsigned long a6, unsigned long a7, struct arm_smccc_res_t *res,
43                    struct arm_smccc_quirk_t *quirk);
44 
45 #endif /* __SMCCC_H__ */
46