<?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: Accessing FLEXCAN in secure user mode in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621725#M94241</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you are misunderstanding my question. What I'm asking is why the FLEXCAN device can be accessed in secure system mode, but&amp;nbsp;not secure user mode, if the corresponding CSU register (according to the NXP manual itself) is set up to give access to both modes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Sep 2016 03:28:54 GMT</pubDate>
    <dc:creator>alip</dc:creator>
    <dc:date>2016-09-20T03:28:54Z</dc:date>
    <item>
      <title>Accessing FLEXCAN in secure user mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621721#M94237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a bare-metal application (no Linux) that runs in "secure user" mode. The first access to the FELXCAN registers (a load) causes an abort. I have verified and the clocks are all set up properly, and memory mappings are all correct too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I set a break-point on this problematic load instruction (which is the first access to the FLEXCAN peripheral). After the debugger hit the break-point, a single-step caused an abort of course. Then I rebooted the board and stopped on the same instruction again, manually changed the CPU mode to "secure system" through the JTAG debugger and then single-stepped, the load instruction executed correctly. This implied that "secure user" didn't&amp;nbsp;have access to FLEXCAN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inspection of the CSU registers (CSU_CL0 in this case)&amp;nbsp;showed that&amp;nbsp;the value is set to 0x00330033, which according to the Security Reference Manual should permit RD+WR for secure user mode. T&lt;SPAN&gt;he AIPSTZx_OPACx registers are all set to zero (and AIPSTZx_MPR gives access to all four masters), so the peripherals should not need supervisor privilege for access.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Out of curiosity, I performed two tests:&lt;/P&gt;&lt;P&gt;- Set&amp;nbsp;CSU_CL0 to 0x00FF00FF to make it fully permissive (full RD+WR access in all modes), and accessing the register in secure user mode still caused a trap (wrong behaviour)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Set&amp;nbsp;CSU_CL0 to 0x00000000 to make it fully disallow access, and accessing the register even in secure system mode&amp;nbsp;caused a trap (correct&amp;nbsp;behaviour, proving that I am modifying the correct CSU register, and my modifications take effect)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone shed some light on this? To me it seems like a silicon errata, in which it doesn't allow access to FLEXCAN in secure user mode, no matter the security configuration.&amp;nbsp;I'm have verified this on&amp;nbsp;IMX6Q (SabreLite)&amp;nbsp;and IMX6QPLUS (Nitrogen).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2016 04:11:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621721#M94237</guid>
      <dc:creator>alip</dc:creator>
      <dc:date>2016-09-16T04:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing FLEXCAN in secure user mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621722#M94238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ali&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;seems there is confusion regarding "secure user mode",&lt;/P&gt;&lt;P&gt;as vague defined mode. Could you provide documentation where it is&lt;/P&gt;&lt;P&gt;defined. Seems "secure system" as you described is secure mode used&lt;/P&gt;&lt;P&gt;in processor documentation.&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>Mon, 19 Sep 2016 23:42:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621722#M94238</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2016-09-19T23:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing FLEXCAN in secure user mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621723#M94239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quoting from the manual:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;There are four security modes of operation in the system distinguished by security (TrustZone/non-TrustZone) and privilege (Supervisor/User) setting of the module. Below is the list of these security modes from the highest security level to the lowest:&lt;/P&gt;&lt;P&gt;1. TrustZone (Secure) Privilege (Supervisor) Mode - Highest Security Level&lt;BR /&gt;2. TrustZone (Secure) non-Privilege (User) Mode - Medium Security Level&lt;BR /&gt;3. non-TrustZone (Regular) Privilege (Supervisor) Mode - Medium Security Level&lt;BR /&gt;4. non-TrustZone (Regular) non-Privilege (User) Mode - Lowest Security Level&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;By "secure user mode" I was referring to the second level above, and by "secure system mode" I was referring to the first. The only difference that I was manually setting the processor mode to "system" instead of "supervisor":&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;System mode: Software executing in System mode executes at PL1. System mode has the same registers available as User mode, and is not entered by any exception.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The default CSU_CL0 value of 0x00330033 is supposed to provide RD+WR access for the first two security levels above, but doesn't seem to work for the second.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 00:20:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621723#M94239</guid>
      <dc:creator>alip</dc:creator>
      <dc:date>2016-09-20T00:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing FLEXCAN in secure user mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621724#M94240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ali&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately nxp does not support trustzone in its bsps, however&lt;/P&gt;&lt;P&gt;one can try arm examples on below link&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15417.html" title="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15417.html"&gt;ARM Information Center&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 01:04:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621724#M94240</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2016-09-20T01:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing FLEXCAN in secure user mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621725#M94241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you are misunderstanding my question. What I'm asking is why the FLEXCAN device can be accessed in secure system mode, but&amp;nbsp;not secure user mode, if the corresponding CSU register (according to the NXP manual itself) is set up to give access to both modes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 03:28:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621725#M94241</guid>
      <dc:creator>alip</dc:creator>
      <dc:date>2016-09-20T03:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing FLEXCAN in secure user mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621726#M94242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good luck in getting any further on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I went to download the "Security Reference Manual" to read it for myself, only to get a "24 to 48 hours approval" notice, which will probably fail given the (lack of) details in my Profile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest you do some more investigation to see if you can narrow down the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you perform this test on as many of the other peripherals as you can, so see if it is only FlexCAN with this problem, or whether it is a particular group of devices?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Manuals have bugs in them. The register assignments may be wrong. So the bits you're changing in the CSU may not be the ones wired to FlexCAN. I would suggest enabling access for every device in the system through the CSU registers except for the ones documented to be for FlexCAN. If you can get to it then, try to find out which bits in the register actually control FlexCAN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the FlexCAN core on the other side of a peripheral bridge that might also be participating in the security model? Same test as for the previous suggestion - turn everything else on and see if it works, then start turning things off until it doesn't. For instance "13.1.1 Features" mentions security settings for the "AHB to IP Bridge", detailed in the Security Reference Manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know if you find anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 04:02:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621726#M94242</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2016-09-20T04:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing FLEXCAN in secure user mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621727#M94243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Security Reference Manual can be found on (though not latest version )&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://community.freescale.com/docs/DOC-97660" title="https://community.freescale.com/docs/DOC-97660"&gt;Q&amp;amp;A: How is mx6 PMIC_ON_REQ under SW control? | NXP Community&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 05:31:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621727#M94243</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2016-09-20T05:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing FLEXCAN in secure user mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621728#M94244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ali&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this mode is specific TrustZone secure mode:&lt;/P&gt;&lt;P&gt;TrustZone (Secure) non-Privilege (User) Mode&lt;/P&gt;&lt;P&gt;there is no support trustzone in nxp bsps or bare metal examples,&lt;/P&gt;&lt;P&gt;suggest try arm examples on above link and try to get extended security support&lt;/P&gt;&lt;P&gt;using &amp;nbsp;NXP Professional Services:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp.com%2Fsupport%2Fnxp-professional-services%3APROFESSIONAL-SERVICE" rel="nofollow" target="_blank"&gt;http://www.nxp.com/support/nxp-professional-services:PROFESSIONAL-SERVICE&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 05:34:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621728#M94244</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2016-09-20T05:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing FLEXCAN in secure user mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621729#M94245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the pointer to that manual. Not much use demanding registration for access to a manual when it is freely available there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The documentation in that manual on which registers connect to what looks pretty bulletproof. I'd still try "enabling everything" to see if anything changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is hard to find in the manual (and I can't find a diagram showing this), but the FlexCAN peripherals are on the "IPS Bus" and that is bridged through to the "AHB" via the AIPSTZ. And that has security override stuff in it, so I'd check its registers too. Section 1.9 in the Security Manual mentions this, and the register definitions look to be in the normal Reference Manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 06:50:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621729#M94245</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2016-09-20T06:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing FLEXCAN in secure user mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621730#M94246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tom. Tried "enabling everything else" and it didn't help.&lt;/P&gt;&lt;P&gt;And I had forgotten to mention that the AIPSTZx_OPACx registers are all set to zero (and AIPSTZx_MPR gives access to all four masters), so the peripherals should not need supervisor privilege for access. I'll add this to the original post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 08:10:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-FLEXCAN-in-secure-user-mode/m-p/621730#M94246</guid>
      <dc:creator>alip</dc:creator>
      <dc:date>2016-09-20T08:10:09Z</dc:date>
    </item>
  </channel>
</rss>

