<?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 Re: boot OS into normal world in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/boot-OS-into-normal-world/m-p/304932#M39025</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Heinz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You aren't missing anything. The L2 Auxiliary Control register is only writable in Secure state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0344f/Babjbjbb.html" title="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0344f/Babjbjbb.html"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cortex-A8 Technical Reference Manual: 3.2.55. c9, L2 Cache Auxiliary Control Register&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is also true (if you pick up an i.MX6) for the L2C-310 control registers, if anyone is interested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0246h/Beidiajg.html" title="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0246h/Beidiajg.html"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CoreLink Level 2 Cache Controller L2C-310 Technical Reference Manual: 3.2. Register summary&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both cases, if you wish to dynamically enable or disable, or otherwise configure the L2, you should implement a small Secure-world OS which handles SMC calls to perform those operations. There's no standard for a cache interface, but ARM does provide some calling conventions for secure monitors and one for power management purposes which you'd be encouraged to follow (there is a good region for "OEM" (that's you) and "SiP" (that's Freescale) call numbers).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html" title="http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SMC Calling Convention&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://infocenter.arm.com/help/topic/com.arm.doc.den0022b/index.html" title="http://infocenter.arm.com/help/topic/com.arm.doc.den0022b/index.html"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Power State Coordination Interface (PSCI)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that answers your questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jun 2014 15:58:00 GMT</pubDate>
    <dc:creator>matthewsealey</dc:creator>
    <dc:date>2014-06-02T15:58:00Z</dc:date>
    <item>
      <title>boot OS into normal world</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/boot-OS-into-normal-world/m-p/304931#M39024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’m currently experimenting with the TrustZone feature of the A8 of the imx53. My current goal is to just boot a OS into the normal world. For that purpose I modified u-boot such, that it executes a routine which grants the NW access to everything, meaning:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;configuring the CSU: &lt;/P&gt;&lt;P&gt;- CSL0-31 to 0x00FF_00FF&lt;/P&gt;&lt;P&gt;- SA to 0x5555_5555 (0x1555_5555 is actually written)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;configure the TZIC&lt;/P&gt;&lt;P&gt;- TZIC_INTSEC0-1 to 0xFFFF_FFFF&lt;/P&gt;&lt;P&gt;- TZIC_PRIORITY0-31 to 0x1F1F_1F1F&lt;/P&gt;&lt;P&gt;- TZIC_INTCTRL to 0x8001_0001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;configure Nonsecure Access Control Register&lt;/P&gt;&lt;P&gt;- PLE=1 TL=1 CL=1 CP0-13=1 =&amp;gt; 0x0007_3FFF (0x0007_0C00 is actually written)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;configure Secure Configuration Register&lt;/P&gt;&lt;P&gt;- NS=1 IRQ=0 FIQ=0 EA=0 FW=1 AW=1 =&amp;gt; 0x31&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From what I can get out of the manuals (iMX53RM, IMX53SRM &amp;amp; A8 tech. man.) this should be sufficient to make the SW transparent to the NW. However, when u-boot inits the L2 cache the instruction „mcr 15, 1, r0, c9, c0, 2“ (Write L2 Cache Auxiliary Control Register) leads to a fault (not sure which, but when I halt the CPU via JTAG it is in ABORT mode).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what am I missing during the configuration of the TZ elements?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 May 2014 15:55:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/boot-OS-into-normal-world/m-p/304931#M39024</guid>
      <dc:creator>jackoneill</dc:creator>
      <dc:date>2014-05-24T15:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: boot OS into normal world</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/boot-OS-into-normal-world/m-p/304932#M39025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Heinz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You aren't missing anything. The L2 Auxiliary Control register is only writable in Secure state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0344f/Babjbjbb.html" title="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0344f/Babjbjbb.html"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cortex-A8 Technical Reference Manual: 3.2.55. c9, L2 Cache Auxiliary Control Register&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is also true (if you pick up an i.MX6) for the L2C-310 control registers, if anyone is interested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0246h/Beidiajg.html" title="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0246h/Beidiajg.html"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CoreLink Level 2 Cache Controller L2C-310 Technical Reference Manual: 3.2. Register summary&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both cases, if you wish to dynamically enable or disable, or otherwise configure the L2, you should implement a small Secure-world OS which handles SMC calls to perform those operations. There's no standard for a cache interface, but ARM does provide some calling conventions for secure monitors and one for power management purposes which you'd be encouraged to follow (there is a good region for "OEM" (that's you) and "SiP" (that's Freescale) call numbers).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html" title="http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SMC Calling Convention&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://infocenter.arm.com/help/topic/com.arm.doc.den0022b/index.html" title="http://infocenter.arm.com/help/topic/com.arm.doc.den0022b/index.html"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Power State Coordination Interface (PSCI)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that answers your questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2014 15:58:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/boot-OS-into-normal-world/m-p/304932#M39025</guid>
      <dc:creator>matthewsealey</dc:creator>
      <dc:date>2014-06-02T15:58:00Z</dc:date>
    </item>
  </channel>
</rss>

