<?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: imx53 SABRE Trustzone: How to boot default Linux image in normal world?</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/imx53-SABRE-Trustzone-How-to-boot-default-Linux-image-in-normal/m-p/275013#M30409</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miao Yu, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;well, I can only see that Linux tries to access memory at guest virtual memory address 0x9c82c00c. It depends on: what physical address is mapped to that location. The instruction pointer 0x80042c10 will give you a hint. In principle, you might compile your own Linux binary, and use objdump or instrument the source to find out which physical memory is addressed. By looking at function "mxc_cpu_lp_set" (you can find it in your output, the PC points to it), I assume it's the access to the CPU I/O memory at 0x63fa0000 (ARM PLatform Memory), which causes the data-abort. Have a look at my patches for Linux to run it on my virtual machine monitor at Github: &lt;/P&gt;&lt;P&gt;&lt;A class="moz-txt-link-freetext" href="https://github.com/skalk/linux/tree/imx53-tz"&gt;&amp;nbsp; https://github.com/skalk/linux/tree/imx53-tz&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There you'll see, that I've factored out that access. Most of the ARM CortexA8 platform registers can only be accessed from secure, supervisor mode. For more details, have a look at "i.MX53 Multimedia Applications Processor Reference Manual" chapter 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore,&amp;nbsp; I assume you don't run active tasks on the secure side? Because in your current implementation no action from the Linux side will cause a world switch apart from an explicitly triggered one via 'smc' instruction. Otherwise, if you intend to do scheduling on the secure side, you'll have to set at least SCR.FIQ to 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Jun 2013 07:51:50 GMT</pubDate>
    <dc:creator>stefankalkowski</dc:creator>
    <dc:date>2013-06-13T07:51:50Z</dc:date>
    <item>
      <title>imx53 SABRE Trustzone: How to boot default Linux image in normal world?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx53-SABRE-Trustzone-How-to-boot-default-Linux-image-in-normal/m-p/275012#M30408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote a simple secure kernel in TrustZone secure world and was trying to boot the default Linux kernel Image (shipped along within the SABRE getting started DVD) in the normal world. However, it stops with a DATA_ABORT in non-secure world with the output (see &amp;lt;&amp;lt;CONSOLE_OUTPUT&amp;gt;):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my current secure kernel, I set SCR.IRQ = 0, SCR.FIQ = 0, SCR.EA= 0, SCR.FW=1, SCR.AW=1. Set all TZIC_INTSEC registers to be 0xFFFFFFFF. Set all the CSL registers to be 0x00FF00FF. Set all the TZIC_PRIORITY registers to be 0x1F1F1F1F and set TZIC_INTCTRL.NSEN=1, TZIC_INTCTRL.NS=1 (According to the description in &lt;A _jive_internal="true" href="https://community.nxp.com/thread/300696"&gt;https://community.freescale.com/thread/300696&lt;/A&gt;). I also set IIM.SCS1.LOCK=0, IIM.SCS1.SECURE_ENBL=0. What else should I set?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I can boot Linux in secure kernel, I compare &amp;lt;CONSOLE_OUTPUT&amp;gt; with the successful output. I find two problems (marked in the &amp;lt;CONSOLE_OUTPUT&amp;gt;). So how can I let Linux in the non-secure world access IRAM partition (or SCC configuration). And what setting causes the DATA_ABORT marked in Problem 2?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;CONSOLE_OUTPUT&amp;gt;&lt;/P&gt;&lt;P&gt;NET: Registered protocol family 16&lt;/P&gt;&lt;P&gt;i.MX IRAM pool: 128 KB@0x9c840000&lt;/P&gt;&lt;P&gt;FAILED TO RELEASE IRAM PARTITION&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;-----------------------------------Problem 1. "IRAM READY" in the correct case&lt;/P&gt;&lt;P&gt;CPU is i.MX53 Revision 2.1&lt;/P&gt;&lt;P&gt;Unhandled fault: external abort on non-linefetch (0x1008) at 0x9c82c00c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;-----------------------------------Problem 2.&lt;/P&gt;&lt;P&gt;Internal error: : 1008 [#1] PREEMPT&lt;/P&gt;&lt;P&gt;last sysfs file:&lt;/P&gt;&lt;P&gt;Modules linked in:&lt;/P&gt;&lt;P&gt;CPU: 0&amp;nbsp;&amp;nbsp;&amp;nbsp; Not tainted&amp;nbsp; (2.6.35.3 #3)&lt;/P&gt;&lt;P&gt;PC is at mxc_cpu_lp_set+0x14/0x13c&lt;/P&gt;&lt;P&gt;LR is at arch_idle+0x60/0x234&lt;/P&gt;&lt;P&gt;pc : [&amp;lt;80042c10&amp;gt;]&amp;nbsp;&amp;nbsp;&amp;nbsp; lr : [&amp;lt;80042d98&amp;gt;]&amp;nbsp;&amp;nbsp;&amp;nbsp; psr: 60000093&lt;/P&gt;&lt;P&gt;sp : 8089bf80&amp;nbsp; ip : 00000003&amp;nbsp; fp : 00000000&lt;/P&gt;&lt;P&gt;r10: 0000001f&amp;nbsp; r9 : 412fc085&amp;nbsp; r8 : 7002ecbc&lt;/P&gt;&lt;P&gt;r7 : 8089ea10&amp;nbsp; r6 : 808ff024&amp;nbsp; r5 : 8089ea18&amp;nbsp; r4 : 808ff248&lt;/P&gt;&lt;P&gt;r3 : f7ed8fff&amp;nbsp; r2 : 9c82c000&amp;nbsp; r1 : 00000002&amp;nbsp; r0 : 00000002&lt;/P&gt;&lt;P&gt;Flags: nZCv&amp;nbsp; IRQs off&amp;nbsp; FIQs on&amp;nbsp; Mode SVC_32&amp;nbsp; ISA ARM&amp;nbsp; Segment kernel&lt;/P&gt;&lt;P&gt;Control: 10c5387f&amp;nbsp; Table: 70004019&amp;nbsp; DAC: 00000017&lt;/P&gt;&lt;P&gt;Process swapper (pid: 0, stack limit = 0x8089a2e8)&lt;/P&gt;&lt;P&gt;Stack: (0x8089bf80 to 0x8089c000)&lt;/P&gt;&lt;P&gt;bf80: 808ff248 8089ea18 808ff024 8089ea10 7002ecbc 412fc085 0000001f 80042d98&lt;/P&gt;&lt;P&gt;bfa0: 8089a000 8089ea18 808ff024 8089ea10 7002ecbc 412fc085 0000001f 8003aaa4&lt;/P&gt;&lt;P&gt;bfc0: 8089a000 8003af88 8090add8 00000000 8089eab8 800089b8 800084e8 00000bc3&lt;/P&gt;&lt;P&gt;bfe0: 70000100 80031018 10c53c7d 808ff0d0 80031014 70008034 00000000 00000000&lt;/P&gt;&lt;P&gt;[&amp;lt;80042c10&amp;gt;] (mxc_cpu_lp_set+0x14/0x13c) from [&amp;lt;80042d98&amp;gt;] (arch_idle+0x60/0x234)&lt;/P&gt;&lt;P&gt;[&amp;lt;80042d98&amp;gt;] (arch_idle+0x60/0x234) from [&amp;lt;8003aaa4&amp;gt;] (default_idle+0x20/0x28)&lt;/P&gt;&lt;P&gt;[&amp;lt;8003aaa4&amp;gt;] (default_idle+0x20/0x28) from [&amp;lt;8003af88&amp;gt;] (cpu_idle+0x48/0xa0)&lt;/P&gt;&lt;P&gt;[&amp;lt;8003af88&amp;gt;] (cpu_idle+0x48/0xa0) from [&amp;lt;800089b8&amp;gt;] (start_kernel+0x294/0x2f4&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 02:47:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx53-SABRE-Trustzone-How-to-boot-default-Linux-image-in-normal/m-p/275012#M30408</guid>
      <dc:creator>miaoyu</dc:creator>
      <dc:date>2013-06-05T02:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: imx53 SABRE Trustzone: How to boot default Linux image in normal world?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx53-SABRE-Trustzone-How-to-boot-default-Linux-image-in-normal/m-p/275013#M30409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miao Yu, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;well, I can only see that Linux tries to access memory at guest virtual memory address 0x9c82c00c. It depends on: what physical address is mapped to that location. The instruction pointer 0x80042c10 will give you a hint. In principle, you might compile your own Linux binary, and use objdump or instrument the source to find out which physical memory is addressed. By looking at function "mxc_cpu_lp_set" (you can find it in your output, the PC points to it), I assume it's the access to the CPU I/O memory at 0x63fa0000 (ARM PLatform Memory), which causes the data-abort. Have a look at my patches for Linux to run it on my virtual machine monitor at Github: &lt;/P&gt;&lt;P&gt;&lt;A class="moz-txt-link-freetext" href="https://github.com/skalk/linux/tree/imx53-tz"&gt;&amp;nbsp; https://github.com/skalk/linux/tree/imx53-tz&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There you'll see, that I've factored out that access. Most of the ARM CortexA8 platform registers can only be accessed from secure, supervisor mode. For more details, have a look at "i.MX53 Multimedia Applications Processor Reference Manual" chapter 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore,&amp;nbsp; I assume you don't run active tasks on the secure side? Because in your current implementation no action from the Linux side will cause a world switch apart from an explicitly triggered one via 'smc' instruction. Otherwise, if you intend to do scheduling on the secure side, you'll have to set at least SCR.FIQ to 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 07:51:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx53-SABRE-Trustzone-How-to-boot-default-Linux-image-in-normal/m-p/275013#M30409</guid>
      <dc:creator>stefankalkowski</dc:creator>
      <dc:date>2013-06-13T07:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: imx53 SABRE Trustzone: How to boot default Linux image in normal world?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx53-SABRE-Trustzone-How-to-boot-default-Linux-image-in-normal/m-p/275014#M30410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot! It works and THAT is the root reason. Yes, I just use SMC to trigger the secure kernel at the moment. Thank you very much! Your project is really helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 16:24:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx53-SABRE-Trustzone-How-to-boot-default-Linux-image-in-normal/m-p/275014#M30410</guid>
      <dc:creator>miaoyu</dc:creator>
      <dc:date>2013-06-13T16:24:10Z</dc:date>
    </item>
  </channel>
</rss>

