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 PKA_ERROR_H 10 #define PKA_ERROR_H 11 12 /* 13 * All the includes that are needed for code using this module to 14 * compile correctly should be #included here. 15 */ 16 #include "cc_error.h" 17 18 #ifdef __cplusplus 19 extern "C" 20 { 21 #endif 22 23 /* base address - 0x00F10B00 */ 24 25 #define PKA_HW_VERSION_NOT_CORRECT_ERROR (PKA_MODULE_ERROR_BASE + 0x0UL) 26 #define PKA_HW_PIC_DECRYPED_FAILURE_ERROR (PKA_MODULE_ERROR_BASE + 0x1UL) 27 #define PKA_KG_UNSUPPORTED_KEY_SIZE (PKA_MODULE_ERROR_BASE + 0x2UL) 28 #define PKA_KEY_ILLEGAL_SIZE_ERROR (PKA_MODULE_ERROR_BASE + 0x3UL) 29 30 #define PKA_CONVERT_PRIV_KEY_TO_CRT_NOT_SUPPORTED (PKA_MODULE_ERROR_BASE + 0x10UL) 31 #define PKA_CONVERT_PRIV_KEY_TO_CRT_FACTORS_NOT_FOUND (PKA_MODULE_ERROR_BASE + 0x11UL) 32 #define PKA_CRT_WITH_512_BITS_KEY_ERROR (PKA_MODULE_ERROR_BASE + 0x12UL) 33 34 /* Error definitions for PKA using */ 35 #define PKA_ILLEGAL_PTR_ERROR (PKA_MODULE_ERROR_BASE + 0x20UL) 36 #define PKA_ENTRIES_COUNT_ERROR (PKA_MODULE_ERROR_BASE + 0x21UL) 37 #define PKA_REGISTER_SIZES_ERROR (PKA_MODULE_ERROR_BASE + 0x22UL) 38 #define PKA_SET_MAP_MODE_ERROR (PKA_MODULE_ERROR_BASE + 0x23UL) 39 #define PKA_ILLEGAL_OPERAND_LEN_ERROR (PKA_MODULE_ERROR_BASE + 0x24UL) 40 #define PKA_ILLEGAL_OPERAND_ERROR (PKA_MODULE_ERROR_BASE + 0x25UL) 41 #define PKA_ILLEGAL_OPCODE_ERROR (PKA_MODULE_ERROR_BASE + 0x26UL) 42 #define PKA_NOT_ENOUGH_MEMORY_ERROR (PKA_MODULE_ERROR_BASE + 0x27UL) 43 #define PKA_ILLEGAL_OPERAND_TYPE_ERROR (PKA_MODULE_ERROR_BASE + 0x28UL) 44 #define PKA_INVERSION_NOT_EXISTS_ERROR (PKA_MODULE_ERROR_BASE + 0x29UL) 45 #define PKA_NOT_ENOUGH_TEMP_REGS_ERROR (PKA_MODULE_ERROR_BASE + 0x2AUL) 46 #define PKA_OPERATION_NOT_SUPPORTED_ERROR (PKA_MODULE_ERROR_BASE + 0x2BUL) 47 #define PKA_MOD_EVEN_USE_OTHER_FUNC_ERROR (PKA_MODULE_ERROR_BASE + 0x2CUL) 48 #define PKA_DIVIDER_IS_NULL_ERROR (PKA_MODULE_ERROR_BASE + 0x2EUL) 49 #define PKA_MODULUS_IS_NULL_ERROR (PKA_MODULE_ERROR_BASE + 0x2FUL) 50 #define PKA_DATA_SIZE_ERROR (PKA_MODULE_ERROR_BASE + 0x30UL) 51 #define PKA_OPERATION_SIZE_ERROR (PKA_MODULE_ERROR_BASE + 0x31UL) 52 53 #define PKA_ILLEGAL_PKA_ADDRESS_ERROR (PKA_MODULE_ERROR_BASE + 0x32UL) 54 #define PKA_ILLEGAL_PKA_VIRT_PTR_ERROR (PKA_MODULE_ERROR_BASE + 0x33UL) 55 #define PKA_NAF_KEY_SIZE_ERROR (PKA_MODULE_ERROR_BASE + 0x34UL) 56 #define PKA_NAF_BUFFER_SIZE_ERROR (PKA_MODULE_ERROR_BASE + 0x35UL) 57 #define PKA_NAF_KEY_ERROR (PKA_MODULE_ERROR_BASE + 0x36UL) 58 #define PKA_NAF_INTERNAL_ERROR (PKA_MODULE_ERROR_BASE + 0x37UL) 59 #define PKA_REGS_COUNT_ERROR (PKA_MODULE_ERROR_BASE + 0x38UL) 60 #define PKA_INTERNAL_ERROR (PKA_MODULE_ERROR_BASE + 0x39UL) 61 #define PKA_FATAL_ERR_STATE_ERROR (PKA_MODULE_ERROR_BASE + 0x3AUL) 62 63 /* modular functions errors */ 64 #define PKA_MOD_SQUARE_ROOT_NOT_EXIST_ERROR (PKA_MODULE_ERROR_BASE + 0x40UL) 65 66 67 68 #ifdef __cplusplus 69 } 70 #endif 71 72 #endif 73 74