MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches
mcuxClSession_Types.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/* Copyright 2020-2025 NXP */
3/* */
4/* NXP Confidential and Proprietary. This software is owned or controlled */
5/* by NXP and may only be used strictly in accordance with the applicable */
6/* license terms. By expressly accepting such terms or by downloading, */
7/* installing, activating and/or otherwise using the software, you are */
8/* agreeing that you have read, and that you agree to comply with and are */
9/* bound by, such license terms. If you do not agree to be bound by the */
10/* applicable license terms, then you may not retain, install, activate or */
11/* otherwise use the software. */
12/*--------------------------------------------------------------------------*/
13
18
19#ifndef MCUXCLSESSION_TYPES_H_
20#define MCUXCLSESSION_TYPES_H_
21
22#include <mcuxClCore_Platform.h>
25
26#include <mcuxClRandom_Types.h>
28
29/**********************************************
30 * CONSTANTS
31 **********************************************/
38
39#define MCUXCLSESSION_STATUS_OK ((mcuxClSession_Status_t) 0x0EEE2E03u)
40#define MCUXCLSESSION_STATUS_ERROR ((mcuxClSession_Status_t) 0x0EEE5330u)
41#define MCUXCLSESSION_STATUS_ERROR_MEMORY_ALLOCATION ((mcuxClSession_Status_t) 0x0EEE534Fu)
42#define MCUXCLSESSION_STATUS_FAULT_ATTACK ((mcuxClSession_Status_t) 0x0EEEF0F0u)
43
44#define MCUXCLSESSION_DMACHANNEL_INVALID ((mcuxClSession_Channel_t) 0xFFFFu)
45
46
47
51/* mcuxClSession_Constants */
52
53/**********************************************
54 * TYPEDEFS
55 **********************************************/
62
66typedef uint32_t mcuxClSession_Status_t;
67
72
77{
78 uint32_t * buffer;
79 uint32_t size;
80 uint32_t used;
81 uint32_t dirty;
83
88
92struct mcuxClSession_Descriptor; /* forward declaration */
93typedef struct mcuxClSession_Descriptor mcuxClSession_Descriptor_t;
94
98typedef mcuxClSession_Descriptor_t * const mcuxClSession_Handle_t;
99
105typedef uint16_t mcuxClSession_Channel_t;
106
112typedef struct
113{
117
123typedef void (*mcuxClSession_Callback_t)(uint32_t status, void * data);
124
130MCUX_CSSL_FP_FUNCTION_POINTER(mcuxClSession_HwInterruptHandler_t,
131 typedef MCUX_CSSL_FP_PROTECTED_TYPE(void) (*mcuxClSession_HwInterruptHandler_t)(mcuxClSession_Handle_t session)
132);
133
137typedef struct mcuxClSession_HwTable mcuxClSession_HwTable_t;
138
142typedef struct
143{
144 mcuxClSession_Channels_t dmaChannels;
145 mcuxClSession_Callback_t pUserCallback;
146 void *pUserData;
147 mcuxClSession_HwInterruptHandler_t pCallBackDMA;
148 uint32_t protectionToken_pCallBackDMA;
149 mcuxClSession_HwInterruptHandler_t pCallBackCopro;
150 uint32_t protectionToken_pCallBackCopro;
151 void *pClWorkarea; /* Used for non blocking flow to handover cl data to the interrupt */
153
157typedef struct mcuxClSession_apiCall mcuxClSession_apiCall_t;
158
171
172 /* mcuxClSession_Types */
176
177#endif /* MCUXCLSESSION_TYPES_H_ */
Definition of function identifiers for the flow protection mechanism.
Type definitions of mcuxClRandom component.
Type definitions for the mcuxClResource component.
Provides the API for the CSSL flow protection mechanism.
struct mcuxClRandom_Config mcuxClRandom_Config_t
Random config type.
Definition mcuxClRandom_Types.h:122
struct mcuxClResource_Context mcuxClResource_Context_t
Resource context type.
Definition mcuxClResource_Types.h:47
mcuxClSession_Status_t mcuxClSession_Status_Protected_t
Deprecated type for mcuxClSession protected status codes.
Definition mcuxClSession_Types.h:71
struct mcuxClSession_HwTable mcuxClSession_HwTable_t
Table recording HW preempted from this session.
Definition mcuxClSession_Types.h:137
mcuxClSession_Descriptor_t *const mcuxClSession_Handle_t
Type for mcuxClSession Handle.
Definition mcuxClSession_Types.h:98
void(* mcuxClSession_Callback_t)(uint32_t status, void *data)
Session callback function pointer type.
Definition mcuxClSession_Types.h:123
struct mcuxClSession_apiCall mcuxClSession_apiCall_t
Type for mcuxClSession API calls.
Definition mcuxClSession_Types.h:157
uint32_t mcuxClSession_Status_t
Type for mcuxClSession status codes.
Definition mcuxClSession_Types.h:66
uint32_t mcuxClSession_SecurityOptions_t
Type for Session security options.
Definition mcuxClSession_Types.h:87
struct mcuxClSession_WorkArea mcuxClSession_WorkArea_t
Type for mcuxClSession workareas flags.
uint16_t mcuxClSession_Channel_t
Session channel type.
Definition mcuxClSession_Types.h:105
#define MCUX_CSSL_FP_PROTECTED_TYPE(resultType)
Based on a given base type, builds a return type with flow protection.
Definition mcuxCsslFlowProtection.h:138
#define MCUX_CSSL_FP_FUNCTION_POINTER(type, definition)
Definition of a flow protected function pointer.
Definition mcuxCsslFlowProtection.h:236
Type for mcuxClSession workareas flags.
Definition mcuxClSession_Types.h:77
uint32_t size
Size of the workarea buffer in words (uint32_t).
Definition mcuxClSession_Types.h:79
uint32_t dirty
Maximum used portion of the workarea buffer in words (uint32_t).
Definition mcuxClSession_Types.h:81
uint32_t used
Used portion of the workarea buffer in words (uint32_t).
Definition mcuxClSession_Types.h:80
uint32_t * buffer
Pointer to the starting address of the workarea buffer.
Definition mcuxClSession_Types.h:78
Session channels type.
Definition mcuxClSession_Types.h:113
Type for mcuxClSession non-blocking job context.
Definition mcuxClSession_Types.h:143
Structure for mcuxClSession Descriptor.
Definition mcuxClSession_Types.h:163
mcuxClSession_JobContext_t jobContext
Context of non-blocking job.
Definition mcuxClSession_Types.h:168
mcuxClRandom_Config_t randomCfg
Configuration of the Rng (contexts and mode).
Definition mcuxClSession_Types.h:166
mcuxClSession_WorkArea_t pkcWa
Workarea for the PKC.
Definition mcuxClSession_Types.h:165
mcuxClSession_WorkArea_t cpuWa
Workarea for the CPU.
Definition mcuxClSession_Types.h:164
mcuxClSession_apiCall_t * apiCall
Context for API calls.
Definition mcuxClSession_Types.h:169
mcuxClResource_Context_t * pResourceCtx
Pointer to global resource context.
Definition mcuxClSession_Types.h:167