1 /* 2 * Copyright 2021 NXP 3 * All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 #ifndef _FSL_CSS_PKC_H_ 9 #define _FSL_CSS_PKC_H_ 10 11 #include <stdint.h> 12 #include <stddef.h> 13 14 #include "fsl_common.h" 15 #include <mcuxClCss.h> // Interface to the entire nxpClCss component 16 #include <mcuxCsslFlowProtection.h> // Code flow protection 17 #include <ip_platform.h> 18 19 /*! 20 * @addtogroup css_pkc 21 * @{ 22 */ 23 24 /******************************************************************************* 25 * Definitions 26 ******************************************************************************/ 27 enum 28 { 29 kStatus_SlotUnavailable = MAKE_STATUS(kStatusGroup_CSS_PKC, 0), /*!< Key slot is not available to be used as PRNG kick-off. */ 30 }; 31 /******************************************************************************* 32 * API 33 ******************************************************************************/ 34 #if defined(__cplusplus) 35 extern "C" { 36 #endif 37 38 /*! 39 * @brief CSS Init after power down. 40 * 41 * This function enable all CSS related clocks, enable CSS and start CSS PRNG. 42 * Normally all of these actions are done automatically by boot ROM, but if an application uses Power Down mode 43 * this function must be called before using CSS after wake-up. 44 * 45 * @param base CSS peripheral address. 46 * 47 * @return kStatus_Success upon success, kStatus_Fail otherwise 48 */ 49 status_t CSS_PowerDownWakeupInit(CSS_Type *base); 50 51 /*! 52 * @brief PKC Init after power down. 53 * 54 * This function enables RAM interleave, clocks, zeroize the PKC RAM and reset PKC peripheral. 55 * Normally all of these actions are done automatically by boot ROM, but if an application uses Power Down mode 56 * this function must be called before using PKC after wake-up. 57 * 58 * @param base PKC peripheral address. 59 * 60 * @return kStatus_Success upon success, kStatus_Fail otherwise 61 */ 62 status_t PKC_PowerDownWakeupInit(PKC_Type *base); 63 64 /*! 65 * @brief PKC Init after power down. 66 * 67 * This function enables RAM interleave, clocks and reset PKC peripheral. 68 * 69 * @param base PKC peripheral address. 70 * 71 * @return kStatus_Success upon success, kStatus_Fail otherwise 72 */ 73 status_t PKC_InitNoZeroize(PKC_Type *base); 74 75 #if defined(__cplusplus) 76 } 77 #endif 78 79 /*! 80 *@} 81 */ 82 83 #endif /* _FSL_CSS_PKC_H_ */ 84