summaryrefslogtreecommitdiff
path: root/mobicore/daemon/ClientLib/public/GP/tee_error.h
blob: fbae6871f9d1ad9527a00a10dc402536d7eefb4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/**
 * Copyright (c) 2013 TRUSTONIC LIMITED
 * All rights reserved
 *
 * The present software is the confidential and proprietary information of
 * TRUSTONIC LIMITED. You shall not disclose the present software and shall
 * use it only in accordance with the terms of the license agreement you
 * entered into with TRUSTONIC LIMITED. This software may be subject to
 * export or import laws in certain countries.
 */

#ifndef __TEE_ERROR_H__
#define __TEE_ERROR_H__

#define TEE_SUCCESS                      ((TEE_Result)0x00000000)
#define TEEC_SUCCESS                   TEE_SUCCESS

#define TEE_ERROR_CORRUPT_OBJECT         ((TEE_Result)0xF0100001)
#define TEE_ERROR_CORRUPT_OBJECT_2       ((TEE_Result)0xF0100002)

/**
 * Generic error code : Generic error
 **/
#define TEE_ERROR_GENERIC                ((TEE_Result)0xFFFF0000)
#define TEEC_ERROR_GENERIC             TEE_ERROR_GENERIC

/**
 * Generic error code : The underlying security system denies the access to the
 * object
 **/
#define TEE_ERROR_ACCESS_DENIED          ((TEE_Result)0xFFFF0001)
#define TEEC_ERROR_ACCESS_DENIED       TEE_ERROR_ACCESS_DENIED

/**
 * Generic error code : The pending operation is cancelled.
 **/
#define TEE_ERROR_CANCEL                 ((TEE_Result)0xFFFF0002)
#define TEEC_ERROR_CANCEL              TEE_ERROR_CANCEL

/**
 * Generic error code : The underlying system detects a conflict
 **/
#define TEE_ERROR_ACCESS_CONFLICT        ((TEE_Result)0xFFFF0003)
#define TEEC_ERROR_ACCESS_CONFLICT     TEE_ERROR_ACCESS_CONFLICT

/**
 * Generic error code : Too much data for the operation or some data remain
 * unprocessed by the operation.
 **/
#define TEE_ERROR_EXCESS_DATA            ((TEE_Result)0xFFFF0004)
#define TEEC_ERROR_EXCESS_DATA         TEE_ERROR_EXCESS_DATA

/**
 * Generic error code : Error of data format
 **/
#define TEE_ERROR_BAD_FORMAT             ((TEE_Result)0xFFFF0005)
#define TEEC_ERROR_BAD_FORMAT          TEE_ERROR_BAD_FORMAT

/**
 * Generic error code : The specified parameters are invalid
 **/
#define TEE_ERROR_BAD_PARAMETERS         ((TEE_Result)0xFFFF0006)
#define TEEC_ERROR_BAD_PARAMETERS      TEE_ERROR_BAD_PARAMETERS


/**
 * Generic error code : Illegal state for the operation.
 **/
#define TEE_ERROR_BAD_STATE              ((TEE_Result)0xFFFF0007)
#define TEEC_ERROR_BAD_STATE           TEE_ERROR_BAD_STATE

/**
 * Generic error code : The item is not found
 **/
#define TEE_ERROR_ITEM_NOT_FOUND         ((TEE_Result)0xFFFF0008)
#define TEEC_ERROR_ITEM_NOT_FOUND      TEE_ERROR_ITEM_NOT_FOUND

/**
 * Generic error code : The specified operation is not implemented
 **/
#define TEE_ERROR_NOT_IMPLEMENTED        ((TEE_Result)0xFFFF0009)
#define TEEC_ERROR_NOT_IMPLEMENTED     TEE_ERROR_NOT_IMPLEMENTED

/**
 * Generic error code : The specified operation is not supported
 **/
#define TEE_ERROR_NOT_SUPPORTED          ((TEE_Result)0xFFFF000A)
#define TEEC_ERROR_NOT_SUPPORTED       TEE_ERROR_NOT_SUPPORTED

/**
 * Generic error code : Insufficient data is available for the operation.
 **/
#define TEE_ERROR_NO_DATA                ((TEE_Result)0xFFFF000B)
#define TEEC_ERROR_NO_DATA             TEE_ERROR_NO_DATA

/**
 * Generic error code : Not enough memory to perform the operation
 **/
#define TEE_ERROR_OUT_OF_MEMORY          ((TEE_Result)0xFFFF000C)
#define TEEC_ERROR_OUT_OF_MEMORY       TEE_ERROR_OUT_OF_MEMORY

/**
 * Generic error code : The service is currently unable to handle the request;
 * try later
 **/
#define TEE_ERROR_BUSY                   ((TEE_Result)0xFFFF000D)
#define TEEC_ERROR_BUSY                TEE_ERROR_BUSY

/**
 * Generic communication error
 **/
#define TEE_ERROR_COMMUNICATION          ((TEE_Result)0xFFFF000E)
#define TEEC_ERROR_COMMUNICATION       TEE_ERROR_COMMUNICATION

/**
 * Generic error code : security violation
 **/
#define TEE_ERROR_SECURITY               ((TEE_Result)0xFFFF000F)
#define TEEC_ERROR_SECURITY            TEE_ERROR_SECURITY

/**
 * Generic error code : the buffer is too short
 **/
#define TEE_ERROR_SHORT_BUFFER           ((TEE_Result)0xFFFF0010)
#define TEEC_ERROR_SHORT_BUFFER        TEE_ERROR_SHORT_BUFFER

/**
 * Generic error code : The pending operation is cancelled.
 */
#define TEE_ERROR_EXTERNAL_CANCEL        ((TEE_Result)0xFFFF0011)

/**
 * Generic error code : the operation is not terminated
 **/
#define TEE_PENDING                      ((TEE_Result)0xFFFF2000)

/**
 * Generic error code : A timeout occurred
 **/
#define TEE_ERROR_TIMEOUT                ((TEE_Result)0xFFFF3001)

/**
 * Generic error code : Overflow
 **/
#define TEE_ERROR_OVERFLOW               ((TEE_Result)0xFFFF300F)

/**
 * Error of communication: The target of the connection is dead
 **/
#define TEE_ERROR_TARGET_DEAD            ((TEE_Result)0xFFFF3024)
#define TEEC_ERROR_TARGET_DEAD         TEE_ERROR_TARGET_DEAD

/*------------------------------------------------------------------------------
   Storage Error Codes
------------------------------------------------------------------------------*/

/** File system error code: not enough space to complete the operation. */
#define TEE_ERROR_STORAGE_NO_SPACE       ((TEE_Result)0xFFFF3041)

/*------------------------------------------------------------------------------
   Crypto error codes
------------------------------------------------------------------------------*/

#define TEE_ERROR_MAC_INVALID          ((TEE_Result)0xFFFF3071)

#define TEE_ERROR_SIGNATURE_INVALID    ((TEE_Result)0xFFFF3072)

/*------------------------------------------------------------------------------
   Date error codes
------------------------------------------------------------------------------*/

#define TEE_ERROR_TIME_NOT_SET         ((TEE_Result)0xFFFF5000)

#define TEE_ERROR_TIME_NEEDS_RESET     ((TEE_Result)0xFFFF5001)

#endif /* __TEE_ERROR_H__ */