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 #ifndef _SBROM_BSV_ERROR_H 10 #define _SBROM_BSV_ERROR_H 11 12 #ifdef __cplusplus 13 extern "C" 14 { 15 #endif 16 17 /*! @file 18 @brief This file defines the error code types returned from the Boot Services API's. 19 */ 20 21 /*! Defines BSV base error. */ 22 #define CC_BSV_BASE_ERROR 0x0B000000 23 /*! Defines BSV cryptographic base error. */ 24 #define CC_BSV_CRYPTO_ERROR 0x0C000000 25 26 /*! Illegal input parameter error. */ 27 #define CC_BSV_ILLEGAL_INPUT_PARAM_ERR (CC_BSV_BASE_ERROR + 0x00000001) 28 /*! Illegal HUK value error. */ 29 #define CC_BSV_ILLEGAL_HUK_VALUE_ERR (CC_BSV_BASE_ERROR + 0x00000002) 30 /*! Illegal Kcp value error. */ 31 #define CC_BSV_ILLEGAL_KCP_VALUE_ERR (CC_BSV_BASE_ERROR + 0x00000003) 32 /*! Illegal Kce value error. */ 33 #define CC_BSV_ILLEGAL_KCE_VALUE_ERR (CC_BSV_BASE_ERROR + 0x00000004) 34 /*! Illegal Kpicv value error. */ 35 #define CC_BSV_ILLEGAL_KPICV_VALUE_ERR (CC_BSV_BASE_ERROR + 0x00000005) 36 /*! Illegal Kceicv value error. */ 37 #define CC_BSV_ILLEGAL_KCEICV_VALUE_ERR (CC_BSV_BASE_ERROR + 0x00000006) 38 /*! Hash boot key not programmed in the OTP error. */ 39 #define CC_BSV_HASH_NOT_PROGRAMMED_ERR (CC_BSV_BASE_ERROR + 0x00000007) 40 /*! Illegal Hash boot key zero count in the OTP error. */ 41 #define CC_BSV_HBK_ZERO_COUNT_ERR (CC_BSV_BASE_ERROR + 0x00000008) 42 /*! Illegal LCS error. */ 43 #define CC_BSV_ILLEGAL_LCS_ERR (CC_BSV_BASE_ERROR + 0x00000009) 44 /*! OTP write compare failure error. */ 45 #define CC_BSV_OTP_WRITE_CMP_FAIL_ERR (CC_BSV_BASE_ERROR + 0x0000000A) 46 /*! Erase key in OTP failed error. */ 47 #define CC_BSV_ERASE_KEY_FAILED_ERR (CC_BSV_BASE_ERROR + 0x0000000B) 48 /*! Illegal PIDR error. */ 49 #define CC_BSV_ILLEGAL_PIDR_ERR (CC_BSV_BASE_ERROR + 0x0000000C) 50 /*! Illegal CIDR error. */ 51 #define CC_BSV_ILLEGAL_CIDR_ERR (CC_BSV_BASE_ERROR + 0x0000000D) 52 /*! Device failed to move to fatal error state. */ 53 #define CC_BSV_FAILED_TO_SET_FATAL_ERR (CC_BSV_BASE_ERROR + 0x0000000E) 54 /*! Failed to set RMA LCS error. */ 55 #define CC_BSV_FAILED_TO_SET_RMA_ERR (CC_BSV_BASE_ERROR + 0x0000000F) 56 /*! Illegal RMA indication error. */ 57 #define CC_BSV_ILLEGAL_RMA_INDICATION_ERR (CC_BSV_BASE_ERROR + 0x00000010) 58 /*! BSV version is not initialized error. */ 59 #define CC_BSV_VER_IS_NOT_INITIALIZED_ERR (CC_BSV_BASE_ERROR + 0x00000011) 60 /*! APB secure mode is locked error. */ 61 #define CC_BSV_APB_SECURE_IS_LOCKED_ERR (CC_BSV_BASE_ERROR + 0x00000012) 62 /*! APB privilege mode is locked error. */ 63 #define CC_BSV_APB_PRIVILEG_IS_LOCKED_ERR (CC_BSV_BASE_ERROR + 0x00000013) 64 /*! Illegal operation error. */ 65 #define CC_BSV_ILLEGAL_OPERATION_ERR (CC_BSV_BASE_ERROR + 0x00000014) 66 /*! Illegal asset size error. */ 67 #define CC_BSV_ILLEGAL_ASSET_SIZE_ERR (CC_BSV_BASE_ERROR + 0x00000015) 68 /*! Illegal asset value error. */ 69 #define CC_BSV_ILLEGAL_ASSET_VAL_ERR (CC_BSV_BASE_ERROR + 0x00000016) 70 /*! Kpicv is locked error. */ 71 #define CC_BSV_KPICV_IS_LOCKED_ERR (CC_BSV_BASE_ERROR + 0x00000017) 72 /*! Illegal SW version error. */ 73 #define CC_BSV_ILLEGAL_SW_VERSION_ERR (CC_BSV_BASE_ERROR + 0x00000018) 74 /*! AO write operation error. */ 75 #define CC_BSV_AO_WRITE_FAILED_ERR (CC_BSV_BASE_ERROR + 0x00000019) 76 /*! Device is locked in fatal error state. */ 77 #define CC_BSV_FATAL_ERR_IS_LOCKED_ERR (CC_BSV_BASE_ERROR + 0x0000001A) 78 79 /*! Illegal data in pointer error. */ 80 #define CC_BSV_INVALID_DATA_IN_POINTER_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000001) 81 /*! Illegal data out pointer error. */ 82 #define CC_BSV_INVALID_DATA_OUT_POINTER_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000002) 83 /*! Illegal data size error. */ 84 #define CC_BSV_INVALID_DATA_SIZE_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000003) 85 /*! Illegal key type error. */ 86 #define CC_BSV_INVALID_KEY_TYPE_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000004) 87 /*! Illegal key size error. */ 88 #define CC_BSV_INVALID_KEY_SIZE_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000005) 89 /*! Illegal KDF label error. */ 90 #define CC_BSV_ILLEGAL_KDF_LABEL_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000006) 91 /*! Illegal KDF context error. */ 92 #define CC_BSV_ILLEGAL_KDF_CONTEXT_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000007) 93 /*! Invalid CCM key error. */ 94 #define CC_BSV_CCM_INVALID_KEY_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000008) 95 /*! Invalid CCM Nonce error. */ 96 #define CC_BSV_CCM_INVALID_NONCE_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000009) 97 /*! Invalid CCM associated data error. */ 98 #define CC_BSV_CCM_INVALID_ASSOC_DATA_ERROR (CC_BSV_CRYPTO_ERROR + 0x0000000A) 99 /*! Invalid CCM text data error. */ 100 #define CC_BSV_CCM_INVALID_TEXT_DATA_ERROR (CC_BSV_CRYPTO_ERROR + 0x0000000B) 101 /*! Invalid CCM-MAC buffer error. */ 102 #define CC_BSV_CCM_INVALID_MAC_BUF_ERROR (CC_BSV_CRYPTO_ERROR + 0x0000000C) 103 /*! Output and input data are overlapping error. */ 104 #define CC_BSV_CCM_DATA_OUT_DATA_IN_OVERLAP_ERROR (CC_BSV_CRYPTO_ERROR + 0x0000000D) 105 /*! CCM-MAC comparison failed error. */ 106 #define CC_BSV_CCM_MAC_INVALID_ERROR (CC_BSV_CRYPTO_ERROR + 0x0000000E) 107 /*! Invalid CCM mode error. */ 108 #define CC_BSV_CCM_INVALID_MODE_ERROR (CC_BSV_CRYPTO_ERROR + 0x0000000F) 109 /*! Invalid out pointer error. */ 110 #define CC_BSV_INVALID_OUT_POINTER_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000010) 111 /*! Illegal cryptographic mode error. */ 112 #define CC_BSV_INVALID_CRYPTO_MODE_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000011) 113 /*! Illegal IV pointer error. */ 114 #define CC_BSV_INVALID_IV_POINTER_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000012) 115 /*! Illegal result buffer pointer error. */ 116 #define CC_BSV_INVALID_RESULT_BUFFER_POINTER_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000013) 117 118 #ifdef __cplusplus 119 } 120 #endif 121 122 #endif 123 124 125 126