sw_services:xilsecure: Pointer warnings fixed

Changed u64 casts to UINTPTR, to fix the warnings.

Signed-off-by: Bhavik Ameta <bameta@xilinx.com>
Acked-by: Sarat Chand Savitala <saratcha@xilinx.com>
This commit is contained in:
Bhavik Ameta 2015-07-30 19:12:22 +05:30 committed by Nava kishore Manne
parent 2491b4d9a2
commit 976c6455ad
2 changed files with 14 additions and 11 deletions

View file

@ -303,15 +303,17 @@ void XSecure_AesEncrypt(XSecure_Aes *InstancePtr, u8 *Dst, const u8 *Src,
/* Push IV into the AES engine.*/
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
(u64)InstancePtr->Iv,
(UINTPTR)InstancePtr->Iv,
XSECURE_SECURE_GCM_TAG_SIZE/4U, 0);
XCsuDma_WaitForDone(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL);
/* Configure the CSU DMA Tx/Rx.*/
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_DST_CHANNEL, (u64) Dst,
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_DST_CHANNEL,
(UINTPTR) Dst,
(Len + XSECURE_SECURE_GCM_TAG_SIZE)/4U, 0);
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL, (u64) Src,
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
(UINTPTR) Src,
XSECURE_SECURE_GCM_TAG_SIZE/4U, 1);
/**
@ -359,7 +361,7 @@ static u32 XSecure_AesDecryptBlk(XSecure_Aes *InstancePtr, u8 *Dst,
/* Push IV into the AES engine. */
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
(u64)InstancePtr->Iv, XSECURE_SECURE_GCM_TAG_SIZE/4U, 0);
(UINTPTR)InstancePtr->Iv, XSECURE_SECURE_GCM_TAG_SIZE/4U, 0);
XCsuDma_WaitForDone(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL);
@ -395,10 +397,10 @@ static u32 XSecure_AesDecryptBlk(XSecure_Aes *InstancePtr, u8 *Dst,
&ConfigurValues);
/* Configure the CSU DMA Tx/Rx for the incoming Block. */
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_DST_CHANNEL,
(u64)Dst, Len/4U, 0);
(UINTPTR)Dst, Len/4U, 0);
}
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
(u64)Src, Len/4U, 0);
(UINTPTR)Src, Len/4U, 0);
if (Dst != (u8*)XSECURE_DESTINATION_PCAP_ADDR)
{
@ -455,7 +457,7 @@ static u32 XSecure_AesDecryptBlk(XSecure_Aes *InstancePtr, u8 *Dst,
/* Push the Secure header/footer for decrypting next blocks KEY and IV. */
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
(u64)(Src + Len), XSECURE_SECURE_HDR_SIZE/4U, 1);
(UINTPTR)(Src + Len), XSECURE_SECURE_HDR_SIZE/4U, 1);
/* Wait for the Src DMA completion. */
XCsuDma_WaitForDone(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL);
@ -469,7 +471,8 @@ static u32 XSecure_AesDecryptBlk(XSecure_Aes *InstancePtr, u8 *Dst,
XSECURE_CSU_AES_KUP_WR_OFFSET, 0x0);
/* Push the GCM tag. */
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL, (u64)Tag,
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
(UINTPTR)Tag,
XSECURE_SECURE_GCM_TAG_SIZE/4U, 0);
/* Wait for the Src DMA completion. */
@ -707,7 +710,7 @@ u32 XSecure_AesDecrypt(XSecure_Aes *InstancePtr, u8 *Dst, const u8 *Src,
XSECURE_SECURE_GCM_TAG_SIZE);
/* Point IV to the CSU IV register. */
InstancePtr->Iv = (u32 *)(InstancePtr->BaseAddress +
XSECURE_CSU_AES_IV_0_OFFSET);
(UINTPTR)XSECURE_CSU_AES_IV_0_OFFSET);
}
/* Update the GcmTagAddr to get GCM-TAG for next block. */

View file

@ -183,7 +183,7 @@ void XSecure_Sha3Update(XSecure_Sha3 *InstancePtr, const u8 *Data,
InstancePtr->Sha3Len += Size;
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
(u64)Data, (u32)Size/4, 0);
(UINTPTR)Data, (u32)Size/4, 0);
/* Checking the CSU DMA done bit should be enough. */
XCsuDma_WaitForDone(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL);
@ -246,7 +246,7 @@ void XSecure_Sha3Finish(XSecure_Sha3 *InstancePtr, u8 *Hash)
XSecure_Sha3Padd(InstancePtr, XSecure_RsaSha3Array, PartialLen);
XCsuDma_Transfer(InstancePtr->CsuDmaPtr, XCSUDMA_SRC_CHANNEL,
(u64)XSecure_RsaSha3Array, PartialLen/4, 1);
(UINTPTR)XSecure_RsaSha3Array, PartialLen/4, 1);
/* Check the SHA3 DONE bit. */
XSecure_Sha3WaitForDone(InstancePtr);