We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Observer martin6314
Registered: ‎02-16-2018

DMA writes to illegal adress in XSecure_AesEncryptData in xilskey_puf_registration sample code

We found the following strange behavior when using the sample code xilskey_puf_registration.

The sample code contains
    XilSKey_Puf PufInstance;
to store the black key. And object
    XSecure_Aes AesInstance;
to get the black key by encryption of the red key. On execution of
    XilSKey_Puf_Encrypt_Key -> XSecure_AesEncryptData -> XSecure_AesEncryptData
We observed that not only the black key is being written by the Csu-DMA, but also three more words following the key. This caused a synchronous abort, because the handle XSecure_Aes AesInstance (which resides in memory just after the black key) was overwritten by the DMA. When adding some padding area after XilSKey_Puf PufInstance; the abort did not appear.
Could this be an error of the DMA setup within XSecure_AesEncryptData
or am I doing something wrong?
We use driver scudma=1.2 and lib xilsecure 3.0, xilskey 6.4
on a ultrascale+, A53, 64bit, standalone v6.5, c++
Best regards
0 Kudos