Using DCP AES in U-Boot

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using DCP AES in U-Boot

ソリューションへジャンプ
1,495件の閲覧回数
ivandrobyshevs1
Contributor II

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

ラベル(1)
0 件の賞賛
返信
1 解決策
1,033件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Ivan

DCP bypass cpu and access memory directly, so DMA should be used.

There is DCP driver in linux-2.6.35.3/drivers/crypto/dcp.c, one can check it:

i.MX28 Evaluation Kit|NXP 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,034件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Ivan

DCP bypass cpu and access memory directly, so DMA should be used.

There is DCP driver in linux-2.6.35.3/drivers/crypto/dcp.c, one can check it:

i.MX28 Evaluation Kit|NXP 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信