1 /***************************************************************************//**
2  * @file
3  * @brief Secure Element API
4  *******************************************************************************
5  * # License
6  * <b>Copyright 2018 Silicon Laboratories Inc. www.silabs.com</b>
7  *******************************************************************************
8  *
9  * SPDX-License-Identifier: Zlib
10  *
11  * The licensor of this software is Silicon Laboratories Inc.
12  *
13  * This software is provided 'as-is', without any express or implied
14  * warranty. In no event will the authors be held liable for any damages
15  * arising from the use of this software.
16  *
17  * Permission is granted to anyone to use this software for any purpose,
18  * including commercial applications, and to alter it and redistribute it
19  * freely, subject to the following restrictions:
20  *
21  * 1. The origin of this software must not be misrepresented; you must not
22  *    claim that you wrote the original software. If you use this software
23  *    in a product, an acknowledgment in the product documentation would be
24  *    appreciated but is not required.
25  * 2. Altered source versions must be plainly marked as such, and must not be
26  *    misrepresented as being the original software.
27  * 3. This notice may not be removed or altered from any source distribution.
28  *
29  ******************************************************************************/
30 #ifndef EM_SE_H
31 #define EM_SE_H
32 
33 #ifndef SL_SUPPRESS_DEPRECATION_WARNINGS_SDK_2024_6
34 #warning "This file is deprecated as of SiSDK 2024.6. The content was moved to sli_se_manager_mailbox.h."
35 #endif
36 
37 #if defined(__linux__)
38 
39 #define SLI_EM_SE_HOST
40 
41 #else
42 
43 #include "em_device.h"
44 
45 #endif // __linux__
46 
47 #include "sl_common.h"
48 
49 #if defined(SLI_EM_SE_HOST) || defined(SEMAILBOX_PRESENT) || defined(CRYPTOACC_PRESENT)
50 
51 #include <stdint.h>
52 #include <stdbool.h>
53 #include <stddef.h>
54 #include "sli_se_manager_mailbox.h"
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 /***************************************************************************//**
61  * @addtogroup se SE - Secure Element
62  *
63  * @brief Secure Element peripheral API
64  *
65  * @details
66  *   Abstraction of the Secure Element's mailbox interface.
67  *
68  *   For series 2 devices with a part number that is xG23 or higher, the
69  *   following step is necessary for basic operation:
70  *
71  *   Clock enable:
72  *   @code
73      CMU_ClockEnable(cmuClock_SEMAILBOX, true);@endcode
74  *
75  *   @note The high-level SE API has been moved to the SE manager, and the
76  *   implementation in em_se should not be used.
77  *
78  *   @note Using the SE's mailbox is not thread-safe in EMLIB, and accessing the
79  *   SE's mailbox both in regular and IRQ context is not safe. SE operations
80  *   should be performed using the SE manager if possible.
81  *
82  * @{
83  ******************************************************************************/
84 
85 /*******************************************************************************
86  ******************************   DEFINES    ***********************************
87  ******************************************************************************/
88 
89 #if defined(CRYPTOACC_PRESENT)
90 /** Root Code Mailbox is invalid. */
91 #define SE_RESPONSE_MAILBOX_INVALID         0x00FE0000UL
92 /** Root Code Mailbox magic word */
93 #define SE_RESPONSE_MAILBOX_VALID           0xE5ECC0DEUL
94 #endif
95 
96 /** Response status codes for the Secure Element */
97 #define SE_RESPONSE_MASK                    0x000F0000UL
98 /** Command executed successfully or signature was successfully validated. */
99 #define SE_RESPONSE_OK                      0x00000000UL
100 
101 /** Maximum amount of parameters supported by the hardware FIFO */
102 #define SE_FIFO_MAX_PARAMETERS              13U
103 
104 /** Stop datatransfer */
105 #define SE_DATATRANSFER_STOP                0x00000001UL
106 /** Discard datatransfer */
107 #define SE_DATATRANSFER_DISCARD             0x40000000UL
108 /** Realign datatransfer */
109 #define SE_DATATRANSFER_REALIGN             0x20000000UL
110 /** Datatransfer Const Address*/
111 #define SE_DATATRANSFER_CONSTADDRESS        0x10000000UL
112 /** Stop Length Mask */
113 #define SE_DATATRANSFER_LENGTH_MASK         0x0FFFFFFFUL
114 
115 /** Maximum amount of parameters for largest command in defined command set */
116 #ifndef SE_MAX_PARAMETERS
117 #define SE_MAX_PARAMETERS                   4U
118 #endif
119 
120 /* Sanity-check defines */
121 #if SE_MAX_PARAMETERS > SE_FIFO_MAX_PARAMETERS
122 #error "Trying to configure more parameters than supported by the hardware"
123 #endif
124 
125 /*******************************************************************************
126  ******************************   TYPEDEFS   ***********************************
127  ******************************************************************************/
128 
129 /**
130  * SE DMA transfer descriptor. Can be linked to each other to provide
131  * scatter-gather behavior.
132  */
133 typedef sli_se_datatransfer_t SE_DataTransfer_t;
134 
135 /** Default initialization of data transfer struct */
136 #define SE_DATATRANSFER_DEFAULT(address, length)                               \
137   {                                                                            \
138     (void*)(address),                  /* Pointer to data block */             \
139     (void*)SE_DATATRANSFER_STOP,       /* This is the last block by default */ \
140     (length) | SE_DATATRANSFER_REALIGN /* Add size, use realign by default */  \
141   }
142 
143 /**
144  * SE Command structure. See
145  */
146 typedef sli_se_mailbox_command_t SE_Command_t;
147 
148 /** Default initialization of command struct */
149 #define SE_COMMAND_DEFAULT(command)       \
150   {                                       \
151     (command),        /* Given command */ \
152     NULL,             /* No data in */    \
153     NULL,             /* No data out */   \
154     { 0, 0, 0, 0 },   /* No parameters */ \
155     0                 /* No parameters */ \
156   }
157 
158 /** Possible responses to a command */
159 typedef sli_se_mailbox_response_t SE_Response_t;
160 
161 /*******************************************************************************
162  *****************************   PROTOTYPES   **********************************
163  ******************************************************************************/
164 
165 void SE_addDataInput(SE_Command_t *command,
166                      SE_DataTransfer_t *data);
167 
168 void SE_addDataOutput(SE_Command_t *command,
169                       SE_DataTransfer_t *data);
170 
171 void SE_addParameter(SE_Command_t *command, uint32_t parameter);
172 
173 #if !defined(SLI_EM_SE_HOST)
174 void SE_executeCommand(SE_Command_t *command);
175 #endif // #if !defined(SLI_EM_SE_HOST)
176 
177 #if defined(CRYPTOACC_PRESENT)
178 SE_Response_t SE_getVersion(uint32_t *version);
179 SE_Response_t SE_getConfigStatusBits(uint32_t *cfgStatus);
180 SE_Response_t SE_getOTPVersion(uint32_t *otpVersion);
181 SE_Response_t SE_ackCommand(SE_Command_t *command);
182 #endif // #if defined(CRYPTOACC_PRESENT)
183 
184 // Utilities
185 #if defined(SEMAILBOX_PRESENT)
186 __STATIC_INLINE bool SE_isCommandCompleted(void);
187 __STATIC_INLINE SE_Response_t SE_readCommandResponse(void);
188 #elif defined(CRYPTOACC_PRESENT)
189 bool SE_isCommandCompleted(void);
190 uint32_t SE_readExecutedCommand(void);
191 SE_Response_t SE_readCommandResponse(void);
192 #endif // #if defined(SEMAILBOX_PRESENT)
193 
194 #if !defined(SLI_EM_SE_HOST)
195 __STATIC_INLINE void SE_waitCommandCompletion(void);
196 __STATIC_INLINE void SE_disableInterrupt(uint32_t flags);
197 __STATIC_INLINE void SE_enableInterrupt(uint32_t flags);
198 #endif // #if !defined(SLI_EM_SE_HOST)
199 
200 #if defined(SEMAILBOX_PRESENT)
201 /***************************************************************************//**
202  * @brief
203  *   Check whether the running command has completed.
204  *
205  * @details
206  *   This function polls the SE-to-host mailbox interrupt flag.
207  *
208  * @return True if a command has completed and the result is available
209  ******************************************************************************/
SE_isCommandCompleted(void)210 __STATIC_INLINE bool SE_isCommandCompleted(void)
211 {
212   return (bool)(SEMAILBOX_HOST->RX_STATUS & SEMAILBOX_RX_STATUS_RXINT);
213 }
214 #endif // #if defined(SEMAILBOX_PRESENT)
215 
216 #if defined(SEMAILBOX_PRESENT)
217 /***************************************************************************//**
218  * @brief
219  *   Read the status of the previously executed command.
220  *
221  * @details
222  *   This function reads the status of the previously executed command.
223  *
224  * @note
225  *   The command response needs to be read for every executed command, and can
226  *   only be read once per executed command (FIFO behavior).
227  *
228  * @return
229  *   One of the SE_RESPONSE return codes:
230  *   SE_RESPONSE_OK when the command was executed successfully or a signature
231  *   was successfully verified.
232  ******************************************************************************/
SE_readCommandResponse(void)233 __STATIC_INLINE SE_Response_t SE_readCommandResponse(void)
234 {
235   SE_waitCommandCompletion();
236   return (SE_Response_t)(SEMAILBOX_HOST->RX_HEADER & SE_RESPONSE_MASK);
237 }
238 #endif // #if defined(SEMAILBOX_PRESENT)
239 
240 #if !defined(SLI_EM_SE_HOST)
241 /***************************************************************************//**
242  * @brief
243  *   Wait for completion of the current command.
244  *
245  * @details
246  *   This function "busy"-waits until the execution of the ongoing instruction
247  *   has completed.
248  ******************************************************************************/
SE_waitCommandCompletion(void)249 __STATIC_INLINE void SE_waitCommandCompletion(void)
250 {
251   /* Wait for completion */
252   while (!SE_isCommandCompleted()) {
253   }
254 }
255 
256 /***************************************************************************//**
257  * @brief
258  *   Disable one or more SE interrupts.
259  *
260  * @param[in] flags
261  *   SE interrupt sources to disable. Use a bitwise logic OR combination of
262  *   valid interrupt flags for the Secure Element module
263  *    (SE_CONFIGURATION_(TX/RX)INTEN).
264  ******************************************************************************/
SE_disableInterrupt(uint32_t flags)265 __STATIC_INLINE void SE_disableInterrupt(uint32_t flags)
266 {
267 #if defined(SEMAILBOX_PRESENT)
268   SEMAILBOX_HOST->CONFIGURATION &= ~flags;
269 #else
270   (void) flags;
271 #endif
272 }
273 
274 /***************************************************************************//**
275  * @brief
276  *   Enable one or more SE interrupts.
277  *
278  * @param[in] flags
279  *   SE interrupt sources to enable. Use a bitwise logic OR combination of
280  *   valid interrupt flags for the Secure Element module
281  *   (SEMAILBOX_CONFIGURATION_TXINTEN or SEMAILBOX_CONFIGURATION_RXINTEN).
282  ******************************************************************************/
SE_enableInterrupt(uint32_t flags)283 __STATIC_INLINE void SE_enableInterrupt(uint32_t flags)
284 {
285 #if defined(SEMAILBOX_PRESENT)
286   SEMAILBOX_HOST->CONFIGURATION |= flags;
287 #else
288   (void) flags;
289 #endif
290 }
291 
292 #endif // #if !defined(SLI_EM_SE_HOST)
293 
294 /*******************************************************************************
295  *****************************   DEPRECATED    *********************************
296  ******************************************************************************/
297 
298 /***************************************************************************//**
299  * @addtogroup se_deprecated Deprecated Functions
300  * @brief Deprecated Functions
301  *
302  * @deprecated
303  *   The following functions have been deprecated and will be removed in a
304  *   future version of EMLIB. All high-level functionality have been moved to
305  *   the SE manager.
306  *
307  * @{
308  ******************************************************************************/
309 
310 /*******************************************************************************
311  ******************************   DEFINES    ***********************************
312  ******************************************************************************/
313 
314 #if !defined(SLI_EM_SE_HOST)
315 /** @cond DO_NOT_INCLUDE_WITH_DOXYGEN */
316 #if defined(SEMAILBOX_PRESENT)
317 /* Command words for the Security Engine. */
318 #if (defined(_SILICON_LABS_SECURITY_FEATURE) \
319   && (_SILICON_LABS_SECURITY_FEATURE == _SILICON_LABS_SECURITY_FEATURE_VAULT))
320 #define SE_COMMAND_WRAP_KEY                 0x01000000UL
321 #define SE_COMMAND_UNWRAP_KEY               0x01020000UL
322 #define SE_COMMAND_TRANSFER_KEY             0x01060000UL
323 #endif /* _SILICON_LABS_SECURITY_FEATURE_VAULT */
324 
325 #define SE_COMMAND_CREATE_KEY               0x02000000UL
326 #define SE_COMMAND_READPUB_KEY              0x02010000UL
327 
328 #if (defined(_SILICON_LABS_SECURITY_FEATURE) \
329   && (_SILICON_LABS_SECURITY_FEATURE == _SILICON_LABS_SECURITY_FEATURE_VAULT))
330 #define SE_COMMAND_DERIVE_KEY_PBKDF2        0x02020002UL
331 #define SE_COMMAND_DERIVE_KEY_HKDF          0x02020003UL
332 #endif /* _SILICON_LABS_SECURITY_FEATURE_VAULT */
333 
334 #define SE_COMMAND_HASH                     0x03000000UL
335 #define SE_COMMAND_HASHUPDATE               0x03010000UL
336 #define SE_COMMAND_HMAC                     0x03020000UL
337 
338 #define SE_COMMAND_AES_ENCRYPT              0x04000000UL
339 #define SE_COMMAND_AES_DECRYPT              0x04010000UL
340 #define SE_COMMAND_AES_GCM_ENCRYPT          0x04020000UL
341 #define SE_COMMAND_AES_GCM_DECRYPT          0x04030000UL
342 #define SE_COMMAND_AES_CMAC                 0x04040000UL
343 #define SE_COMMAND_AES_CCM_ENCRYPT          0x04050000UL
344 #define SE_COMMAND_AES_CCM_DECRYPT          0x04060000UL
345 
346 #define SE_COMMAND_SIGNATURE_SIGN           0x06000000UL
347 #define SE_COMMAND_SIGNATURE_VERIFY         0x06010000UL
348 #if (defined(_SILICON_LABS_SECURITY_FEATURE) \
349   && (_SILICON_LABS_SECURITY_FEATURE == _SILICON_LABS_SECURITY_FEATURE_VAULT))
350 #define SE_COMMAND_EDDSA_SIGN               0x06020000UL
351 #define SE_COMMAND_EDDSA_VERIFY             0x06030000UL
352 #endif /* _SILICON_LABS_SECURITY_FEATURE_VAULT */
353 
354 #define SE_COMMAND_TRNG_GET_RANDOM          0x07000000UL
355 #define SE_COMMAND_READ_CLOCK               0x07020000UL
356 
357 #if (defined(_SILICON_LABS_SECURITY_FEATURE) \
358   && (_SILICON_LABS_SECURITY_FEATURE == _SILICON_LABS_SECURITY_FEATURE_VAULT))
359 #define SE_COMMAND_ATTEST_CERTIFY           0x0A000000UL
360 #define SE_COMMAND_ATTEST_TIME              0x0A010000UL
361 #define SE_COMMAND_ATTEST_PUBKEY            0x0A020000UL
362 #endif /* _SILICON_LABS_SECURITY_FEATURE_VAULT */
363 
364 #define SE_COMMAND_JPAKE_R1_GENERATE        0x0B000000UL
365 #define SE_COMMAND_JPAKE_R1_VERIFY          0x0B000100UL
366 #define SE_COMMAND_JPAKE_R2_GENERATE        0x0B010000UL
367 #define SE_COMMAND_JPAKE_R2_VERIFY          0x0B010100UL
368 #define SE_COMMAND_JPAKE_GEN_SESSIONKEY     0x0B020000UL
369 
370 #if (defined(_SILICON_LABS_SECURITY_FEATURE) \
371   && (_SILICON_LABS_SECURITY_FEATURE == _SILICON_LABS_SECURITY_FEATURE_VAULT))
372 #define SE_COMMAND_AEAD_ENCRYPT             0x0C000000UL
373 #define SE_COMMAND_AEAD_DECRYPT             0x0C010000UL
374 #define SE_COMMAND_CHACHA20_ENCRYPT         0x0C020000UL
375 #define SE_COMMAND_CHACHA20_DECRYPT         0x0C030000UL
376 #define SE_COMMAND_POLY1305_KEY_MAC         0x0C040000UL
377 #endif /* _SILICON_LABS_SECURITY_FEATURE_VAULT */
378 
379 #define SE_COMMAND_DH                       0x0E000000UL
380 
381 #endif // #if defined(SEMAILBOX_PRESENT)
382 
383 #define SE_COMMAND_CHECK_SE_IMAGE           0x43020000UL
384 #define SE_COMMAND_APPLY_SE_IMAGE           0x43030000UL
385 #define SE_COMMAND_STATUS_SE_IMAGE          0x43040000UL
386 #define SE_COMMAND_CHECK_HOST_IMAGE         0x43050001UL
387 #define SE_COMMAND_APPLY_HOST_IMAGE         0x43060001UL
388 #define SE_COMMAND_STATUS_HOST_IMAGE        0x43070000UL
389 
390 #if defined(SEMAILBOX_PRESENT)
391 
392 #define SE_COMMAND_STATUS_SE_VERSION        0x43080000UL
393 #define SE_COMMAND_STATUS_OTP_VERSION       0x43080100UL
394 
395 #define SE_COMMAND_WRITE_USER_DATA          0x43090000UL
396 #define SE_COMMAND_ERASE_USER_DATA          0x430A0000UL
397 
398 #define SE_COMMAND_DBG_LOCK_APPLY           0x430C0000
399 #define SE_COMMAND_DBG_LOCK_ENABLE_SECURE   0x430D0000
400 #define SE_COMMAND_DBG_LOCK_DISABLE_SECURE  0x430E0000
401 #define SE_COMMAND_DEVICE_ERASE             0x430F0000
402 #define SE_COMMAND_DEVICE_ERASE_DISABLE     0x43100000
403 #define SE_COMMAND_DBG_LOCK_STATUS          0x43110000
404 
405 #define SE_COMMAND_PROTECTED_REGISTER       0x43210000
406 
407 #define SE_COMMAND_GET_CHALLENGE            0xFD000000UL
408 #define SE_COMMAND_ROLL_CHALLENGE           0xFD000100UL
409 #define SE_COMMAND_OPEN_DEBUG               0xFD010001UL
410 #define SE_COMMAND_DISABLE_TAMPER           0xFD020001UL
411 
412 #define SE_COMMAND_READ_SERIAL              0xFE000000UL
413 #define SE_COMMAND_GET_STATUS               0xFE010000UL
414 #define SE_COMMAND_READ_PUBKEYBOOT          0xFE020001UL
415 
416 #define SE_COMMAND_SET_UPGRADEFLAG_SE       0xFE030000UL
417 #define SE_COMMAND_SET_UPGRADEFLAG_HOST     0xFE030001UL
418 
419 #define SE_COMMAND_INIT_PUBKEY_SIGNATURE    0xFF090001UL
420 #define SE_COMMAND_READ_PUBKEY_SIGNATURE    0xFF0A0001UL
421 #endif /* SEMAILBOX_PRESENT */
422 
423 #if defined(SEMAILBOX_PRESENT)
424 /* Command options for the Secure Element commands. */
425 /** Use MD5 as hash algorithm */
426 #define SE_COMMAND_OPTION_HASH_MD5          0x00000100UL
427 /** Use SHA1 as hash algorithm */
428 #define SE_COMMAND_OPTION_HASH_SHA1         0x00000200UL
429 /** Use SHA224 as hash algorithm */
430 #define SE_COMMAND_OPTION_HASH_SHA224       0x00000300UL
431 /** Use SHA256 as hash algorithm */
432 #define SE_COMMAND_OPTION_HASH_SHA256       0x00000400UL
433 
434 #if (defined(_SILICON_LABS_SECURITY_FEATURE) \
435   && (_SILICON_LABS_SECURITY_FEATURE == _SILICON_LABS_SECURITY_FEATURE_VAULT))
436 /** Use SHA384 as hash algorithm */
437 #define SE_COMMAND_OPTION_HASH_SHA384       0x00000500UL
438 /** Use SHA512 as hash algorithm */
439 #define SE_COMMAND_OPTION_HASH_SHA512       0x00000600UL
440 #endif /* _SILICON_LABS_SECURITY_FEATURE_VAULT */
441 
442 /** Execute algorithm in ECB mode */
443 #define SE_COMMAND_OPTION_MODE_ECB          0x00000100UL
444 /** Execute algorithm in CBC mode */
445 #define SE_COMMAND_OPTION_MODE_CBC          0x00000200UL
446 /** Execute algorithm in CTR mode */
447 #define SE_COMMAND_OPTION_MODE_CTR          0x00000300UL
448 /** Execute algorithm in CFB mode */
449 #define SE_COMMAND_OPTION_MODE_CFB          0x00000400UL
450 /** Execute algorithm in OFB mode */
451 #define SE_COMMAND_OPTION_MODE_OFB          0x00000500UL
452 /** Execute algorithm in XTS mode */
453 #define SE_COMMAND_OPTION_MODE_XTS          0x00000800UL
454 
455 #define SE_COMMAND_OPTION_CERT_DEVICE       0x00000100UL
456 #define SE_COMMAND_OPTION_CERT_BATCH        0x00000200UL
457 #define SE_COMMAND_OPTION_CERT_FACTORY      0x00000300UL
458 
459 /** Pubkey type */
460 #define SE_KEY_TYPE_ROOT                    0x00000300UL
461 
462 /** Run the whole algorithm, all data present */
463 #define SE_COMMAND_OPTION_CONTEXT_WHOLE     0x00000000UL
464 /** Start the algorithm, but get a context to later add more data */
465 #define SE_COMMAND_OPTION_CONTEXT_START     0x00000001UL
466 /** End the algorithm, get the result */
467 #define SE_COMMAND_OPTION_CONTEXT_END       0x00000002UL
468 /** Add more data input to the algorithm. Need to supply previous context,
469  *  and get a context back */
470 #define SE_COMMAND_OPTION_CONTEXT_ADD       0x00000003UL
471 
472 /** Padding options for signature functionality. */
473 #define SE_COMMAND_OPTION_PADDING_NONE      0x00000000UL
474 #define SE_COMMAND_OPTION_PADDING_EMSA_PKCS 0x00000003UL
475 #define SE_COMMAND_OPTION_PADDING_PSS       0x00000004UL
476 
477 /* Special parameters for the Secure Element commands. */
478 #define SE_COMMAND_OPTION_READ              0x00000000UL
479 #define SE_COMMAND_OPTION_WRITE             0x00000100UL
480 
481 /** Magic parameter for deleting user data */
482 #define SE_COMMAND_OPTION_ERASE_UD          0xDE1E7EADUL
483 
484 #endif /* SEMAILBOX_PRESENT */
485 
486 /** Pubkey types */
487 #define SE_KEY_TYPE_BOOT                    0x00000100UL
488 #define SE_KEY_TYPE_AUTH                    0x00000200UL
489 
490 #define SE_COMMAND_INIT_OTP                 0xFF000001UL
491 #define SE_COMMAND_INIT_PUBKEY              0xFF070001UL
492 
493 #define SE_COMMAND_READ_PUBKEY              0xFF080001UL
494 
495 /**
496  * Command was not recognized as a valid command, or is not allowed in the
497  * current context.
498  */
499 #define SE_RESPONSE_INVALID_COMMAND         0x00010000UL
500 /**
501  * User did not provide the required credentials to be allowed to execute the
502  * command.
503  */
504 #define SE_RESPONSE_AUTHORIZATION_ERROR     0x00020000UL
505 /**
506  * Signature validation command (e.g. SE_COMMAND_SIGNATURE_VERIFY) failed to
507  * verify the given signature as being correct.
508  */
509 #define SE_RESPONSE_INVALID_SIGNATURE       0x00030000UL
510 /** A command started in non-secure mode is trying to access secure memory. */
511 #define SE_RESPONSE_BUS_ERROR               0x00040000UL
512 /** Internal error */
513 #define SE_RESPONSE_INTERNAL_ERROR          0x00050000UL
514 /** An internal error was raised and the command did not execute. */
515 #define SE_RESPONSE_CRYPTO_ERROR            0x00060000UL
516 /** One of the passed parameters is deemed invalid (e.g. out of bounds). */
517 #define SE_RESPONSE_INVALID_PARAMETER       0x00070000UL
518 /** Failure while checking the host for secure boot */
519 #define SE_RESPONSE_SECUREBOOT_ERROR        0x00090000UL
520 /** Failure during selftest */
521 #define SE_RESPONSE_SELFTEST_ERROR          0x000A0000UL
522 /** Feature/item not initialized or not present */
523 #define SE_RESPONSE_NOT_INITIALIZED         0x000B0000UL
524 /* Abort status code is given when no operation is attempted. */
525 #define SE_RESPONSE_ABORT                   0x00FF0000UL
526 
527 /** @endcond */
528 
529 /*******************************************************************************
530  *****************************   PROTOTYPES   **********************************
531  ******************************************************************************/
532 
533 #if defined(SEMAILBOX_PRESENT)
534 // Initialization commands
535 SE_Response_t SE_readPubkey(uint32_t key_type,
536                             void* pubkey,
537                             uint32_t numBytes,
538                             bool signature) SL_DEPRECATED_API_SDK_4_4;
539 #endif // #if defined(SEMAILBOX_PRESENT)
540 #endif // #if !defined(SLI_EM_SE_HOST)
541 
542 /** @} (end addtogroup se_deprecated) */
543 
544 #ifdef __cplusplus
545 }
546 #endif
547 
548 /** @} (end addtogroup se) */
549 
550 #endif /* defined(SEMAILBOX_PRESENT)
551        || defined(_SILICON_LABS_32B_SERIES_2_CONFIG_2) */
552 
553 #endif /* EM_SE_H */
554