sw_services:xilsecure: Fix to avoid clearing of AES key
Clearing the CSU_AES_KEY_CLEAR register to avoid clearing of AES key. Signed-off-by: Sarat Chand Savitala <saratcha@xilinx.com>
This commit is contained in:
parent
7fab5b8308
commit
a01d2a94ac
1 changed files with 4 additions and 0 deletions
|
@ -575,6 +575,10 @@ u32 XSecure_AesDecrypt(XSecure_Aes *InstancePtr, u8 *Dst, const u8 *Src,
|
|||
/* Clear AES contents by reseting it. */
|
||||
XSecure_AesReset(InstancePtr);
|
||||
|
||||
/* Clear AES_KEY_CLEAR bits to avoid clearing of key */
|
||||
XSecure_WriteReg(InstancePtr->BaseAddress,
|
||||
XSECURE_CSU_AES_KEY_CLR_OFFSET, (u32)0x0U);
|
||||
|
||||
if(InstancePtr->KeySel == XSECURE_CSU_AES_KEY_SRC_DEV)
|
||||
{
|
||||
XSecure_AesKeySelNLoad(InstancePtr);
|
||||
|
|
Loading…
Add table
Reference in a new issue