1 /* 2 * Copyright (c) 2021-2023, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 #ifndef CC3XX_ERROR_H 9 #define CC3XX_ERROR_H 10 11 #include <stdint.h> 12 13 typedef int cc3xx_err_t; 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 enum cc3xx_error { 19 CC3XX_ERR_SUCCESS = 0, 20 CC3XX_ERR_BUFFER_OVERFLOW, 21 CC3XX_ERR_INVALID_LCS, 22 CC3XX_ERR_INVALID_DATA, 23 CC3XX_ERR_INVALID_STATE, 24 CC3XX_ERR_NOT_IMPLEMENTED, 25 CC3XX_ERR_ENGINE_IN_USE, 26 CC3XX_ERR_KEY_IMPORT_FAILED, 27 CC3XX_ERR_INVALID_REMAP_REGION, 28 CC3XX_ERR_BUS_ERROR, 29 CC3XX_ERR_RNG_TOO_MANY_ATTEMPTS, 30 CC3XX_ERR_VERIFY_FAILED, 31 CC3XX_ERR_INVALID_TAG, 32 CC3XX_ERR_DMA_OUTPUT_BUFFER_TOO_SMALL, 33 CC3XX_ERR_INVALID_INPUT_LENGTH, 34 CC3XX_ERR_GCM_VARIABLE_IV_NOT_IMPLEMENTED, 35 CC3XX_ERR_CHACHA_IV_SIZE_INCORRECT, 36 CC3XX_ERR_DFA_VIOLATION, 37 CC3XX_ERR_DRBG_RESEED_REQUIRED, 38 CC3XX_ERR_DRBG_INVALID_ID, 39 CC3XX_ERR_MAX_VALUE = UINT32_MAX 40 }; 41 42 #ifdef __cplusplus 43 } 44 #endif 45 46 #endif /* CC3XX_ERROR_H */ 47