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