You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing a SHA3 Final IPI operation the DMA appears to corrupt bytes outside the 384 bit (48 byte) output buffer.
I believe this is due to calls to XPlmi_DmaXfr with the length specified in bytes rather than words
From sw_services/xilsecure/src/common/versal_common/server/xsecure_sha_ipihandler.c
/* Initiate and complete the DMA to DMA transfer */Status=XPlmi_DmaXfr((u64)(UINTPTR)(Hash.Hash), DstAddr,
XSECURE_HASH_SIZE_IN_BYTES, XPLMI_PMCDMA_0);
Here XSECURE_HASH_SIZE_IN_BYTES is 48, but the XPlmi_DmaXfr() routine states that it takes words (I verified this by reviewing the XPlmi_MemCpy64 routine which shifts the byte length by the XPLMI_WORD_LEN_SHIFT macro.)
/*****************************************************************************//** * @brief This function is used to initiate and complete the DMA to DMA transfer. * * @param SrcAddr for SRC channel to fetch data from * @param DestAddr for DST channel to store the data * @param Len of the data in words * @param Flags to select PMC DMA and DMA Burst type * * @return * - XST_SUCCESS on success. * - XPLMI_ERR_DMA_XFER_WAIT_SRC if Dma Xfer failed in Src Channel * wait for done. * - XPLMI_ERR_DMA_XFER_WAIT_DEST if Dma Xfer failed in Dest Channel * wait for done. * *****************************************************************************/intXPlmi_DmaXfr(u64SrcAddr, u64DestAddr, u32Len, u32Flags)
The text was updated successfully, but these errors were encountered:
When executing a SHA3 Final IPI operation the DMA appears to corrupt bytes outside the 384 bit (48 byte) output buffer.
I believe this is due to calls to XPlmi_DmaXfr with the length specified in bytes rather than words
From sw_services/xilsecure/src/common/versal_common/server/xsecure_sha_ipihandler.c
Here XSECURE_HASH_SIZE_IN_BYTES is 48, but the XPlmi_DmaXfr() routine states that it takes words (I verified this by reviewing the XPlmi_MemCpy64 routine which shifts the byte length by the XPLMI_WORD_LEN_SHIFT macro.)
The text was updated successfully, but these errors were encountered: