• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef _TEE_CLIENT_ID_H_
17 #define _TEE_CLIENT_ID_H_
18 
19 /*
20  * @ingroup  TEEC_COMMON_DATA
21  *
22  * Security Global services UUID,Global service is the basic of all services
23  */
24 #define TEE_SERVICE_GLOBAL \
25 { \
26     0x00000000, \
27     0x0000, \
28     0x0000, \
29     { \
30         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 \
31     } \
32 }
33 
34 /*
35  * @ingroup  TEEC_COMMON_DATA
36  *
37  * Security Echo services UUID
38  */
39 #define TEE_SERVICE_ECHO \
40 { \
41     0x01010101, \
42     0x0101, \
43     0x0101, \
44     { \
45         0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 \
46     } \
47 }
48 
49 /*
50  * @ingroup  TEEC_COMMON_DATA
51  *
52  * Security secstorage services UUID
53  */
54 #define TEE_SERVICE_STORAGE \
55 { \
56     0x02020202, \
57     0x0202, \
58     0x0202, \
59     { \
60         0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02 \
61     } \
62 }
63 
64 /*
65  * @ingroup  TEEC_COMMON_DATA
66  *
67  * Security ut services UUID
68  */
69 #define TEE_SERVICE_UT \
70 { \
71     0x03030303, \
72     0x0303, \
73     0x0303, \
74     { \
75         0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 \
76     } \
77 }
78 
79 /*
80  * @ingroup  TEE_ID
81  *
82  * Security crypto services UUID
83  */
84 #define TEE_SERVICE_CRYPTO \
85 { \
86     0x04040404, \
87     0x0404, \
88     0x0404, \
89     { \
90         0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 \
91     } \
92 }
93 
94 /*
95  * @ingroup  TEEC_COMMON_DATA
96  *
97  * Security Global service cmd id
98  */
99 enum SVC_GLOBAL_CMD_ID {
100     GLOBAL_CMD_ID_INVALID = 0x0,        /* Invalid cmd */
101     GLOBAL_CMD_ID_BOOT_ACK,             /* Boot ack */
102     GLOBAL_CMD_ID_OPEN_SESSION,         /* Open Session */
103     GLOBAL_CMD_ID_CLOSE_SESSION,        /* Close Session */
104     GLOBAL_CMD_ID_LOAD_SECURE_APP,      /* Dynamic load TA */
105     GLOBAL_CMD_ID_NEED_LOAD_APP,        /* Determine whether TA needs to be loaded */
106     GLOBAL_CMD_ID_REGISTER_AGENT,       /* Register agent */
107     GLOBAL_CMD_ID_UNREGISTER_AGENT,     /* Unregister agent */
108     GLOBAL_CMD_ID_REGISTER_NOTIFY_MEMORY,   /* Register notify memory buffer */
109     GLOBAL_CMD_ID_UNREGISTER_NOTIFY_MEMORY, /* Unregister notify memory buffer */
110     GLOBAL_CMD_ID_INIT_CONTENT_PATH,        /* Init content path */
111     GLOBAL_CMD_ID_TERMINATE_CONTENT_PATH,   /* Release content path */
112     GLOBAL_CMD_ID_ALLOC_EXCEPTION_MEM,      /* Alloc exception info memory */
113     GLOBAL_CMD_ID_TEE_TIME,                 /* Get Tee time */
114     GLOBAL_CMD_ID_TEE_INFO,
115     GLOBAL_CMD_ID_INVOKE_COMMAND,          /* Invoke command */
116     GLOBAL_CMD_ID_GET_TA_CALL_CMD,
117     GLOBAL_CMD_ID_REGISTER_TA_CALL_CMD,
118     GLOBAL_CMD_ID_UNREGISTER_TA_CALL_CMD,
119     GLOBAL_CMD_ID_PUSH_TA_RESULT_CMD,
120     GLOBAL_CMD_ID_TA_INVOKE_COMMAND,
121     GLOBAL_CMD_ID_MAX,
122 };
123 
124 /*
125  * @ingroup  TEEC_COMMON_DATA
126  *
127  * Security echo service cmd id
128  */
129 enum SVC_ECHO_CMD_ID {
130     ECHO_CMD_ID_INVALID = 0x0,
131     ECHO_CMD_ID_SEND_CMD,
132     ECHO_CMD_ID_EFUSE_READ,
133     ECHO_CMD_ID_EFUSE_WRITE,
134     ECHO_CMD_ID_MAX,
135 };
136 
137 /*
138  * @ingroup  TEEC_COMMON_DATA
139  *
140  * Security secstorage service cmd ids
141  */
142 enum SVC_STORAGE_CMD_ID {
143     STORAGE_CMD_ID_INVALID = 0x10,        /* Invalid cmd */
144     STORAGE_CMD_ID_OPEN,                  /* Open file */
145     STORAGE_CMD_ID_CLOSE,                 /* Close file */
146     STORAGE_CMD_ID_CLOSEALL,              /* Close all files */
147     STORAGE_CMD_ID_READ,                  /* Read file */
148     STORAGE_CMD_ID_WRITE,                 /* Write file */
149     STORAGE_CMD_ID_SEEK,                  /* Seek file */
150     STORAGE_CMD_ID_TELL,                  /* Obtains the current value of the file position */
151     STORAGE_CMD_ID_TRUNCATE,              /* Truncate file */
152     STORAGE_CMD_ID_REMOVE,                /* Remove file */
153     STORAGE_CMD_ID_FINFO,                 /* Get file info */
154     STORAGE_CMD_ID_FSYNC,                 /* Sync file to disk */
155     STORAGE_CMD_ID_UNKNOWN = 0x7FFFFFFE,  /* Unknown id */
156     STORAGE_CMD_ID_MAX = 0x7FFFFFFF,
157 };
158 
159 #endif
160