<?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: LS1043A-RDB, outbound PCIe ATU in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/LS1043A-RDB-outbound-PCIe-ATU/m-p/629483#M2001</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Pavel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That guide is informative, but it doesn't really answer much of what I was wondering about.&lt;/P&gt;&lt;P&gt;Allow me to elaborate on my own questions, findings and assumptions:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;gt; Is there a particular reason why so little address space is allocated? Can we increase it from 1 GB?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I assume that the address space is limited to 1 GB simply because no one really put any thought into it.&lt;BR /&gt;This is unfortunate, because it is selling the device short. As I understand, it is capable of up to 32 GB address space, and I&amp;nbsp;assume&amp;nbsp;NXP is&amp;nbsp;interested in showing off the device's capabilities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, it also seems to me that the PCIe driver itself has a size limit of 4 GB, which stems from the underlying Designware driver because it:&lt;BR /&gt;- uses a 32-bit variable for the memory size: &lt;A href="https://github.com/torvalds/linux/blob/master/drivers/pci/host/pcie-designware.h#L40"&gt;drivers/pci/host/pcie-designware.h&lt;/A&gt;&lt;BR /&gt;- uses only the last mapped memory range from the device tree: &lt;A href="https://github.com/torvalds/linux/blob/master/drivers/pci/host/pcie-designware.c#L561"&gt;drivers/pci/host/pcie-designware.c&lt;/A&gt;&lt;BR /&gt;This is perhaps a bigger problem, and I urge NXP to fix it.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;gt; Is there any reason not to start the address ranges at zero, like below?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I can only assume the memory region doesn't start at PCI address zero&amp;nbsp;for two reasons:&lt;BR /&gt;1) The PCI addresses of I/O and memory regions should not overlap, even though they are different address spaces.&lt;BR /&gt;2) The memory region should have a base PCI address which is aligned with the region's size, or potentially the "biggest BAR" in the system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that this means that if the size of the memory region is increased, its PCI base address must also increase.&lt;BR /&gt;But you cannot increase the region's size too much because it also reduces the addresses available for any 32-bit PCI devices. With a 4 GB memory range, you could not allocate addresses to _any_ 32-bit PCI devices.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if point 1) is true. I/O and memory are different spaces after all..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But with all this in mind, perhaps it would make more sense to start the memory region at PCI address 0, and make it _almost_ 4 GB in size?&lt;BR /&gt;The I/O region could then occupy the remainder of the 32-bit address space.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I would love input from an expert on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Martin Etnestad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Feb 2017 15:15:23 GMT</pubDate>
    <dc:creator>met</dc:creator>
    <dc:date>2017-02-20T15:15:23Z</dc:date>
    <item>
      <title>LS1043A-RDB, outbound PCIe ATU</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1043A-RDB-outbound-PCIe-ATU/m-p/629481#M1999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying&amp;nbsp;to understand how&amp;nbsp;the outbound PCI address translation is configured in the device tree&amp;nbsp;for the LS1043A-RDB, and how I can modify it to suit our needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the device tree&amp;nbsp;file &lt;STRONG&gt;fsl-ls1043a.dtsi&lt;/STRONG&gt; in SDK 2,&amp;nbsp;I found this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;pcie@3400000 {&lt;BR /&gt; compatible = "fsl,ls1043a-pcie", "snps,dw-pcie";&lt;BR /&gt;...&lt;BR /&gt; ranges = &amp;lt;0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000 /* downstream I/O */&lt;BR /&gt;0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000&amp;gt;; /* non-prefetchable memory */&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;As far as I can tell, this allocates 1 GB worth of address space space for memory.&lt;/P&gt;&lt;P&gt;However, the system memory map shows that a 32 GB address&amp;nbsp;section is set aside for each of the three PCI Express controllers in this device.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Is there a particular reason why so little address space is allocated? Can we increase it from 1 GB?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, it is not clear to me why the address ranges are also offset by 1 GB:&lt;/P&gt;&lt;P&gt;- PCI base address:&amp;nbsp;0x40000000&lt;/P&gt;&lt;P&gt;-&amp;nbsp;System memory base address:&amp;nbsp;0x40 0x40000000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Is there any reason not to start the address ranges at zero, like below?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;- PCI base address:&amp;nbsp;0x00000000&lt;/P&gt;&lt;P&gt;-&amp;nbsp;System memory base address:&amp;nbsp;0x40 0x00000000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In our application, we need at least twice as much memory address space, i.e., 2 GB.&lt;/P&gt;&lt;P&gt;I expect to simply have to change the&amp;nbsp;last&amp;nbsp;line in ranges to:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;0x82000000 0x0 0x&lt;STRONG&gt;0&lt;/STRONG&gt;0000000 0x40 0x&lt;STRONG&gt;0&lt;/STRONG&gt;0000000 0x0 0x&lt;STRONG&gt;8&lt;/STRONG&gt;0000000&amp;gt;; /* non-prefetchable memory */&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;This would start the addressing at 0, and doubles the size to 2 GB.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Is this safe to do?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for any&amp;nbsp;help and insight in this issue!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 13:40:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1043A-RDB-outbound-PCIe-ATU/m-p/629481#M1999</guid>
      <dc:creator>met</dc:creator>
      <dc:date>2017-02-13T13:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: LS1043A-RDB, outbound PCIe ATU</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1043A-RDB-outbound-PCIe-ATU/m-p/629482#M2000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; background: white;"&gt;Look at PCI Address Translation on the following page:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; background: white;"&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Felinux.org%2FDevice_Tree_Usage" rel="nofollow" target="_blank"&gt;http://elinux.org/Device_Tree_Usage&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Pavel Chubakov&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Wed, 15 Feb 2017 05:34:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1043A-RDB-outbound-PCIe-ATU/m-p/629482#M2000</guid>
      <dc:creator>Pavel</dc:creator>
      <dc:date>2017-02-15T05:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: LS1043A-RDB, outbound PCIe ATU</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1043A-RDB-outbound-PCIe-ATU/m-p/629483#M2001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Pavel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That guide is informative, but it doesn't really answer much of what I was wondering about.&lt;/P&gt;&lt;P&gt;Allow me to elaborate on my own questions, findings and assumptions:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;gt; Is there a particular reason why so little address space is allocated? Can we increase it from 1 GB?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I assume that the address space is limited to 1 GB simply because no one really put any thought into it.&lt;BR /&gt;This is unfortunate, because it is selling the device short. As I understand, it is capable of up to 32 GB address space, and I&amp;nbsp;assume&amp;nbsp;NXP is&amp;nbsp;interested in showing off the device's capabilities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, it also seems to me that the PCIe driver itself has a size limit of 4 GB, which stems from the underlying Designware driver because it:&lt;BR /&gt;- uses a 32-bit variable for the memory size: &lt;A href="https://github.com/torvalds/linux/blob/master/drivers/pci/host/pcie-designware.h#L40"&gt;drivers/pci/host/pcie-designware.h&lt;/A&gt;&lt;BR /&gt;- uses only the last mapped memory range from the device tree: &lt;A href="https://github.com/torvalds/linux/blob/master/drivers/pci/host/pcie-designware.c#L561"&gt;drivers/pci/host/pcie-designware.c&lt;/A&gt;&lt;BR /&gt;This is perhaps a bigger problem, and I urge NXP to fix it.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;gt; Is there any reason not to start the address ranges at zero, like below?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I can only assume the memory region doesn't start at PCI address zero&amp;nbsp;for two reasons:&lt;BR /&gt;1) The PCI addresses of I/O and memory regions should not overlap, even though they are different address spaces.&lt;BR /&gt;2) The memory region should have a base PCI address which is aligned with the region's size, or potentially the "biggest BAR" in the system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that this means that if the size of the memory region is increased, its PCI base address must also increase.&lt;BR /&gt;But you cannot increase the region's size too much because it also reduces the addresses available for any 32-bit PCI devices. With a 4 GB memory range, you could not allocate addresses to _any_ 32-bit PCI devices.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if point 1) is true. I/O and memory are different spaces after all..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But with all this in mind, perhaps it would make more sense to start the memory region at PCI address 0, and make it _almost_ 4 GB in size?&lt;BR /&gt;The I/O region could then occupy the remainder of the 32-bit address space.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I would love input from an expert on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Martin Etnestad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 15:15:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1043A-RDB-outbound-PCIe-ATU/m-p/629483#M2001</guid>
      <dc:creator>met</dc:creator>
      <dc:date>2017-02-20T15:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: LS1043A-RDB, outbound PCIe ATU</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1043A-RDB-outbound-PCIe-ATU/m-p/629484#M2002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;Sorry for delay.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;I do not know a reason for similar setting.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;There are no limitation for assigning 1 GB for address space and setting different start address.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Pavel Chubakov&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Thu, 30 Mar 2017 10:03:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1043A-RDB-outbound-PCIe-ATU/m-p/629484#M2002</guid>
      <dc:creator>Pavel</dc:creator>
      <dc:date>2017-03-30T10:03:13Z</dc:date>
    </item>
  </channel>
</rss>

