![]() |
xilasu
Vitis Drivers API Documentation
|
Functions | |
| s32 | XAsu_Sha2Operation (XAsu_ClientParams *ClientParamPtr, XAsu_ShaOperationCmd *ShaClientParamPtr) |
| This function sends a command to ASUFW to generate the digest for the provided input message using the specified SHA algorithm. More... | |
| s32 | XAsu_Sha2Kat (XAsu_ClientParams *ClientParamPtr) |
| This function performs SHA2 Known Answer Tests (KAT's). More... | |
| s32 XAsu_Sha2Kat | ( | XAsu_ClientParams * | ClientParamPtr | ) |
This function performs SHA2 Known Answer Tests (KAT's).
| ClientParamsPtr | Pointer to the XAsu_ClientParams structure which holds the client input parameters. |
Validate input parameters.
Generate unique ID and register the callback.
Create command header.
Update request buffer and send an IPI request to ASU.
References XAsu_CreateHeader(), XASU_INVALID_UNIQUE_ID, XASU_MODULE_SHA2_ID, XAsu_RegCallBackNGetUniqueId(), XASU_SHA_KAT_CMD_ID, XASU_UNIQUE_ID_MAX, XAsu_UpdateQueueBufferNSendIpi(), and XAsu_ValidateClientParameters().
| s32 XAsu_Sha2Operation | ( | XAsu_ClientParams * | ClientParamPtr, |
| XAsu_ShaOperationCmd * | ShaClientParamPtr | ||
| ) |
This function sends a command to ASUFW to generate the digest for the provided input message using the specified SHA algorithm.
| ClientParamPtr | Pointer to the XAsu_ClientParams structure which holds client input arguments. |
| ShaClientParamPtr | Pointer to the XAsu_ShaOperationCmd structure which holds parameters of SHA input arguments. |
Validate input parameters.
The maximum length of input data should be less than 0x1FFFFFFC bytes, which is the ASU DMA's maximum supported data transfer length.
If operation flag is set to START,
If operation flag is either UPDATE or FINISH,
If FINISH operation flag is set, update response buffer details.
Create command header.
Update request buffer and send an IPI request to ASU.
References XAsu_ClientParams::ClientCtx, XAsu_ShaOperationCmd::DataAddr, XAsu_ShaOperationCmd::DataSize, XAsu_ShaOperationCmd::HashAddr, XAsu_ShaOperationCmd::HashBufSize, XAsu_ShaOperationCmd::IsLast, XAsu_ShaOperationCmd::OperationFlags, XAsu_ShaOperationCmd::ShaMode, XAsu_CreateHeader(), XASU_FAIL_SAVE_CTX, XAsu_FreeCtx(), XASU_INVALID_ARGUMENT, XASU_INVALID_UNIQUE_ID, XASU_MODULE_SHA2_ID, XAsu_RegCallBackNGetUniqueId(), XASU_SHA_256_HASH_LEN, XASU_SHA_384_HASH_LEN, XASU_SHA_512_HASH_LEN, XASU_SHA_FINISH, XASU_SHA_MODE_SHA256, XASU_SHA_MODE_SHA384, XASU_SHA_MODE_SHA512, XASU_SHA_OPERATION_CMD_ID, XASU_SHA_START, XASU_SHA_UPDATE, XASU_UNIQUE_ID_MAX, XAsu_UpdateCallBackDetails(), XAsu_UpdateNGetCtx(), XAsu_UpdateQueueBufferNSendIpi(), XAsu_ValidateClientParameters(), and XAsu_VerifyNGetUniqueIdCtx().