<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using DCP AES in U-Boot in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Using-DCP-AES-in-U-Boot/m-p/695587#M107846</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code:&amp;nbsp;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fpastebin.com%2FeYYMsvqc" rel="nofollow" target="_blank"&gt;u-boot code&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.").&lt;/P&gt;&lt;P&gt;I've tried different source and destination buffers, as well as in-place encryption.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are debug prints:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;src_buf: 8ef4b6c8&lt;BR /&gt;dst_buf: 8ef4b6c8&lt;BR /&gt;DCP STAT: 0x10000001&lt;BR /&gt;DCP ERROR: 0x20 &lt;BR /&gt;DCP VERSION: 0x2010000&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's a Linux driver for that, however&amp;nbsp;it's quite complicated with using DMA, interrupts, etc, and&amp;nbsp;I need to get it working in U-Boot.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336887"&gt;cmd_aes.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Sep 2017 17:05:23 GMT</pubDate>
    <dc:creator>ivandrobyshevs1</dc:creator>
    <dc:date>2017-09-29T17:05:23Z</dc:date>
    <item>
      <title>Using DCP AES in U-Boot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-DCP-AES-in-U-Boot/m-p/695587#M107846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code:&amp;nbsp;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fpastebin.com%2FeYYMsvqc" rel="nofollow" target="_blank"&gt;u-boot code&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.").&lt;/P&gt;&lt;P&gt;I've tried different source and destination buffers, as well as in-place encryption.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are debug prints:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;src_buf: 8ef4b6c8&lt;BR /&gt;dst_buf: 8ef4b6c8&lt;BR /&gt;DCP STAT: 0x10000001&lt;BR /&gt;DCP ERROR: 0x20 &lt;BR /&gt;DCP VERSION: 0x2010000&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's a Linux driver for that, however&amp;nbsp;it's quite complicated with using DMA, interrupts, etc, and&amp;nbsp;I need to get it working in U-Boot.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336887"&gt;cmd_aes.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Sep 2017 17:05:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-DCP-AES-in-U-Boot/m-p/695587#M107846</guid>
      <dc:creator>ivandrobyshevs1</dc:creator>
      <dc:date>2017-09-29T17:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using DCP AES in U-Boot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-DCP-AES-in-U-Boot/m-p/695588#M107847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DCP bypass cpu and access memory directly, so DMA should be used.&lt;/P&gt;&lt;P&gt;There is DCP driver in linux-2.6.35.3/drivers/crypto/dcp.c, one can check it:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/products/microcontrollers-and-processors/arm-based-processors-and-mcus/i.mx-applications-processors/developer-resources/i.mx28-evaluation-kit:MCIMX28EVKJ?tab=Design_Tools_Tab" title="https://www.nxp.com/products/microcontrollers-and-processors/arm-based-processors-and-mcus/i.mx-applications-processors/developer-resources/i.mx28-evaluation-kit:MCIMX28EVKJ?tab=Design_Tools_Tab"&gt;i.MX28 Evaluation Kit|NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Sep 2017 23:36:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-DCP-AES-in-U-Boot/m-p/695588#M107847</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-09-29T23:36:07Z</dc:date>
    </item>
  </channel>
</rss>

