AnsweredAssumed Answered

Using DCP AES in U-Boot

Question asked by Ivan Drobyshevskyi on Sep 29, 2017

I'm trying to use AES encryption as provided by i.MX6 ULL's DCP in U-Boot. In order to do that, I ported relevant rt-thread code and corresponding code sample from i.MX6 ULL reference manual.

 

Here's the code: u-boot code 

Besides the above file, dcp.h and regsdcp.h are taken from rt-thread, with the only difference being change of DCP base address, since the version I took them from was for 6SL I think.

 

The error I'm getting is "ERROR_DST" ("This bit indicates that a bus error occurred when storing to the destination buffer. When an error is detected, the channel's processing stops until the error is handled by the software.").

I've tried different source and destination buffers, as well as in-place encryption.

 

Here are debug prints:

src_buf: 8ef4b6c8
dst_buf: 8ef4b6c8
DCP STAT: 0x10000001
DCP ERROR: 0x20
DCP VERSION: 0x2010000

 

There's a Linux driver for that, however it's quite complicated with using DMA, interrupts, etc, and I need to get it working in U-Boot.

Original Attachment has been moved to: cmd_aes.c.zip

Outcomes