sw_services:xilsecure_v1_0: resolved AES and RSA failures
DMA interrupt clearing after each transfer in AES resolved RSA failure due to incorrect data type Signed-off-by: Bhavik Ameta <bameta@xilinx.com>
This commit is contained in:
parent
d7d271eb97
commit
ec8a0b20f7
2 changed files with 19 additions and 1 deletions
|
@ -363,6 +363,10 @@ static u32 XSecure_AesDecryptBlk(XSecure_Aes *InstancePtr, u8 *Dst,
|
|||
|
||||
XCsuDma_WaitForDone(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL);
|
||||
|
||||
/* Acknowledge the transfer has completed */
|
||||
XCsuDma_IntrClear(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
|
||||
XCSUDMA_IXR_DONE_MASK);
|
||||
|
||||
/* Enable CSU DMA Src channel for byte swapping.*/
|
||||
XCsuDma_Configure ConfigurValues = {0};
|
||||
|
||||
|
@ -396,6 +400,12 @@ static u32 XSecure_AesDecryptBlk(XSecure_Aes *InstancePtr, u8 *Dst,
|
|||
/* Wait for the Dst DMA completion. */
|
||||
XCsuDma_WaitForDone(InstancePtr->CsuDmaPtr, XCSUDMA_DST_CHANNEL);
|
||||
|
||||
/* Acknowledge the transfers has completed */
|
||||
XCsuDma_IntrClear(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
|
||||
XCSUDMA_IXR_DONE_MASK);
|
||||
XCsuDma_IntrClear(InstancePtr->CsuDmaPtr, XCSUDMA_DST_CHANNEL,
|
||||
XCSUDMA_IXR_DONE_MASK);
|
||||
|
||||
/* Disble CSU DMA Dst channel for byte swapping. */
|
||||
|
||||
XCsuDma_GetConfig(InstancePtr->CsuDmaPtr, XCSUDMA_DST_CHANNEL,
|
||||
|
@ -435,6 +445,10 @@ static u32 XSecure_AesDecryptBlk(XSecure_Aes *InstancePtr, u8 *Dst,
|
|||
/* Wait for the Src DMA completion. */
|
||||
XCsuDma_WaitForDone(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL);
|
||||
|
||||
/* Acknowledge the transfer has completed */
|
||||
XCsuDma_IntrClear(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
|
||||
XCSUDMA_IXR_DONE_MASK);
|
||||
|
||||
/* Restore Key write register to 0. */
|
||||
XSecure_WriteReg(InstancePtr->BaseAddress,
|
||||
XSECURE_CSU_AES_KUP_WR_OFFSET, 0x0);
|
||||
|
@ -446,6 +460,10 @@ static u32 XSecure_AesDecryptBlk(XSecure_Aes *InstancePtr, u8 *Dst,
|
|||
/* Wait for the Src DMA completion. */
|
||||
XCsuDma_WaitForDone(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL);
|
||||
|
||||
/* Acknowledge the transfer has completed */
|
||||
XCsuDma_IntrClear(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
|
||||
XCSUDMA_IXR_DONE_MASK);
|
||||
|
||||
/* Disable CSU DMA Src channel for byte swapping. */
|
||||
|
||||
XCsuDma_GetConfig(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
|
||||
|
|
|
@ -215,7 +215,7 @@ static void XSecure_RsaGetData(XSecure_Rsa *InstancePtr, u32 *RdData)
|
|||
|
||||
u32 Index = 0U;
|
||||
u32 DataOffset = 0U;
|
||||
u32 TmpIndex = 0;
|
||||
s32 TmpIndex = 0;
|
||||
|
||||
/* Each of this loop will write 192 bits of data */
|
||||
for (DataOffset = 0U; DataOffset < 22U; DataOffset++)
|
||||
|
|
Loading…
Add table
Reference in a new issue