<?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: PCIe: RC cannot write into EP in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394171#M57647</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I have double checked that, indeed the bit is being set.&amp;nbsp; I am setting bit 1 and bit 2 in the EP's PCI_COMMAND register. I have configured the inbound mapping to do address matching rather than BAR matching just to rule that a BAR number mismatch but that doesn't work either.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The RC sets BAR0 in the EP to 0x90500000.&lt;/P&gt;&lt;P&gt;I configure the IATU to map 0x90500000 to a buffer in the EP's memory space.&amp;nbsp; The buffer is 1M aligned and the MMU is set to not cache that page. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After enumeration the RC writes into 0x90500000 but it never shows up in the EP's memory.&amp;nbsp; If the RC tries to read 0x90500000, it just gets 0xFFFFFFFF back. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Oct 2015 01:41:54 GMT</pubDate>
    <dc:creator>elijahbrown</dc:creator>
    <dc:date>2015-10-06T01:41:54Z</dc:date>
    <item>
      <title>PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394152#M57628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The IMX6 is configured as a PCIe EP, which is connected to a RC (not an IMX6).&amp;nbsp; I've got two iATU configurations, as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pcie_map_inbound_addr(PCIE_IATU_VIEWPORT_0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TLP_TYPE_MemRdWr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (uint32_t)endpointBuffer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x90500000,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SZ_64K);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pcie_map_outbound(PCIE_IATU_VIEWPORT_1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TLP_TYPE_MemRdWr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PCIE_ARB_BASE_ADDR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x310000,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SZ_64K);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what the inbound mapping function does:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint32_t pcie_map_inbound_addr(uint32_t viewport, uint32_t tlp_type,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t addr_base_cpu_side, uint32_t addr_base_pcie_side, uint32_t size)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // configure as an inbound region&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HW_PCIE_PL_IATUVR_WR((viewport &amp;amp; 0x0F) | (1 &amp;lt;&amp;lt; 31));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // configure region's base and limit address&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HW_PCIE_PL_IATURLBA_WR(addr_base_pcie_side);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HW_PCIE_PL_IATURUBA_WR(0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HW_PCIE_PL_IATURLA_WR(addr_base_pcie_side + size - 1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // configure target address&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HW_PCIE_PL_IATURUTA_WR(0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HW_PCIE_PL_IATURLTA_WR(addr_base_cpu_side);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // configure TLP type&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HW_PCIE_PL_IATURC1_WR(tlp_type &amp;amp; 0x0F);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // enable region&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HW_PCIE_PL_IATURC2_WR(((unsigned int)(1 &amp;lt;&amp;lt; 31)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return addr_base_cpu_side;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bus mastering is configured in the EP.&amp;nbsp; The outbound transactions (EP to RC) work fine, I can read and write memory in the RC by reading or writing PCIE_ARB_BASE_ADDR.&amp;nbsp; But the other way around, inbound transactions (RC to EP) doesn't work.&amp;nbsp; The RC is sending TLPs with address 0x90500000, which I want to map into the IMX's DRAM, specifically a 64K buffer named endpointBuffer.&amp;nbsp; This buffer is 1M aligned to meet the iATU requirements of 64k aligning and the MMU requirements of 1M aligning so I can turn caching off for it... The RC sets BAR0 to 0x90500000 and BAR2 to 0x310000.&amp;nbsp; For whatever reason I can't make the BAR1 mask anything non-zero so I'm using BAR2 instead.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing?&amp;nbsp; The fact that outbound transactions are working makes me think this has to be close, and just an error in the mapping.&amp;nbsp; I've tried setting up the inbound mapping to do BAR matching and address matching, neither seems to work. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 18:10:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394152#M57628</guid>
      <dc:creator>elijahbrown</dc:creator>
      <dc:date>2015-07-08T18:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394153#M57629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To my understanding, the EP only need set it's BAR mask, and the RC will determine the EP's pcie bus address, and configure the EP's bar and inbound offset registers accordingly, however I can't make sure the exact mechanism on the RC side so try just configure the BAR and inbound offset by the other device code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 16:43:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394153#M57629</guid>
      <dc:creator>jamesbone</dc:creator>
      <dc:date>2015-07-09T16:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394154#M57630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean the "other device code"?&amp;nbsp; The EPs BARs, BAR masks, and address translation setup are configured by the application running on the EP.&amp;nbsp; The RC cannot write the iATU registers as it's above the PCIe config space and that would not make sense anyway as the RC shouldn't need to know the internal memory map of the EP.&amp;nbsp; The RC writes the base addresses into the EP BARs correctly, but after that is not able to do any memory writes into the memory space reserved by the BARs.&amp;nbsp; There are no error bits set in the PCIE_EP_COMMAND register.&amp;nbsp; This is the problem.... it just doesn't work but where to start troublshooting?&amp;nbsp; The RC is known to work with other FPGA EPs so we are pretty confident it's doing the right thing.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 20:48:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394154#M57630</guid>
      <dc:creator>elijahbrown</dc:creator>
      <dc:date>2015-07-09T20:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394155#M57631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elijah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the initial flush, it looks like it should be working.&amp;nbsp; I have escalated internally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the OS version?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 22:02:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394155#M57631</guid>
      <dc:creator>gfine</dc:creator>
      <dc:date>2015-07-20T22:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394156#M57632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; This is a bare metal project, no OS.&amp;nbsp; I started with the freescale bare metal SDK and worked from there... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 22:05:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394156#M57632</guid>
      <dc:creator>elijahbrown</dc:creator>
      <dc:date>2015-07-20T22:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394157#M57633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elijah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK. So the code you are using is taken from the v1.1 (February 11th, 2013) Platform SDK?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Glen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 22:39:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394157#M57633</guid>
      <dc:creator>gfine</dc:creator>
      <dc:date>2015-07-20T22:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394158#M57634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, but the platform SDK sets up the PCIe core as an RC not as an EP, so I've modified it from there.&amp;nbsp; I've attached my code to this post, hopefully we can be on the same page this way. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to reiterate, the IMX6 configured as an EP (using this code) is able to write into the RC's memory.&amp;nbsp; But when the RC tries to do a memory read/write into the IMX6, it fails.&amp;nbsp; The RC, an intel board, is known to fully work with an FPGA device so we're pretty sure it's configured correctly.&amp;nbsp; I have tried setting the iATU up to do BAR matching for inbound TLPs but that didn't work, so I also tried setting up inbound address mapping - no luck there either.&amp;nbsp; But that's why you'll see the hardcoded address for the inbound mapping setup...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 23:14:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394158#M57634</guid>
      <dc:creator>elijahbrown</dc:creator>
      <dc:date>2015-07-20T23:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394159#M57635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you ever configure the BAR0 address of the PCIe EP side(imx6 pcie) in your system?&lt;/P&gt;&lt;P&gt;Here one example that imx6 PCIe RC access the memory space of imx6 EP in imx6 PCIe EP/RC validation system.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - setup one new outbound memory region at rc side, used&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; to let imx6 pcie rc can access the memory of imx6 pcie ep&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; in imx6 pcie rc ep validation system.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - set the default address of the ddr memory to be 0x4000_0000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NOTE:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - default address 0x4000_0000 of ep side would be&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; accessed in this demo.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Test howto:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; step1:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EP side:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.1:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo 0x40000000 &amp;gt; /sys/devices/soc0/soc.1/1ffc000.pcie/ep_bar0_addr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.2:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; memtool -32 0x40000000 4&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; E&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Reading 0x4 count starting at address 0x40000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x40000000:&amp;nbsp; 6FE9E9F6 7583FBB9 39EAEFEA FBDCFD78&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; step2:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RC side:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; memtool -32 0x01000000=58D454DA&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; memtool -32 0x01000004=7332095B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; step3:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EP side:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; memtool -32 0x40000000 4&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; E&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Reading 0x4 count starting at address 0x40000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x40000000:&amp;nbsp; 58D454DA 7332095B 39EAEFEA FBDCFD78&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 06:43:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394159#M57635</guid>
      <dc:creator>richard_zhu</dc:creator>
      <dc:date>2015-07-21T06:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394160#M57636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/elijahbrown"&gt;elijahbrown&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did Hongxing's reply help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 21:04:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394160#M57636</guid>
      <dc:creator>gfine</dc:creator>
      <dc:date>2015-07-21T21:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394161#M57637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I said in the original post, "The RC sets BAR0 to 0x90500000 and BAR2 to 0x310000.&amp;nbsp; For whatever reason I can't make the BAR1 mask anything non-zero so I'm using BAR2 instead."&amp;nbsp; Let's start by talking about why setting the BAR1 mask doesn't seem to have any effect?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rest is not really useful unless you have the patched linux running on both ends, which we don't.&amp;nbsp; This is a bare metal project, &lt;SPAN style="text-decoration: underline;"&gt;not linux&lt;/SPAN&gt;.&amp;nbsp; I have referenced the linux patches to come up with my configuration settings which you can see in the code I attached above.&amp;nbsp; I understand the big picture of how to test an RC-&amp;gt;EP transaction which is what you have described.&amp;nbsp; What is apparently missing is some configuration detail on the EP side.&amp;nbsp; The freescale linux patches I have seen only setup a single *outbound* mapping on the EP, and rely on the RC to send TLPs in the actual address range of the EP.&amp;nbsp; This is not possible in our case, we need to setup an inbound mapping to remap inbound TLPs in the address range of BAR0 to the IMX6's RAM.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have studied the datasheet and implemented this as shown in the code I attached earlier, but it just doesn't work.&amp;nbsp; Please review the code I attached and see if you see anything obviously wrong.&amp;nbsp; If you are willing or it would help, I will make a stripped down project and send it to you so you can duplicate my setup.&amp;nbsp; I suspect the issue has to do with the inbound mapping at the EP but I have been over the datasheet many times and it appears to be correct.&amp;nbsp; However the datasheet PCIe section is known to have errors, so who knows....&amp;nbsp; Also any suggestions as to troubleshooting *why* it doesn't work would be useful.&amp;nbsp; None of the error bits in the Command/Status reg are set - I don't know how else to get any error information from the core. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 16:43:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394161#M57637</guid>
      <dc:creator>elijahbrown</dc:creator>
      <dc:date>2015-07-22T16:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394162#M57638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately not really, we are not using linux and they do not describe any actual configuration of the PCIe EP.&amp;nbsp; And the linux patches do not setup any inbound mapping on the EP, they assume the RC will send TLPs with the correct addresses.&amp;nbsp; This will not work for us, we need to remap the TLPs to the ARM's native address space.&amp;nbsp; Besides it is kind of silly to require the RC to know the EPs memory map, that's the whole point of setting up the BARs in the first place... the iATU should remap inbound TLPs based on the BAR.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably what needs to happen is you guys should take my bare metal project and try to setup the inbound mapping so you can duplicate my issue as it does not appear any testing has been done with inbound mapping setup.&amp;nbsp; Please advise if you're willing to do this and I'll take some time to make a stripped down project that demonstrates the issue. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 16:55:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394162#M57638</guid>
      <dc:creator>elijahbrown</dc:creator>
      <dc:date>2015-07-22T16:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394163#M57639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elijah:&lt;/P&gt;&lt;P&gt;First of all, can you make a double check that the value of the BAR0 is set to "0x90500000" or something else?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, did you ever capture the PCIe protocol trace log by the protocol analyzer on your platform ever?&lt;/P&gt;&lt;P&gt;If yes, we can figure out that the PCIe RC of your platform issue the outbound TLP or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 06:34:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394163#M57639</guid>
      <dc:creator>richard_zhu</dc:creator>
      <dc:date>2015-07-23T06:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394164#M57640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I read back BAR0 from both the RC and the EP software, both sides verify it's 0x90500000 so I'm confident that is correct.&amp;nbsp; Right now I don't have access to a PCIe protocol analyzer.&amp;nbsp; All we have to go on right now is that the RC works with other EPs so we think it's correct for that reason.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 16:29:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394164#M57640</guid>
      <dc:creator>elijahbrown</dc:creator>
      <dc:date>2015-07-23T16:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394165#M57641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Elijah:&lt;BR /&gt;Based on the FSL Linux BSP release, did you ever validate the imx6 PCIe EP inbound operations on the imx6 PCIe EP/RC validation system at your side(one imx6 used as PCIe EP, the othr one used as RC)?&lt;/P&gt;&lt;P&gt;The reason why there is no explict inbound iATU configuration, is that the original and target address would be 1:1, if there are no&lt;/P&gt;&lt;P&gt;explict inbound regions iATU configurations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, can you send me the whole picture and the details of the PCIe connectors of your system to me?&lt;/P&gt;&lt;P&gt;Since I have one PCIe protocol analyzer at my hand, let me check whether I can capture the protocol data or not on your system firstly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 01:42:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394165#M57641</guid>
      <dc:creator>richard_zhu</dc:creator>
      <dc:date>2015-07-24T01:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394166#M57642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, we do not have the cabling to connect two boards like that, and we are using the Boundary devices nitrogen 6X board.&amp;nbsp; I realize there is no inbound iATU setup since the TLP addresses are 1:1 with the EP memory addresses.&amp;nbsp; Unfortunately that is not possible in our system, the RC is an Intel atom board whose memory map is totally different from the IMX6's.&amp;nbsp; So inbound address translation is necessary... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The RC is running Deos, a safety critical RTOS so I doubt you will be able to replicate our setup exactly.&amp;nbsp; It's got a normal PCIe edge connector, and we've made a custom cable that goes from that edge connector to the PCIe header on the nitrogen 6X board.&amp;nbsp; But I think if you just set it up such that the RC sends TLPs with different addresses than the ARM and get the inbound iATU working, that is probably the point we are having trouble with.&amp;nbsp; It is not demonstrated anywhere in the freescale examples, maybe it has not been tested?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 20:56:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394166#M57642</guid>
      <dc:creator>elijahbrown</dc:creator>
      <dc:date>2015-07-27T20:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394167#M57643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Elijah:&lt;/P&gt;&lt;P&gt;First of all, we should figure out whether the RC send out the outbount TLP(address 0x9050_0000) or not when you want the EP(imx6 PCIe) receive the inbount TLP(address 0x9050_0000).&lt;/P&gt;&lt;P&gt;Refer to the imx6 PCIe EP/RC validation system, one outbound region iATU is mandatory required at RC side, if the imx6 PCIe RC&lt;/P&gt;&lt;P&gt;want to access the memrory region of imx6 PCIe EP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, the BARs of the imx6 PCIe EP should be configured too, if the PCIe EP want to be enumurated and allocated the responding&lt;/P&gt;&lt;P&gt;memory spaces by PCIe RC. The referrence codes can be found in FSL Linux BSP codes.&lt;/P&gt;&lt;P&gt;A part of them are pasted below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* CMD reg:I/O space, MEM space, and Bus Master Enable */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writel(readl(pp-&amp;gt;dbi_base + PCI_COMMAND)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | PCI_COMMAND_IO&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | PCI_COMMAND_MEMORY&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | PCI_COMMAND_MASTER,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pp-&amp;gt;dbi_base + PCI_COMMAND);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * configure the class_rev(emaluate one memory ram ep device),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * bar0 and bar1 of ep&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writel(0xdeadbeaf, pp-&amp;gt;dbi_base + PCI_VENDOR_ID);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writel(readl(pp-&amp;gt;dbi_base + PCI_CLASS_REVISION)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | (PCI_CLASS_MEMORY_RAM &amp;lt;&amp;lt; 16),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pp-&amp;gt;dbi_base + PCI_CLASS_REVISION);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writel(0xdeadbeaf, pp-&amp;gt;dbi_base&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + PCI_SUBSYSTEM_VENDOR_ID);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* 32bit none-prefetchable 8M bytes memory on bar0 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writel(0x0, pp-&amp;gt;dbi_base + PCI_BASE_ADDRESS_0);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writel(SZ_8M - 1, pp-&amp;gt;dbi_base + (1 &amp;lt;&amp;lt; 12)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + PCI_BASE_ADDRESS_0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* None used bar1 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writel(0x0, pp-&amp;gt;dbi_base + PCI_BASE_ADDRESS_1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writel(0, pp-&amp;gt;dbi_base + (1 &amp;lt;&amp;lt; 12) + PCI_BASE_ADDRESS_1);&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 06:29:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394167#M57643</guid>
      <dc:creator>richard_zhu</dc:creator>
      <dc:date>2015-07-28T06:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394168#M57644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We don't have access to a PCIe bus analyzer so there's not much we can do right now to verify the RC is actually sending the TLP.&amp;nbsp; It is in the works though.&amp;nbsp; The RC is not another IMX6, it's an Intel atom so the PCIe address mapping is totally different from the IMX's.&amp;nbsp; It does however work with an FPGA configured as an endpoint.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned in my first post,&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The RC sets BAR0 to 0x90500000 and BAR2 to 0x310000&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;My software in the EP sets up the BAR masks and config registers as your code above shows - I referenced that patch to figure that out.&amp;nbsp; You will see if you open the code I attached above.&amp;nbsp; I have read the EP BARs from both ends to verify they are indeed set as we expect.&amp;nbsp; The RC enumerates it and everything seems to work except for inbound requests.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 21:29:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394168#M57644</guid>
      <dc:creator>elijahbrown</dc:creator>
      <dc:date>2015-08-05T21:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394169#M57645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regarding to Linux PCIe bus enumeration, there are some spaces allocated by RC, when EP device is enumerated by PCIe RC.&lt;/P&gt;&lt;P&gt;Can you try the following method, then check the PCIe EP inbound operations can be excuted or not?&lt;BR /&gt;- Step1: find the memory space allocated by RC when iMX6 PCIe EP is enumerated during the initialization.&lt;/P&gt;&lt;P&gt;For example, the 0x0100_0000 ~ 0x017f_ffff, the 8MBytes memory space allocated by iMX6 RC in iMX6 PCIe EP/RC validation system.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.394066] pci 0000:01:00.0: BAR 0: assigned &lt;SPAN class="error"&gt;[&lt;STRONG&gt;mem 0x01000000-0x017fffff&lt;/STRONG&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; [ 0.394104] pci 0000:01:00.0: BAR 6: assigned &lt;SPAN class="error"&gt;[mem 0x01900000-0x0190ffff pref]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.394114] pci 0000:01:00.0: BAR 2: assigned &lt;SPAN class="error"&gt;[io&amp;nbsp; 0x1000-0x1fff]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.394141] pci 0000:01:00.0: BAR 3: assigned &lt;SPAN class="error"&gt;[mem 0x01910000-0x019100ff pref]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="error"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Step2: Configure the "memory space address" into the iATU of iMX6 PCIe EP inbound region setup.&lt;/P&gt;&lt;P&gt;For example, use the start/end addresses of the memory space allocted by PCIe RC, to setup the iATU region of iMX6 PCIe EP inbound region setup&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;use 0x0100_0000 as the base address, 8MBytes as the limitation.&lt;/P&gt;&lt;P&gt;The address of iMX6 PCIe EP, that acctually want to be accessed by PCIe RC, used as the target address.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;- Step3: access the memory space allocated by PCIe RC, issue the outbound region access operations, figure out it works or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, can you ship one whole development kit of your platform to me?&lt;/P&gt;&lt;P&gt;Then I can try to figure out that I can capture the PCIe protocol raw data by the lecroy PCIe protocol analyer or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 03:30:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394169#M57645</guid>
      <dc:creator>richard_zhu</dc:creator>
      <dc:date>2015-08-07T03:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394170#M57646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elijah!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you making sure that on EP's side&amp;nbsp; you have the bit 1 set in the PCI_COMMAND register ? This bit "Controls a device's response to Memory Space accesses".&lt;/P&gt;&lt;P&gt;From my experience, you should read 0xFFs from the RC if this bit is 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also check again the settings for inbound bar matching on EP side, just to make sure the bar number corresponds to what has been requested in the enumeration process.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 19:38:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394170#M57646</guid>
      <dc:creator>aurelian_v</dc:creator>
      <dc:date>2015-09-29T19:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe: RC cannot write into EP</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394171#M57647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I have double checked that, indeed the bit is being set.&amp;nbsp; I am setting bit 1 and bit 2 in the EP's PCI_COMMAND register. I have configured the inbound mapping to do address matching rather than BAR matching just to rule that a BAR number mismatch but that doesn't work either.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The RC sets BAR0 in the EP to 0x90500000.&lt;/P&gt;&lt;P&gt;I configure the IATU to map 0x90500000 to a buffer in the EP's memory space.&amp;nbsp; The buffer is 1M aligned and the MMU is set to not cache that page. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After enumeration the RC writes into 0x90500000 but it never shows up in the EP's memory.&amp;nbsp; If the RC tries to read 0x90500000, it just gets 0xFFFFFFFF back. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 01:41:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-RC-cannot-write-into-EP/m-p/394171#M57647</guid>
      <dc:creator>elijahbrown</dc:creator>
      <dc:date>2015-10-06T01:41:54Z</dc:date>
    </item>
  </channel>
</rss>

