|
AM64x MCU+ SDK
10.00.00
|
|
Go to the documentation of this file.
57 #include <security_common/drivers/crypto/pka/hw_include/cslr_cp_ace.h>
73 #define SA2UL_MAX_HASH_SIZE_BYTES (64U)
75 #define SA2UL_MAX_KEY_SIZE_BYTES (32U)
77 #define SA2UL_MAX_IV_SIZE_BYTES (16U)
79 #define SA2UL_NUMBER_OF_RINGS (3U)
81 #define SA2UL_CACHELINE_ALIGNMENT (16U)
83 #define SA2UL_SECCTX_SIZE (256U)
85 #define SA2UL_INSTANCES_MAX (4U)
87 #define SA2UL_RING_N_ELEMS (8U)
89 #define SA2UL_SW_RING_NUM (304U)
91 #define SA2UL_MAX_INPUT_LENGTH_ENC (0xFFFFU)
93 #define SA2UL_MAX_INPUT_LENGTH_AUTH (0x3FFFFFU)
102 #define SA2UL_HASH_ALG_NULL (0x10U)
104 #define SA2UL_HASH_ALG_SHA1 (0x12U)
106 #define SA2UL_HASH_ALG_SHA2_256 (0x14U)
108 #define SA2UL_HASH_ALG_SHA2_512 (0x16U)
117 #define SA2UL_OP_ENC (0x01U)
119 #define SA2UL_OP_AUTH (0x02U)
121 #define SA2UL_OP_ENC_THEN_AUTH (0x03U)
123 #define SA2UL_OP_AUTH_THEN_ENC (0x04U)
132 #define SA2UL_ENGINE_CODE_DEFAULT_ENGINE_ID (0U)
134 #define SA2UL_ENGINE_CODE_ENCRYPTION_MODULE_P1 (2U)
136 #define SA2UL_ENGINE_CODE_ENCRYPTION_MODULE_P2 (3U)
138 #define SA2UL_ENGINE_CODE_AUTHENTICATION_MODULE_P1 (4U)
140 #define SA2UL_ENGINE_CODE_AUTHENTICATION_MODULE_P2 (5U)
142 #define SA2UL_ENGINE_CODE_DEFAULT_EGRESS_PORT (20U)
151 #define SA2UL_ENC_ALG_AES (0x0U)
153 #define SA2UL_ENC_ALG_TDES (0x1U)
155 #define SA2UL_ENC_ALG_MAX (0x2U)
164 #define SA2UL_ENC_DIR_ENCRYPT (0x0U)
166 #define SA2UL_ENC_DIR_DECRYPT (0x1U)
175 #define SA2UL_ENC_MODE_ECB (0x0U)
177 #define SA2UL_ENC_MODE_CBC (0x1U)
179 #define SA2UL_ENC_MODE_MAX (0x2U)
188 #define SA2UL_ENC_KEYSIZE_128 (0x0U)
190 #define SA2UL_ENC_KEYSIZE_192 (0x1U)
192 #define SA2UL_ENC_KEYSIZE_256 (0x2U)
194 #define SA2UL_ENC_KEYSIZE_MAX (0x3U)
197 #define SA2UL_ENC_KEYSIZE_BITS(k) (128u + (64u * (k)))
260 uint32_t udmapRxChnum[2];
394 uint32_t reserved1[4];
395 uint32_t authenticationKeyValueL[8];
397 uint32_t authenticationKeyValueH[8];
414 uint32_t modeCtrlInstrs[6];
416 uint32_t encKeyValue[8];
421 uint8_t preCryptoData[15];
587 memset(ctxPrms, 0,
sizeof(*ctxPrms));
Parameters passed to SA2UL_open()
Definition: sa2ul.h:236
uint32_t numDesc
Definition: sa2ul.h:334
uint8_t hashAlg
Definition: sa2ul.h:213
SA2UL_Scctl scctl
Definition: sa2ul.h:429
Parameters passed to SA2UL_contextAlloc()
Definition: sa2ul.h:210
SA2UL_Attrs * attrs
Definition: sa2ul.h:371
CSL_Cp_aceRegs * pSaRegs
Definition: sa2ul.h:252
void * Udma_FlowHandle
UDMA flow handle.
Definition: udma_types.h:73
uint32_t contextIdMaxNum
Definition: sa2ul.h:352
uint32_t secure
Definition: sa2ul.h:364
#define SA2UL_INSTANCES_MAX
Max SA2UL instances.
Definition: sa2ul.h:85
SA2UL_Handle handle
Definition: sa2ul.h:446
SA2UL context RAM structure for authentication engine.
Definition: sa2ul.h:389
uint8_t sopOffset
Definition: sa2ul.h:380
uint16_t index
Definition: tisci_rm_proxy.h:3
SA2UL_Config gSa2ulConfig[]
Externally defined driver configuration array.
uint8_t encMode
Definition: sa2ul.h:219
uint8_t encKeySize
Definition: sa2ul.h:223
SA2UL context RAM structure.
Definition: sa2ul.h:428
uint32_t storageQueueHead
Definition: sa2ul.h:300
void * Udma_ChHandle
UDMA channel handle.
Definition: udma_types.h:67
uint32_t reserved0
Definition: sa2ul.h:391
#define SA2UL_RING_N_ELEMS
Max SA2UL ring n elements.
Definition: sa2ul.h:87
SA2UL context object structure.
Definition: sa2ul.h:442
Opaque UDMA ring object.
Definition: udma_ring.h:596
uint8_t secCtxId
Definition: sa2ul.h:445
uint8_t opType
Definition: sa2ul.h:211
int32_t SA2UL_contextFree(SA2UL_ContextObject *pCtxObj)
Function to free secure context configuration.
Udma_ChHandle txChHandle
Definition: sa2ul.h:283
uint32_t totalLengthInBytes
Definition: sa2ul.h:449
int32_t SA2UL_contextAlloc(SA2UL_Handle handle, SA2UL_ContextObject *ctxObj, const SA2UL_ContextParams *ctxPrms)
Function to configure secure context.
void SA2UL_close(SA2UL_Handle handle)
Function to close a SA2UL module specified by the SA2UL handle.
uint32_t rxBytesCnt
Definition: sa2ul.h:453
SA2UL_SecCtx secCtx
Definition: sa2ul.h:443
int32_t SA2UL_engineDisable(int32_t hwDisableMask)
This function disable particular SA2UL engine based on user input mask.
uint32_t authCtx1
Definition: sa2ul.h:390
#define SA2UL_MAX_IV_SIZE_BYTES
Max Initialization vector (IV) size in bytes.
Definition: sa2ul.h:77
uint32_t gSa2ulConfigNum
Externally defined driver configuration Num.
SA2UL instance attributes - used during init time.
Definition: sa2ul.h:318
void * SA2UL_Handle
Handle to the SA2UL driver returned by SA2UL_open()
Definition: sa2ul.h:204
uint32_t gSa2ulEngineEnableMask
Externally defined driver engine configuration mask.
int32_t SA2UL_contextProcess(SA2UL_ContextObject *ctxObj, const uint8_t *input, uint32_t ilen, uint8_t *output)
Function to transfer and recieve data buffer.
Udma_EventHandle rxEvtHandle
Definition: sa2ul.h:295
Udma_RingHandle txRingHandle
Definition: sa2ul.h:293
Udma_FlowHandle rxFlowHandle
Definition: sa2ul.h:285
uint32_t encrCtl
Definition: sa2ul.h:413
void SA2UL_init(void)
This function initializes the SA2UL module.
uint32_t computationStatus
Definition: sa2ul.h:451
uint8_t encAlg
Definition: sa2ul.h:215
void * Udma_RingHandle
UDMA ring handle.
Definition: udma_types.h:71
SA2UL_Handle SA2UL_open(uint32_t index, const SA2UL_Params *params)
This function opens a given SA2UL module.
uint8_t contextId
Definition: sa2ul.h:312
uint8_t middleOffset
Definition: sa2ul.h:381
uint32_t scptrH
Definition: sa2ul.h:406
Opaque UDMA channel object.
Definition: udma_ch.h:944
uint32_t privId
Definition: sa2ul.h:360
Udma_EventObject udmaEvtObj
Definition: sa2ul.h:275
#define SA2UL_NUMBER_OF_RINGS
Max number of rings.
Definition: sa2ul.h:79
static void SA2UL_ContextParams_init(SA2UL_ContextParams *ctxPrms)
Definition: sa2ul.h:583
uint32_t txBytesCnt
Definition: sa2ul.h:452
Udma_ChObject udmaTxChObj
Definition: sa2ul.h:267
SA2UL context RAM structure for Encryption engine.
Definition: sa2ul.h:412
uint32_t scptrL
Definition: sa2ul.h:407
SA2UL_SecCtxAuth auth
Definition: sa2ul.h:433
Opaque UDMA flow object.
Definition: udma_flow.h:438
uint32_t txPsilThreadId
Definition: sa2ul.h:324
#define SA2UL_MAX_KEY_SIZE_BYTES
Max key size in bytes.
Definition: sa2ul.h:75
SA2UL_Handle handle
Definition: sa2ul.h:246
uint32_t rxPsil1ThreadId
Definition: sa2ul.h:328
SA2UL_Params prms
Definition: sa2ul.h:248
uint32_t descSize
Definition: sa2ul.h:336
uint32_t txRingNumInt
Definition: sa2ul.h:354
uint32_t udmaHandle
Definition: sa2ul.h:348
uint32_t rxPsil0ThreadId
Definition: sa2ul.h:326
void * Udma_EventHandle
UDMA event handle.
Definition: udma_types.h:69
uint32_t ringCnt
Definition: sa2ul.h:346
uint32_t inputLen
Definition: sa2ul.h:225
uint32_t udmapTxChnum
Definition: sa2ul.h:258
uint32_t rxRingNumInt
Definition: sa2ul.h:356
int32_t SA2UL_engineEnable(int32_t hwEnableMask)
This function enable particular SA2UL engine based on user input mask.
SA2UL_ContextParams ctxPrms
Definition: sa2ul.h:447
SA2UL SC control structure.
Definition: sa2ul.h:403
Udma_RingHandle rxFreeRingHandle
Definition: sa2ul.h:287
uint32_t udmaSaRxGroupNum
Definition: sa2ul.h:344
uint32_t reserved
Definition: sa2ul.h:237
uint32_t authenticationLengthHi
Definition: sa2ul.h:392
uint8_t encDirection
Definition: sa2ul.h:217
uint32_t scctl2
Definition: sa2ul.h:405
Udma_RingHandle rxRingHandle
Definition: sa2ul.h:289
uint32_t storageQueueTail
Definition: sa2ul.h:301
SA2UL_Object * object
Definition: sa2ul.h:373
Udma_FlowObject udmaFlowObj
Definition: sa2ul.h:271
UDMA Driver API/interface file.
void * Udma_DrvHandle
UDMA driver handle.
Definition: udma_types.h:65
Udma_DrvHandle drvHandle
Definition: sa2ul.h:279
uint32_t storageQueueFree
Definition: sa2ul.h:302
Udma_EventObject udmaEvtObj0
Definition: sa2ul.h:277
uint32_t priv
Definition: sa2ul.h:362
uint32_t rxRingMemAddr
Definition: sa2ul.h:330
uint32_t descMemSize
Definition: sa2ul.h:340
uint32_t udmapRxFlownum
Definition: sa2ul.h:262
Udma_RingHandle txComplRingHandle
Definition: sa2ul.h:291
uint32_t udmaSaTxGroupNum
Definition: sa2ul.h:342
MEDdata for Encryption engine.
Definition: sa2ul.h:379
static void SA2UL_Params_init(SA2UL_Params *prms)
Function to initialize default SA2UL parameters.
Definition: sa2ul.h:575
Object for a SA2UL crypto operation.
Definition: sa2ul.h:245
uint32_t sa2ulErrCnt
Definition: sa2ul.h:454
const uint8_t * mcInstrs
Definition: sa2ul.h:384
uint32_t saBaseAddr
Definition: sa2ul.h:322
Opaque UDMA event object.
Definition: udma_event.h:479
#define SA2UL_MAX_HASH_SIZE_BYTES
Max hash size in bytes.
Definition: sa2ul.h:73
uint32_t hwCtrlWord
Definition: sa2ul.h:415
uint32_t swRingNumInt
Definition: sa2ul.h:358
uint32_t descMemAddr
Definition: sa2ul.h:338
uint32_t scctl1
Definition: sa2ul.h:404
uint32_t authenticationLengthLo
Definition: sa2ul.h:393
uint32_t psilInst
Definition: sa2ul.h:254
SA2UL_SecCtxEnc enc
Definition: sa2ul.h:434
uint32_t contextIdStart
Definition: sa2ul.h:350
void SA2UL_deinit(void)
This function de-initializes the SA2UL module.
SA2UL driver context.
Definition: sa2ul.h:370
uint8_t eopOffset
Definition: sa2ul.h:382
uint8_t nMCInstrs
Definition: sa2ul.h:383
uint32_t txRingMemAddr
Definition: sa2ul.h:332
uint32_t isOpen
Definition: sa2ul.h:250