<?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>i.MX ProcessorsのトピックRe: iMX8MN: OP-TEE Panics on CAAM RNG init</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MN-OP-TEE-Panics-on-CAAM-RNG-init/m-p/2042668#M233930</link>
    <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;As far as I understand the guidelines contained in in the u-boot-imx source tree (&lt;A href="https://github.com/nxp-imx/uboot-imx/blob/lf_v2022.04/doc/imx/habv4/guides/mx8m_secure_boot.txt" target="_blank"&gt;https://github.com/nxp-imx/uboot-imx/blob/lf_v2022.04/doc/imx/habv4/guides/mx8m_secure_boot.txt&lt;/A&gt;) the "dek_blob" you mentioned is only required for encrypted boot. This is currently not my intention.&lt;/P&gt;&lt;P&gt;By looking into details described in the I.MX8MN Security Reference Manual, I found out, that secure boot (HAB) is necessary to be able to use CAAM (at least for some parts).&lt;/P&gt;&lt;P&gt;So my question is, do I need to burn the HAB SRK fuses and also close the device (burning SEC_CONFIG[1] fuse) to be able to init CAAM in OP-TEE?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Feb 2025 14:43:02 GMT</pubDate>
    <dc:creator>jg25</dc:creator>
    <dc:date>2025-02-12T14:43:02Z</dc:date>
    <item>
      <title>iMX8MN: OP-TEE Panics on CAAM RNG init</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MN-OP-TEE-Panics-on-CAAM-RNG-init/m-p/2039304#M233692</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I am trying to get OP-TEE (&lt;A href="https://github.com/nxp-imx/imx-optee-os/tree/lf-6.6.36_2.1.0" target="_self"&gt;https://github.com/nxp-imx/imx-optee-os/tree/lf-6.6.36_2.1.0&lt;/A&gt;) running as BL32 on a i.MX-based (iMX8 Nano) board.&lt;/P&gt;&lt;P&gt;OP-TEE is loaded as BL32 by imx-atf BL31. If I build optee-os with `CFG_NXP_CAAM=n` OP-TEE seems to be loaded properly and boot proceeds with U-Boot (BL33) and Linux kernel.&lt;/P&gt;&lt;LI-SPOILER&gt;CFG_UART_BASE=0x30860000 \&lt;BR /&gt;CFG_TZDRAM_START=0x56000000 \&lt;BR /&gt;CFG_DDR_SIZE=0x20000000 \&lt;BR /&gt;CFG_NXP_CAAM=n \&lt;/LI-SPOILER&gt;&lt;P&gt;However, once I use following configuration, OP-TEE panics in `caam_rng_init()`, refer to console log in attachment:&lt;/P&gt;&lt;LI-SPOILER&gt;CFG_UART_BASE=0x30860000 \&lt;BR /&gt;CFG_TZDRAM_START=0x56000000 \&lt;BR /&gt;CFG_DDR_SIZE=0x20000000 \&lt;BR /&gt;CFG_NXP_CAAM=y \&lt;BR /&gt;CFG_CRYPTO_DRIVER=y \&lt;BR /&gt;CFG_WITH_SOFTWARE_PRNG=n \&lt;BR /&gt;CFG_NXP_CAAM_RNG_DRV=y CFG_HWRNG_PTA=y CFG_HWRNG_QUALITY=1024 \&lt;BR /&gt;CFG_DBG_CAAM_TRACE=0x00000041 \&lt;/LI-SPOILER&gt;&lt;P&gt;Using the original code from imx github repo, memory region for CAAM (0x30900000, size 0x40000) was mapped as `IO_NSEC` because on same page as `CFG_UART_BASE` resulting in CAAM memory beeing mapped to `RES_VASPACE` area.&lt;BR /&gt;I tried to fix this by limiting UART memory mapping to 0x10000 bytes and create an early explicit mapping for `CAAM_BASE` in `plat-imx/main.c`&lt;/P&gt;&lt;LI-SPOILER&gt;#ifdef CONSOLE_UART_BASE&lt;BR /&gt;register_phys_mem(MEM_AREA_IO_NSEC, CONSOLE_UART_BASE, 0x10000);&lt;BR /&gt;#endif&lt;BR /&gt;#ifdef CAAM_BASE&lt;BR /&gt;register_phys_mem(MEM_AREA_IO_SEC, CAAM_BASE, CAAM_SIZE);&lt;BR /&gt;#endif&lt;/LI-SPOILER&gt;&lt;P&gt;After that, at least the correct physical address seems to be used in CAAM driver. However, the `caam_rng_init()` still fails.&lt;/P&gt;&lt;P&gt;Is there any advice on how to fix this?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 11:48:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MN-OP-TEE-Panics-on-CAAM-RNG-init/m-p/2039304#M233692</guid>
      <dc:creator>jg25</dc:creator>
      <dc:date>2025-02-06T11:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MN: OP-TEE Panics on CAAM RNG init</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MN-OP-TEE-Panics-on-CAAM-RNG-init/m-p/2039348#M233696</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;DEK blob must be created by a software running in Arm TrustZone Secure World, the CAAM block takes into consideration the TrustZone configuration when encapsulating the DEK and the resulting blob can be only decapsulated by a SW running in the same configuration. As ROM code is running in ARM TrustZone secure world we must encapsulate the blobs using OP-TEE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;- Building ATF to support OP-TEE:&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;
&lt;P&gt;$ make PLAT=&amp;lt;SoC Name&amp;gt; SPD=opteed bl31&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;- Building OP-TEE to support DEK blob encapsulation:&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;
&lt;P&gt;$ CFG_NXPCRYPT=y CFG_GEN_DEK_BLOB=y source ./scripts/nxp_build.sh &amp;lt;Board Name&amp;gt;&lt;/P&gt;
&lt;P&gt;* OP-TEE debug logs can be enabled by adding CFG_TEE_CORE_LOG_LEVEL=4 in command line above.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The&amp;nbsp;imx-mkimage is used to combine all the images in a single flash.bin binary.&lt;/P&gt;
&lt;P&gt;Copy all the binaries generated (U-Boot images, bl31.bin, tee.bin and Firmware) into iMX8M directory and run the following commands according to the target device:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;- Create a dummy DEK blob:&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;
&lt;P&gt;$ dd if=/dev/zero of=iMX8M/dek_blob_fit_dummy.bin bs=96 count=1 &amp;amp;&amp;amp; sync&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;- Assembly flash.bin binary:&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;
&lt;P&gt;$ make SOC=&amp;lt;SoC Name&amp;gt; flash_spl_uboot&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 14:01:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MN-OP-TEE-Panics-on-CAAM-RNG-init/m-p/2039348#M233696</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2025-02-06T14:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MN: OP-TEE Panics on CAAM RNG init</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MN-OP-TEE-Panics-on-CAAM-RNG-init/m-p/2042668#M233930</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;As far as I understand the guidelines contained in in the u-boot-imx source tree (&lt;A href="https://github.com/nxp-imx/uboot-imx/blob/lf_v2022.04/doc/imx/habv4/guides/mx8m_secure_boot.txt" target="_blank"&gt;https://github.com/nxp-imx/uboot-imx/blob/lf_v2022.04/doc/imx/habv4/guides/mx8m_secure_boot.txt&lt;/A&gt;) the "dek_blob" you mentioned is only required for encrypted boot. This is currently not my intention.&lt;/P&gt;&lt;P&gt;By looking into details described in the I.MX8MN Security Reference Manual, I found out, that secure boot (HAB) is necessary to be able to use CAAM (at least for some parts).&lt;/P&gt;&lt;P&gt;So my question is, do I need to burn the HAB SRK fuses and also close the device (burning SEC_CONFIG[1] fuse) to be able to init CAAM in OP-TEE?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 14:43:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MN-OP-TEE-Panics-on-CAAM-RNG-init/m-p/2042668#M233930</guid>
      <dc:creator>jg25</dc:creator>
      <dc:date>2025-02-12T14:43:02Z</dc:date>
    </item>
  </channel>
</rss>

