Mistake on this page? Email us
pal_errors.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // Copyright 2016-2019 ARM Ltd.
3 //
4 // SPDX-License-Identifier: Apache-2.0
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
9 //
10 // http://www.apache.org/licenses/LICENSE-2.0
11 //
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
17 // ----------------------------------------------------------------------------
18 
19 #ifndef _PAL_ERRORS_H
20 #define _PAL_ERRORS_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
31 #define PAL_ERR_MODULE_GENERAL_BASE ((int32_t)0xFFFFFFF0) // -1 << 0x4
32 #define PAL_ERR_MODULE_PAL_BASE ((int32_t)0xFFFFFFC0) // -1 << 0x6
33 #define PAL_ERR_MODULE_C_BASE ((int32_t)0xFFFFFF00) // -1 << 0x8,
34 #define PAL_ERR_MODULE_RTOS_BASE ((int32_t)0xFFFFF000) // -1 << 0xC,
35 #define PAL_ERR_MODULE_NET_BASE ((int32_t)0xFFFF0000) // -1 << 0x10,
36 #define PAL_ERR_MODULE_TLS_BASE ((int32_t)0xFFF00000) // -1 << 0x14,
37 #define PAL_ERR_MODULE_CRYPTO_BASE ((int32_t)0xFF000000) // -1 << 0x18,
38 #define PAL_ERR_MODULE_FILESYSTEM_BASE ((int32_t)0xFC000000) // -1 << 0x1A,
39 #define PAL_ERR_MODULE_INTERNAL_FLASH_BASE ((int32_t)0xFC000500)
40 #define PAL_ERR_MODULE_SST_BASE ((int32_t)0xFC000A00)
41 #define PAL_ERR_MODULE_UPDATE_BASE ((int32_t)0xF0000000) // -1 << 0x1C,
42 #define PAL_ERR_MODULE_BITMASK_BASE ((int32_t)0xE0000000)
43 
44 
45 typedef enum {
46  //Success Codes are positive
48 
49  //All errors are Negative
50  // generic errors
52  PAL_ERR_GENERIC_FAILURE = PAL_ERR_GENERAL_BASE, // Try to use a more specific error message whenever possible.
68  // pal errors
73  // c errors
74  // RTOS errors
75  PAL_ERR_RTOS_ERROR_BASE = PAL_ERR_MODULE_RTOS_BASE, // Try to use a more specific error message whenever possible.
101  // Network errors.
129  //TLS errors
146 
147  //Update errors
158  //Crypto errors
226 
227  //Filesystem errors
250 
251  //Internal flash errors
267 
268  //Secure storage errors
282 
283 } palError_t;
285 #ifdef __cplusplus
286 }
287 #endif
288 #endif //_PAL_ERRORS
Definition: pal_errors.h:253
Definition: pal_errors.h:94
Given length to read/write is wrong.
Definition: pal_errors.h:242
Definition: pal_errors.h:80
Definition: pal_errors.h:181
Invalid data detected */.
Definition: pal_errors.h:277
Definition: pal_errors.h:136
Definition: pal_errors.h:117
#define PAL_ERR_MODULE_INTERNAL_FLASH_BASE
Definition: pal_errors.h:39
Definition: pal_errors.h:186
Definition: pal_errors.h:263
Definition: pal_errors.h:165
Definition: pal_errors.h:254
Definition: pal_errors.h:137
Definition: pal_errors.h:102
Value must not be changed in order to be able to create bit mask.
Definition: pal_errors.h:222
Definition: pal_errors.h:214
#define PAL_ERR_MODULE_RTOS_BASE
Definition: pal_errors.h:34
Definition: pal_errors.h:133
#define PAL_ERR_MODULE_UPDATE_BASE
Definition: pal_errors.h:41
Definition: pal_errors.h:95
Bad file descriptor pointer.
Definition: pal_errors.h:234
Definition: pal_errors.h:196
Definition: pal_errors.h:105
Definition: pal_errors.h:52
Definition: pal_errors.h:63
Definition: pal_errors.h:150
Definition: pal_errors.h:167
Definition: pal_errors.h:177
#define PAL_ERR_MODULE_NET_BASE
Definition: pal_errors.h:35
Definition: pal_errors.h:84
Definition: pal_errors.h:51
Definition: pal_errors.h:191
Write failed */.
Definition: pal_errors.h:275
Definition: pal_errors.h:143
Generic success code.
Definition: pal_errors.h:47
Definition: pal_errors.h:206
Definition: pal_errors.h:194
Definition: pal_errors.h:266
Definition: pal_errors.h:138
Definition: pal_errors.h:107
Attempt to write to write-protected resource */.
Definition: pal_errors.h:274
#define PAL_ERR_MODULE_BITMASK_BASE
Definition: pal_errors.h:42
Definition: pal_errors.h:179
Definition: pal_errors.h:153
Definition: pal_errors.h:187
Definition: pal_errors.h:92
Definition: pal_errors.h:269
Definition: pal_errors.h:110
Definition: pal_errors.h:190
Definition: pal_errors.h:104
Definition: pal_errors.h:180
Definition: pal_errors.h:183
Definition: pal_errors.h:261
#define PAL_ERR_MODULE_SST_BASE
Definition: pal_errors.h:40
Definition: pal_errors.h:53
Definition: pal_errors.h:255
Definition: pal_errors.h:135
Rollback protection authentication failed */.
Definition: pal_errors.h:280
Definition: pal_errors.h:166
Definition: pal_errors.h:252
Definition: pal_errors.h:62
Definition: pal_errors.h:98
#define PAL_ERR_MODULE_CRYPTO_BASE
Definition: pal_errors.h:37
Definition: pal_errors.h:54
Definition: pal_errors.h:149
Definition: pal_errors.h:205
Definition: pal_errors.h:55
Could not find the path.
Definition: pal_errors.h:237
Definition: pal_errors.h:111
Definition: pal_errors.h:218
Definition: pal_errors.h:130
Not Ready */.
Definition: pal_errors.h:273
Definition: pal_errors.h:204
palError_t
Definition: pal_errors.h:45
Definition: pal_errors.h:70
Definition: pal_errors.h:132
Definition: pal_errors.h:61
Definition: pal_errors.h:120
Definition: pal_errors.h:124
Definition: pal_errors.h:185
Definition: pal_errors.h:123
Definition: pal_errors.h:78
A hard error occurred in the low level disk I/O layer.
Definition: pal_errors.h:249
Too many open file descriptors simultaneously.
Definition: pal_errors.h:240
Definition: pal_errors.h:88
Definition: pal_errors.h:127
Definition: pal_errors.h:168
Could not find the file.
Definition: pal_errors.h:236
Definition: pal_errors.h:257
Definition: pal_errors.h:199
Definition: pal_errors.h:144
Definition: pal_errors.h:65
Definition: pal_errors.h:86
Definition: pal_errors.h:213
Definition: pal_errors.h:270
Definition: pal_errors.h:56
Definition: pal_errors.h:57
Item Not Found */.
Definition: pal_errors.h:271
Definition: pal_errors.h:160
File path given is a directory, not a file.
Definition: pal_errors.h:247
Definition: pal_errors.h:210
Definition: pal_errors.h:71
Invalid file system mounting or drive.
Definition: pal_errors.h:239
Definition: pal_errors.h:208
Definition: pal_errors.h:154
Definition: pal_errors.h:189
Definition: pal_errors.h:142
File open mode is invalid.
Definition: pal_errors.h:246
Definition: pal_errors.h:76
Definition: pal_errors.h:131
Definition: pal_errors.h:212
Definition: pal_errors.h:156
Definition: pal_errors.h:60
Media Full */.
Definition: pal_errors.h:279
Definition: pal_errors.h:264
Definition: pal_errors.h:85
Definition: pal_errors.h:75
Definition: pal_errors.h:108
Definition: pal_errors.h:77
Invalid Size */.
Definition: pal_errors.h:272
Definition: pal_errors.h:140
Definition: pal_errors.h:79
Definition: pal_errors.h:155
Definition: pal_errors.h:112
Definition: pal_errors.h:211
Definition: pal_errors.h:184
Definition: pal_errors.h:188
Definition: pal_errors.h:99
Definition: pal_errors.h:151
Definition: pal_errors.h:162
Definition: pal_errors.h:216
File name not valid.
Definition: pal_errors.h:233
Definition: pal_errors.h:106
Definition: pal_errors.h:113
Definition: pal_errors.h:103
Definition: pal_errors.h:64
Generic file system error.
Definition: pal_errors.h:244
Definition: pal_errors.h:139
Authentication failed */.
Definition: pal_errors.h:281
Value must not be changed in order to be able to create bit mask.
Definition: pal_errors.h:221
Definition: pal_errors.h:159
Definition: pal_errors.h:169
Requested Operation failed */.
Definition: pal_errors.h:278
Definition: pal_errors.h:134
Next file in directory could not be found.
Definition: pal_errors.h:248
Definition: pal_errors.h:119
Definition: pal_errors.h:115
#define PAL_ERR_MODULE_TLS_BASE
Definition: pal_errors.h:36
Offset given is greater than the EOF.
Definition: pal_errors.h:229
Definition: pal_errors.h:145
Read failed */.
Definition: pal_errors.h:276
Definition: pal_errors.h:148
Definition: pal_errors.h:171
Definition: pal_errors.h:172
Definition: pal_errors.h:258
Definition: pal_errors.h:141
Definition: pal_errors.h:260
Definition: pal_errors.h:59
No permission to execute the command due to Permission, file in use.
Definition: pal_errors.h:230
Definition: pal_errors.h:83
Given buffer is not initialized.
Definition: pal_errors.h:243
Definition: pal_errors.h:97
Definition: pal_errors.h:164
Definition: pal_errors.h:203
Definition: pal_errors.h:256
Definition: pal_errors.h:58
Definition: pal_errors.h:200
Value must not be changed in order to be able to create bit mask.
Definition: pal_errors.h:220
Definition: pal_errors.h:125
Definition: pal_errors.h:173
Definition: pal_errors.h:193
Definition: pal_errors.h:175
Definition: pal_errors.h:192
Definition: pal_errors.h:174
Definition: pal_errors.h:198
Invalid argument in calling function.
Definition: pal_errors.h:235
Definition: pal_errors.h:90
Definition: pal_errors.h:89
Definition: pal_errors.h:182
#define PAL_ERR_MODULE_FILESYSTEM_BASE
Definition: pal_errors.h:38
Definition: pal_errors.h:170
Definition: pal_errors.h:161
Definition: pal_errors.h:215
Value must not be changed in order to be able to create bit mask.
Definition: pal_errors.h:224
Definition: pal_errors.h:201
Definition: pal_errors.h:118
Definition: pal_errors.h:176
One or more Mutex commands (release,read, write, erase) failed.
Definition: pal_errors.h:265
Pathname or filename already exists.
Definition: pal_errors.h:231
Definition: pal_errors.h:202
Definition: pal_errors.h:178
Value must not be changed in order to be able to create bit mask.
Definition: pal_errors.h:223
Directory not empty.
Definition: pal_errors.h:238
File/directory is open.
Definition: pal_errors.h:245
#define PAL_ERR_MODULE_GENERAL_BASE
Definition: pal_errors.h:31
Definition: pal_errors.h:228
File name is too long or invalid.
Definition: pal_errors.h:241
Definition: pal_errors.h:195
Definition: pal_errors.h:163
Definition: pal_errors.h:114
Definition: pal_errors.h:93
Definition: pal_errors.h:66
#define PAL_ERR_MODULE_PAL_BASE
Definition: pal_errors.h:32
Definition: pal_errors.h:109
Definition: pal_errors.h:69
Insufficient space to execute the command.
Definition: pal_errors.h:232
Definition: pal_errors.h:121
Definition: pal_errors.h:152
Definition: pal_errors.h:197
Definition: pal_errors.h:96
Definition: pal_errors.h:122
Definition: pal_errors.h:82
Value must not be changed in order to be able to create bit mask.
Definition: pal_errors.h:225
Definition: pal_errors.h:81
Definition: pal_errors.h:209
Definition: pal_errors.h:91
Definition: pal_errors.h:217