My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
smc_id.h
Go to the documentation of this file.
1 /*
2  * OpenVirtualization:
3  * For additional details and support contact developer@sierraware.com.
4  * Additional documentation can be found at www.openvirtualization.org
5  *
6  * Copyright (C) 2010-2014 SierraWare
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  *
22  */
23 #ifndef __SMC_ID_H__
24 #define __SMC_ID_H__
25 
26 #define SMC_FAST (0x80000000)
27 #define SMC_STD (~SMC_FAST)
28 
29 #define SMC_ARCH64 (0x40000000)
30 #define SMC_ARCH32 (~SMC_ARCH64)
31 
32 #define SMC_SOS_SHIFT (29)
33 #define SMC_SOS_MASK (0x3f000000)
34 #define SMC_FROM_NS (0x5600BBBB)
35 #define SMC_FROM_SEC (0x5e000000)
36 
37 #define SMC_FNID_MASK (0x0000FFFF)
38 
39 #define SMC_SET_ELX_ENTRY (0x1)
40 #define HVC_SET_EL1_ENTRY (0x1)
41 
42 #ifdef ARM_ARCH_ARMV7
43 
44 #define CALL_TRUSTZONE_API (0x1)
45 #define CALL_TRUSTZONE_API_RET (0x2)
46 
47 #else
48 
49 #define CALL_TRUSTZONE_API (0x3)
50 #define CALL_TRUSTZONE_API_RET (0x4)
51 
52 #endif
53 
54 #ifdef ARM_ARCH_ARMV7
55 
56 #define SMC_FIQ_RETURN (0x2)
57 #define SMC_EXCEPTION_RETURN (0x3)
58 
59 #else
60 
61 #define SMC_FIQ_RETURN (0x5)
62 #define SMC_EXCEPTION_RETURN (0x6)
63 
64 #endif
65 
66 
67 #define TRUSTED_OS_CALL_REVISION 0xbf00ff03
68 #define TRUSTED_OS_CALL_UUID 0xbf00ff01
69 #define TRUSTED_OS_NUMBER_CALL 0xbf00ff00
70 
71 #define TRUSTED_OS_MAJOR_VERSION (0x0)
72 #define TRUSTED_OS_MINOR_VERSION (0x1)
73 #define TRUSTED_OS_CALL_COUNT 0x2
74 
75 #define STANDARD_SERVICE_NUMBER_CALL 0x8400ff00
76 #define STANDARD_SERVICE_CALL_UUID 0x8400ff01
77 #define STANDARD_SERVICE_CALL_REVISION 0x8400ff03
78 
79 #define STANDARD_SERVICE_MAJOR_VERSION 0x0
80 #define STANDARD_SERVICE_MINOR_VERSION 0x1
81 #define STANDARD_SERVICE_CALL_COUNT 0x3
82 
83 #define OEM_SERVICE_NUMBER_CALL 0x8300ff00
84 #define OEM_SERVICE_CALL_UUID 0x8300ff01
85 #define OEM_SERVICE_CALL_REVISION 0x8300ff03
86 
87 #define OEM_SERVICE_MAJOR_VERSION 0x0
88 #define OEM_SERVICE_MINOR_VERSION 0x1
89 #define OEM_SERVICE_CALL_COUNT 0x1
90 
91 #define SIP_SERVICE_NUMBER_CALL 0x8200ff00
92 #define SIP_SERVICE_CALL_UUID 0x8200ff01
93 #define SIP_SERVICE_CALL_REVISION 0x8200ff03
94 
95 #define SIP_SERVICE_MAJOR_VERSION 0x0
96 #define SIP_SERVICE_MINOR_VERSION 0x1
97 #define SIP_SERVICE_CALL_COUNT 0x0f
98 
99 #define CPU_SERVICE_NUMBER_CALL 0x8100ff00
100 #define CPU_SERVICE_CALL_UUID 0x8100ff01
101 #define CPU_SERVICE_CALL_REVISION 0x8100ff03
102 
103 #define CPU_SERVICE_MAJOR_VERSION 0x0
104 #define CPU_SERVICE_MINOR_VERSION 0x0
105 #define CPU_SERVICE_CALL_COUNT 0x0
106 
107 #define ARM_SERVICE_NUMBER_CALL 0x8000ff00
108 #define ARM_SERVICE_CALL_UUID 0x8000ff01
109 #define ARM_SERVICE_CALL_REVISION 0x8000ff03
110 
111 #define ARM_SERVICE_MAJOR_VERSION 0x0
112 #define ARM_SERVICE_MINOR_VERSION 0x0
113 #define ARM_SERVICE_CALL_COUNT 0x0
114 
115 #endif