1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2014, STMicroelectronics International N.V.
4  */
5 
6 #ifndef TEE_SYSCALL_NUMBERS_H
7 #define TEE_SYSCALL_NUMBERS_H
8 
9 #define TEE_SCN_RETURN				0
10 #define TEE_SCN_LOG				1
11 #define TEE_SCN_PANIC				2
12 #define TEE_SCN_GET_PROPERTY			3
13 #define TEE_SCN_GET_PROPERTY_NAME_TO_INDEX	4
14 #define TEE_SCN_OPEN_TA_SESSION			5
15 #define TEE_SCN_CLOSE_TA_SESSION		6
16 #define TEE_SCN_INVOKE_TA_COMMAND		7
17 #define TEE_SCN_CHECK_ACCESS_RIGHTS		8
18 #define TEE_SCN_GET_CANCELLATION_FLAG		9
19 #define TEE_SCN_UNMASK_CANCELLATION		10
20 #define TEE_SCN_MASK_CANCELLATION		11
21 #define TEE_SCN_WAIT				12
22 #define TEE_SCN_GET_TIME			13
23 #define TEE_SCN_SET_TA_TIME			14
24 #define TEE_SCN_CRYP_STATE_ALLOC		15
25 #define TEE_SCN_CRYP_STATE_COPY			16
26 #define TEE_SCN_CRYP_STATE_FREE			17
27 #define TEE_SCN_HASH_INIT			18
28 #define TEE_SCN_HASH_UPDATE			19
29 #define TEE_SCN_HASH_FINAL			20
30 #define TEE_SCN_CIPHER_INIT			21
31 #define TEE_SCN_CIPHER_UPDATE			22
32 #define TEE_SCN_CIPHER_FINAL			23
33 #define TEE_SCN_CRYP_OBJ_GET_INFO		24
34 #define TEE_SCN_CRYP_OBJ_RESTRICT_USAGE		25
35 #define TEE_SCN_CRYP_OBJ_GET_ATTR		26
36 #define TEE_SCN_CRYP_OBJ_ALLOC			27
37 #define TEE_SCN_CRYP_OBJ_CLOSE			28
38 #define TEE_SCN_CRYP_OBJ_RESET			29
39 #define TEE_SCN_CRYP_OBJ_POPULATE		30
40 #define TEE_SCN_CRYP_OBJ_COPY			31
41 #define TEE_SCN_CRYP_DERIVE_KEY			32
42 #define TEE_SCN_CRYP_RANDOM_NUMBER_GENERATE	33
43 #define TEE_SCN_AUTHENC_INIT			34
44 #define TEE_SCN_AUTHENC_UPDATE_AAD		35
45 #define TEE_SCN_AUTHENC_UPDATE_PAYLOAD		36
46 #define TEE_SCN_AUTHENC_ENC_FINAL		37
47 #define TEE_SCN_AUTHENC_DEC_FINAL		38
48 #define TEE_SCN_ASYMM_OPERATE			39
49 #define TEE_SCN_ASYMM_VERIFY			40
50 #define TEE_SCN_STORAGE_OBJ_OPEN		41
51 #define TEE_SCN_STORAGE_OBJ_CREATE		42
52 #define TEE_SCN_STORAGE_OBJ_DEL			43
53 #define TEE_SCN_STORAGE_OBJ_RENAME		44
54 #define TEE_SCN_STORAGE_ENUM_ALLOC		45
55 #define TEE_SCN_STORAGE_ENUM_FREE		46
56 #define TEE_SCN_STORAGE_ENUM_RESET		47
57 #define TEE_SCN_STORAGE_ENUM_START		48
58 #define TEE_SCN_STORAGE_ENUM_NEXT		49
59 #define TEE_SCN_STORAGE_OBJ_READ		50
60 #define TEE_SCN_STORAGE_OBJ_WRITE		51
61 #define TEE_SCN_STORAGE_OBJ_TRUNC		52
62 #define TEE_SCN_STORAGE_OBJ_SEEK		53
63 #define TEE_SCN_CRYP_OBJ_GENERATE_KEY		54
64 /* Deprecated Secure Element API syscalls return TEE_ERROR_NOT_SUPPORTED */
65 #define TEE_SCN_SE_SERVICE_OPEN__DEPRECATED		55
66 #define TEE_SCN_SE_SERVICE_CLOSE__DEPRECATED		56
67 #define TEE_SCN_SE_SERVICE_GET_READERS__DEPRECATED	57
68 #define TEE_SCN_SE_READER_GET_PROP__DEPRECATED		58
69 #define TEE_SCN_SE_READER_GET_NAME__DEPRECATED		59
70 #define TEE_SCN_SE_READER_OPEN_SESSION__DEPRECATED	60
71 #define TEE_SCN_SE_READER_CLOSE_SESSIONS__DEPRECATED	61
72 #define TEE_SCN_SE_SESSION_IS_CLOSED__DEPRECATED	62
73 #define TEE_SCN_SE_SESSION_GET_ATR__DEPRECATED		63
74 #define TEE_SCN_SE_SESSION_OPEN_CHANNEL__DEPRECATED	64
75 #define TEE_SCN_SE_SESSION_CLOSE__DEPRECATED		65
76 #define TEE_SCN_SE_CHANNEL_SELECT_NEXT__DEPRECATED	66
77 #define TEE_SCN_SE_CHANNEL_GET_SELECT_RESP__DEPRECATED	67
78 #define TEE_SCN_SE_CHANNEL_TRANSMIT__DEPRECATED		68
79 #define TEE_SCN_SE_CHANNEL_CLOSE__DEPRECATED		69
80 /* End of deprecated Secure Element API syscalls */
81 #define TEE_SCN_CACHE_OPERATION			70
82 
83 #define TEE_SCN_MAX				70
84 
85 /* Maximum number of allowed arguments for a syscall */
86 #define TEE_SVC_MAX_ARGS			8
87 
88 #endif /* TEE_SYSCALL_NUMBERS_H */
89