1 /*
2  * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 
8 /*!
9  @addtogroup cc_management_error
10  @{
11 */
12 
13 /*!
14  @file
15  @brief This file contains the error definitions of the CryptoCell management APIs.
16  */
17 
18 
19 #ifndef _MBEDTLS_CC_MNG_ERROR_H
20 #define _MBEDTLS_CC_MNG_ERROR_H
21 
22 #include "cc_error.h"
23 
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif
28 
29 
30 /************************ Defines ******************************/
31 
32 /* CryptoCell Management module errors. CC_MNG_MODULE_ERROR_BASE = 0x00F02900 */
33 
34 /*! Illegal input parameter. */
35 #define CC_MNG_ILLEGAL_INPUT_PARAM_ERR      (CC_MNG_MODULE_ERROR_BASE + 0x00UL)
36 /*! Illegal operation. */
37 #define CC_MNG_ILLEGAL_OPERATION_ERR        (CC_MNG_MODULE_ERROR_BASE + 0x01UL)
38 /*! Illegal Peripheral ID. */
39 #define CC_MNG_ILLEGAL_PIDR_ERR             (CC_MNG_MODULE_ERROR_BASE + 0x02UL)
40 /*! Illegal Component ID. */
41 #define CC_MNG_ILLEGAL_CIDR_ERR             (CC_MNG_MODULE_ERROR_BASE + 0x03UL)
42 /*! APB Secure is locked. */
43 #define CC_MNG_APB_SECURE_IS_LOCKED_ERR         (CC_MNG_MODULE_ERROR_BASE + 0x04UL)
44 /*! APB Privilege is locked. */
45 #define CC_MNG_APB_PRIVILEGE_IS_LOCKED_ERR  (CC_MNG_MODULE_ERROR_BASE + 0x05UL)
46 /*! APBC Secure is locked. */
47 #define CC_MNG_APBC_SECURE_IS_LOCKED_ERR    (CC_MNG_MODULE_ERROR_BASE + 0x06UL)
48 /*! APBC Privilege is locked. */
49 #define CC_MNG_APBC_PRIVILEGE_IS_LOCKED_ERR (CC_MNG_MODULE_ERROR_BASE + 0x07UL)
50 /*! APBC Instruction is locked. */
51 #define CC_MNG_APBC_INSTRUCTION_IS_LOCKED_ERR   (CC_MNG_MODULE_ERROR_BASE + 0x08UL)
52 /*! Invalid Key type. */
53 #define CC_MNG_INVALID_KEY_TYPE_ERROR       (CC_MNG_MODULE_ERROR_BASE + 0x09UL)
54 /*! Illegal size of HUK. */
55 #define CC_MNG_ILLEGAL_HUK_SIZE_ERR     (CC_MNG_MODULE_ERROR_BASE + 0x0AUL)
56 /*! Illegal size for any HW key other than HUK. */
57 #define CC_MNG_ILLEGAL_HW_KEY_SIZE_ERR      (CC_MNG_MODULE_ERROR_BASE + 0x0BUL)
58 /*! HW key is locked. */
59 #define CC_MNG_HW_KEY_IS_LOCKED_ERR         (CC_MNG_MODULE_ERROR_BASE + 0x0CUL)
60 /*! Kcp is locked. */
61 #define CC_MNG_KCP_IS_LOCKED_ERR            (CC_MNG_MODULE_ERROR_BASE + 0x0DUL)
62 /*! Kce is locked. */
63 #define CC_MNG_KCE_IS_LOCKED_ERR        (CC_MNG_MODULE_ERROR_BASE + 0x0EUL)
64 /*! RMA Illegal state. */
65 #define CC_MNG_RMA_ILLEGAL_STATE_ERR        (CC_MNG_MODULE_ERROR_BASE + 0x0FUL)
66 /*! Error returned from AO_APB_FILTERING write operation. */
67 #define CC_MNG_AO_APB_WRITE_FAILED_ERR      (CC_MNG_MODULE_ERROR_BASE + 0x10UL)
68 /*! APBC access failure. */
69 #define CC_MNG_APBC_ACCESS_FAILED_ERR       (CC_MNG_MODULE_ERROR_BASE + 0x11UL)
70 /*! APBC already-off failure. */
71 #define CC_MNG_APBC_ACCESS_ALREADY_OFF_ERR  (CC_MNG_MODULE_ERROR_BASE + 0x12UL)
72 /*! APBC access is on failure. */
73 #define CC_MNG_APBC_ACCESS_IS_ON_ERR        (CC_MNG_MODULE_ERROR_BASE + 0x13UL)
74 /*! PM SUSPEND/RESUME failure. */
75 #define CC_MNG_PM_SUSPEND_RESUME_FAILED_ERR (CC_MNG_MODULE_ERROR_BASE + 0x14UL)
76 /*! SW version failure. */
77 #define CC_MNG_ILLEGAL_SW_VERSION_ERR       (CC_MNG_MODULE_ERROR_BASE + 0x15UL)
78 /*! Hash Public Key NA. */
79 #define CC_MNG_HASH_NOT_PROGRAMMED_ERR      (CC_MNG_MODULE_ERROR_BASE + 0x16UL)
80 /*! Illegal hash boot key zero count in the OTP error. */
81 #define CC_MNG_HBK_ZERO_COUNT_ERR           (CC_MNG_MODULE_ERROR_BASE + 0x17UL)
82 
83 /************************ Enums ********************************/
84 
85 /************************ Typedefs  ****************************/
86 
87 /************************ Structs  *****************************/
88 
89 /************************ Public Variables *********************/
90 
91 /************************ Public Functions *********************/
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 /*!
98  @}
99  */
100 #endif // _MBEDTLS_CC_MNG_ERROR_H
101 
102