<?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中的主题  IMX6Q: Multicore PCIe access</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX6Q-Multicore-PCIe-access/m-p/894506#M135183</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - I'm able to now answer a &lt;STRONG&gt;portion&lt;/STRONG&gt; of my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two threads on the &lt;STRONG&gt;same&lt;/STRONG&gt; core will NOT cause an issue with accessing PCIe BAR&lt;STRONG&gt; as long as&lt;/STRONG&gt; the BAR is mapped as "Device Memory." Device Memory is uncached and very similar to Strongly Ordered memory; it also guarantees atomic operation (interrupts will wait until the access operation is complete). See "ARM Cortex-A Series: Programmer's Guide v4.0", specifically "10: Memory Ordering". ldr/str/ldm/stm instructions fall under this atomic nature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need NXP to answer is if two threads on &lt;STRONG&gt;different&lt;/STRONG&gt; &lt;STRONG&gt;cores&lt;/STRONG&gt; are doing&lt;SPAN&gt;&amp;nbsp;ldr/str/ldm/stm to the PCIe BAR, what (if any) arbitrates the accesses in HW? Caches aren't involved (Dev Mem)... Is there something in the "MPCore Platform" or AXI/AHB? Obviously if the answer is "nothing" than SW is the mechanism.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm primarily concerned that if 2+ cores are performing a PCIe BAR &lt;STRONG&gt;read&lt;/STRONG&gt; they can wreak havoc (eg. i2c read consists of write+read and if not atomic with competing threads you're almost guaranteed to read back incorrect data).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Tim&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Apr 2019 12:52:44 GMT</pubDate>
    <dc:creator>etim</dc:creator>
    <dc:date>2019-04-30T12:52:44Z</dc:date>
    <item>
      <title>IMX6Q: Multicore PCIe access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6Q-Multicore-PCIe-access/m-p/894506#M135183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - I'm able to now answer a &lt;STRONG&gt;portion&lt;/STRONG&gt; of my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two threads on the &lt;STRONG&gt;same&lt;/STRONG&gt; core will NOT cause an issue with accessing PCIe BAR&lt;STRONG&gt; as long as&lt;/STRONG&gt; the BAR is mapped as "Device Memory." Device Memory is uncached and very similar to Strongly Ordered memory; it also guarantees atomic operation (interrupts will wait until the access operation is complete). See "ARM Cortex-A Series: Programmer's Guide v4.0", specifically "10: Memory Ordering". ldr/str/ldm/stm instructions fall under this atomic nature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need NXP to answer is if two threads on &lt;STRONG&gt;different&lt;/STRONG&gt; &lt;STRONG&gt;cores&lt;/STRONG&gt; are doing&lt;SPAN&gt;&amp;nbsp;ldr/str/ldm/stm to the PCIe BAR, what (if any) arbitrates the accesses in HW? Caches aren't involved (Dev Mem)... Is there something in the "MPCore Platform" or AXI/AHB? Obviously if the answer is "nothing" than SW is the mechanism.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm primarily concerned that if 2+ cores are performing a PCIe BAR &lt;STRONG&gt;read&lt;/STRONG&gt; they can wreak havoc (eg. i2c read consists of write+read and if not atomic with competing threads you're almost guaranteed to read back incorrect data).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Tim&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2019 12:52:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6Q-Multicore-PCIe-access/m-p/894506#M135183</guid>
      <dc:creator>etim</dc:creator>
      <dc:date>2019-04-30T12:52:44Z</dc:date>
    </item>
    <item>
      <title>Re:  IMX6Q: Multicore PCIe access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6Q-Multicore-PCIe-access/m-p/894507#M135184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; It is highly recommended to use exclusive access instructions (LDREX/STREX), which provide &lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;a foundation for implementing semaphores in systems with Arm-based processors.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;A href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dht0008a/ch01s02s01.html"&gt;http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dht0008a/ch01s02s01.html&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; Systems that support exclusive operations include hardware state machines called exclusive &lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;monitors to track the state of exclusive accesses in the system. &lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; Also, please look at ERR003733 (ARM: 751480 Conditional failed LDREXcc can set the exclusive monitor) &lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;of the i.MX6 Errata. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;A href="https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf"&gt;https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf &lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Yuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2019 10:00:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6Q-Multicore-PCIe-access/m-p/894507#M135184</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2019-05-15T10:00:56Z</dc:date>
    </item>
  </channel>
</rss>

