xref: /optee_os/lib/libutee/include/tee_syscall_numbers.h (revision fc4efaf71f5cff7693cd5dad2043de9986365557)
1b0104773SPascal Brand /*
2b0104773SPascal Brand  * Copyright (c) 2014, STMicroelectronics International N.V.
3b0104773SPascal Brand  * All rights reserved.
4b0104773SPascal Brand  *
5b0104773SPascal Brand  * Redistribution and use in source and binary forms, with or without
6b0104773SPascal Brand  * modification, are permitted provided that the following conditions are met:
7b0104773SPascal Brand  *
8b0104773SPascal Brand  * 1. Redistributions of source code must retain the above copyright notice,
9b0104773SPascal Brand  * this list of conditions and the following disclaimer.
10b0104773SPascal Brand  *
11b0104773SPascal Brand  * 2. Redistributions in binary form must reproduce the above copyright notice,
12b0104773SPascal Brand  * this list of conditions and the following disclaimer in the documentation
13b0104773SPascal Brand  * and/or other materials provided with the distribution.
14b0104773SPascal Brand  *
15b0104773SPascal Brand  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16b0104773SPascal Brand  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17b0104773SPascal Brand  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18b0104773SPascal Brand  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
19b0104773SPascal Brand  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20b0104773SPascal Brand  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21b0104773SPascal Brand  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22b0104773SPascal Brand  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23b0104773SPascal Brand  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24b0104773SPascal Brand  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25b0104773SPascal Brand  * POSSIBILITY OF SUCH DAMAGE.
26b0104773SPascal Brand  */
27b0104773SPascal Brand 
28b0104773SPascal Brand #ifndef TEE_SYSCALL_NUMBERS_H
29b0104773SPascal Brand #define TEE_SYSCALL_NUMBERS_H
30b0104773SPascal Brand 
31b0104773SPascal Brand #define TEE_SCN_RETURN				0
32b0104773SPascal Brand #define TEE_SCN_LOG				1
33b0104773SPascal Brand #define TEE_SCN_PANIC				2
34b0104773SPascal Brand #define TEE_SCN_DUMMY				3
35b0104773SPascal Brand #define TEE_SCN_DUMMY_7ARGS			4
36b0104773SPascal Brand #define TEE_SCN_GET_PROPERTY			5
37b0104773SPascal Brand #define TEE_SCN_OPEN_TA_SESSION			6
38b0104773SPascal Brand #define TEE_SCN_CLOSE_TA_SESSION		7
39b0104773SPascal Brand #define TEE_SCN_INVOKE_TA_COMMAND		8
40b0104773SPascal Brand #define TEE_SCN_CHECK_ACCESS_RIGHTS		9
41b0104773SPascal Brand #define TEE_SCN_GET_CANCELLATION_FLAG		10
42b0104773SPascal Brand #define TEE_SCN_UNMASK_CANCELLATION		11
43b0104773SPascal Brand #define TEE_SCN_MASK_CANCELLATION		12
44b0104773SPascal Brand #define TEE_SCN_WAIT				13
45b0104773SPascal Brand #define TEE_SCN_GET_TIME			14
46b0104773SPascal Brand #define TEE_SCN_SET_TA_TIME			15
47b0104773SPascal Brand #define TEE_SCN_CRYP_STATE_ALLOC		16
48b0104773SPascal Brand #define TEE_SCN_CRYP_STATE_COPY			17
49b0104773SPascal Brand #define TEE_SCN_CRYP_STATE_FREE			18
50b0104773SPascal Brand #define TEE_SCN_HASH_INIT			19
51b0104773SPascal Brand #define TEE_SCN_HASH_UPDATE			20
52b0104773SPascal Brand #define TEE_SCN_HASH_FINAL			21
53b0104773SPascal Brand #define TEE_SCN_CIPHER_INIT			22
54b0104773SPascal Brand #define TEE_SCN_CIPHER_UPDATE			23
55b0104773SPascal Brand #define TEE_SCN_CIPHER_FINAL			24
56b0104773SPascal Brand #define TEE_SCN_CRYP_OBJ_GET_INFO		25
57b0104773SPascal Brand #define TEE_SCN_CRYP_OBJ_RESTRICT_USAGE		26
58b0104773SPascal Brand #define TEE_SCN_CRYP_OBJ_GET_ATTR		27
59b0104773SPascal Brand #define TEE_SCN_CRYP_OBJ_ALLOC			28
60b0104773SPascal Brand #define TEE_SCN_CRYP_OBJ_CLOSE			29
61b0104773SPascal Brand #define TEE_SCN_CRYP_OBJ_RESET			30
62b0104773SPascal Brand #define TEE_SCN_CRYP_OBJ_POPULATE		31
63b0104773SPascal Brand #define TEE_SCN_CRYP_OBJ_COPY			32
64b0104773SPascal Brand #define TEE_SCN_CRYP_DERIVE_KEY			33
65b0104773SPascal Brand #define TEE_SCN_CRYP_RANDOM_NUMBER_GENERATE	34
66b0104773SPascal Brand #define TEE_SCN_AUTHENC_INIT			35
67b0104773SPascal Brand #define TEE_SCN_AUTHENC_UPDATE_AAD		36
68b0104773SPascal Brand #define TEE_SCN_AUTHENC_UPDATE_PAYLOAD		37
69b0104773SPascal Brand #define TEE_SCN_AUTHENC_ENC_FINAL		38
70b0104773SPascal Brand #define TEE_SCN_AUTHENC_DEC_FINAL		39
71b0104773SPascal Brand #define TEE_SCN_ASYMM_OPERATE			40
72b0104773SPascal Brand #define TEE_SCN_ASYMM_VERIFY			41
73b0104773SPascal Brand #define TEE_SCN_STORAGE_OBJ_OPEN		42
74b0104773SPascal Brand #define TEE_SCN_STORAGE_OBJ_CREATE		43
75b0104773SPascal Brand #define TEE_SCN_STORAGE_OBJ_DEL			44
76b0104773SPascal Brand #define TEE_SCN_STORAGE_OBJ_RENAME		45
77b0104773SPascal Brand #define TEE_SCN_STORAGE_ENUM_ALLOC		46
78b0104773SPascal Brand #define TEE_SCN_STORAGE_ENUM_FREE		47
79b0104773SPascal Brand #define TEE_SCN_STORAGE_ENUM_RESET		48
80b0104773SPascal Brand #define TEE_SCN_STORAGE_ENUM_START		49
81b0104773SPascal Brand #define TEE_SCN_STORAGE_ENUM_NEXT		50
82b0104773SPascal Brand #define TEE_SCN_STORAGE_OBJ_READ		51
83b0104773SPascal Brand #define TEE_SCN_STORAGE_OBJ_WRITE		52
84b0104773SPascal Brand #define TEE_SCN_STORAGE_OBJ_TRUNC		53
85b0104773SPascal Brand #define TEE_SCN_STORAGE_OBJ_SEEK		54
86b0104773SPascal Brand #define TEE_SCN_CRYP_OBJ_GENERATE_KEY		55
87197d17e7SSY Chiu #define TEE_SCN_SE_SERVICE_OPEN			56
88197d17e7SSY Chiu #define TEE_SCN_SE_SERVICE_CLOSE		57
89197d17e7SSY Chiu #define TEE_SCN_SE_SERVICE_GET_READERS		58
90197d17e7SSY Chiu #define TEE_SCN_SE_READER_GET_PROP		59
91197d17e7SSY Chiu #define TEE_SCN_SE_READER_GET_NAME		60
92197d17e7SSY Chiu #define TEE_SCN_SE_READER_OPEN_SESSION		61
93197d17e7SSY Chiu #define TEE_SCN_SE_READER_CLOSE_SESSIONS	62
94197d17e7SSY Chiu #define TEE_SCN_SE_SESSION_IS_CLOSED		63
95197d17e7SSY Chiu #define TEE_SCN_SE_SESSION_GET_ATR		64
96197d17e7SSY Chiu #define TEE_SCN_SE_SESSION_OPEN_CHANNEL		65
97197d17e7SSY Chiu #define TEE_SCN_SE_SESSION_CLOSE		66
98197d17e7SSY Chiu #define TEE_SCN_SE_CHANNEL_SELECT_NEXT		67
99197d17e7SSY Chiu #define TEE_SCN_SE_CHANNEL_GET_SELECT_RESP	68
100197d17e7SSY Chiu #define TEE_SCN_SE_CHANNEL_TRANSMIT		69
101197d17e7SSY Chiu #define TEE_SCN_SE_CHANNEL_CLOSE		70
102fa530828SPascal Brand #define TEE_SCN_CACHE_OPERATION			71
103b0104773SPascal Brand 
104fa530828SPascal Brand #define TEE_SCN_MAX				71
105b0104773SPascal Brand 
106a7ec939bSJens Wiklander /* Maximum number of allowed arguments for a syscall */
107*fc4efaf7SJens Wiklander #define TEE_SVC_MAX_ARGS			8
108a7ec939bSJens Wiklander 
109b0104773SPascal Brand #endif /* TEE_SYSCALL_NUMBERS_H */
110