<?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: iMX6 PCIe: How to mmap() a PCIe device? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241228#M20080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="j-post-avatar" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;A _jive_internal="true" class="j-avatar jiveTT-hover-user" data-avatarid="1034" data-externalid="" data-presence="null" data-userid="205086" data-username="FrankLi1z" href="https://community.nxp.com/people/FrankLi1z" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #6a737b;"&gt;&lt;IMG alt="Zhi Li" border="0" class="jiveImage jive-avatar" data-avatarid="1034" data-height="46" data-username="FrankLi1z" height="46" src="https://community.nxp.com/people/FrankLi1z/avatar/46.png?a=1034" style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;" width="46" /&gt;&lt;/A&gt;&lt;SPAN class="j-status-levels" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;IMG alt="Employee" class="jiveImage" src="https://community.nxp.com/6.0.2.0/resources/images/status/FS_EMP_40x18.png" style="font-weight: inherit; font-style: inherit; font-family: inherit;" title="Employee" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author" style="font-weight: inherit; font-style: inherit; font-size: 0.9em; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;A href="https://community.nxp.com/people/FrankLi1z"&gt;FrankLi1z&lt;/A&gt; &lt;/STRONG&gt;Feb 21, 2014 9:36 AM &lt;SPAN class="font-color-meta-light j-thread-replyto" style="padding: 0 0 0 3px; font-weight: inherit; font-style: inherit; font-family: inherit; color: #a9a9a9;"&gt;(&lt;A _jive_internal="true" class="font-color-meta-light localScroll" href="https://community.nxp.com/thread/319896#382336" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #a9a9a9;" title="Go to message"&gt;in response to Oscar Navarro Alvarez&lt;/A&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A class="j-ui-elem j-helpful-star j-star popped" style="font-weight: inherit; font-style: inherit; font-family: inherit; background-position: no-repeat no-repeat;"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-ui-elem j-dotted-star" style="font-weight: inherit; font-style: inherit; font-family: inherit; background-position: no-repeat no-repeat;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Can you try add offset 0x0110 0000&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Feb 2014 16:56:41 GMT</pubDate>
    <dc:creator>karina_valencia</dc:creator>
    <dc:date>2014-02-26T16:56:41Z</dc:date>
    <item>
      <title>iMX6 PCIe: How to mmap() a PCIe device?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241226#M20078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On my system, I have connected to iMX6 (DualLite) via the PCIe Link an external MAC/Phy from Intel (i211).&lt;/P&gt;&lt;P&gt;To be able to use this Gigabit interface, I must program into internal PROM a MAC address.&lt;/P&gt;&lt;P&gt;The MAC address programming has to be done through the PCIe link, there is no other way to do this.&lt;/P&gt;&lt;P&gt;To do this, I need to mmap() the i211 registers, but the mmap() call fails with an error:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Unhandled fault: external abort on non-linefetch (0x1018) at 0x40248010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code I try to execute:&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New';"&gt;Mapped1Address = mmap(NULL, 4096*32, PROT_WRITE | PROT_READ, MAP_SHARED, FileDescriptor, (off_t)WordLocation );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where :&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;FileDescriptor&lt;/SPAN&gt; : is the result of&amp;nbsp; fopen("/dev/mem", O_RDWR |O_SYNC)&lt;/LI&gt;&lt;LI&gt;WordLocation : is the physical address of the l’i211, which is 0x01100000&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With lspci, I can see that my device is detected:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;# lspci&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;00:00.0 Class 0604: 16c3:abcd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;01:00.0 Class 0200: 8086:1532&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in /proc/iomem, the address space I try to mmap() is affected to PCIe:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;# cat /proc/iomem&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New';"&gt;00000000-00000000 : iobase_vg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New';"&gt;&amp;nbsp; 00000000-00000000 : phys_baseaddr&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New';"&gt;00110000-00111fff : mxs-dma-apbh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New';"&gt;00130000-00133fff : iobase_3d&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New';"&gt;&amp;nbsp; 00130000-00133fff : galcore register region&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New';"&gt;00134000-00137fff : iobase_2d&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New';"&gt;00134000-00137fff : galcore register region&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;01000000-01dfffff : PCIe 0 MEM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&amp;nbsp; 01000000-010fffff : 0000:00:00.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt; 01100000-011fffff : PCI Bus 0000:01&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt; 01100000-0111ffff : 0000:01:00.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt; 01120000-01123fff : 0000:01:00.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt; 01200000-0120ffff : 0000:00:00.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what I am doing wrong?&lt;/P&gt;&lt;P&gt;Any advice or suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Linux system is build using Linux Kernel 3.0.35 (based on Freescale BSP 4.1.0).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 07:25:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241226#M20078</guid>
      <dc:creator>KroMignon</dc:creator>
      <dc:date>2014-01-17T07:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: iMX6 PCIe: How to mmap() a PCIe device?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241227#M20079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Honestly, we had a lot of fun with i210 :-) You will likely be unable to program your card on the FSL BSP, sorry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What we did was we used mainline Linux as it contains a truly working PCIe driver. I'd suggest to use linux-next for this purpose (or linux-pci), since they contain a few fixes for some corner-case problems. Once you have at least a basic linux-next with PCIe and UART support running, use the eepromARMtool and program your i210 . While ultra-ugly and non-recommended, it is possible to do a static build of the eepromARMtool and run it from initramfs .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Feb 2014 00:31:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241227#M20079</guid>
      <dc:creator>MarekVasut</dc:creator>
      <dc:date>2014-02-22T00:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: iMX6 PCIe: How to mmap() a PCIe device?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241228#M20080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="j-post-avatar" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;A _jive_internal="true" class="j-avatar jiveTT-hover-user" data-avatarid="1034" data-externalid="" data-presence="null" data-userid="205086" data-username="FrankLi1z" href="https://community.nxp.com/people/FrankLi1z" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #6a737b;"&gt;&lt;IMG alt="Zhi Li" border="0" class="jiveImage jive-avatar" data-avatarid="1034" data-height="46" data-username="FrankLi1z" height="46" src="https://community.nxp.com/people/FrankLi1z/avatar/46.png?a=1034" style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;" width="46" /&gt;&lt;/A&gt;&lt;SPAN class="j-status-levels" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;IMG alt="Employee" class="jiveImage" src="https://community.nxp.com/6.0.2.0/resources/images/status/FS_EMP_40x18.png" style="font-weight: inherit; font-style: inherit; font-family: inherit;" title="Employee" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author" style="font-weight: inherit; font-style: inherit; font-size: 0.9em; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;A href="https://community.nxp.com/people/FrankLi1z"&gt;FrankLi1z&lt;/A&gt; &lt;/STRONG&gt;Feb 21, 2014 9:36 AM &lt;SPAN class="font-color-meta-light j-thread-replyto" style="padding: 0 0 0 3px; font-weight: inherit; font-style: inherit; font-family: inherit; color: #a9a9a9;"&gt;(&lt;A _jive_internal="true" class="font-color-meta-light localScroll" href="https://community.nxp.com/thread/319896#382336" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #a9a9a9;" title="Go to message"&gt;in response to Oscar Navarro Alvarez&lt;/A&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A class="j-ui-elem j-helpful-star j-star popped" style="font-weight: inherit; font-style: inherit; font-family: inherit; background-position: no-repeat no-repeat;"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-ui-elem j-dotted-star" style="font-weight: inherit; font-style: inherit; font-family: inherit; background-position: no-repeat no-repeat;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Can you try add offset 0x0110 0000&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 16:56:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241228#M20080</guid>
      <dc:creator>karina_valencia</dc:creator>
      <dc:date>2014-02-26T16:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: iMX6 PCIe: How to mmap() a PCIe device?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241229#M20081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please elaborate how would that fix anything ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 14:56:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241229#M20081</guid>
      <dc:creator>MarekVasut</dc:creator>
      <dc:date>2014-02-28T14:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: iMX6 PCIe: How to mmap() a PCIe device?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241230#M20082</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/FrankLi1z"&gt;FrankLi1z&lt;/A&gt; can you comment please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 15:07:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241230#M20082</guid>
      <dc:creator>karina_valencia</dc:creator>
      <dc:date>2014-02-28T15:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: iMX6 PCIe: How to mmap() a PCIe device?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241231#M20083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Had the "the i211 registers," been mapped during the pcie bus enumeration procedure(such as the kinds of&amp;nbsp; mem spaces defined by bars of ep device)?&lt;/P&gt;&lt;P&gt;If yes, you can mmap "the i211 registers," by one regions of imx6 pcie address space(some part of 0x0100_0000 ~ 0x01ef_ffff) directly.&lt;/P&gt;&lt;P&gt;If not, I'm afraid that the outbound mem region should be defined to map "the EP's i211 registers," at RC side, and used to access "the i211 registers,".&lt;/P&gt;&lt;P&gt;The details, you can make a reference to the imx6 pcie ep/rc validation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 02:40:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241231#M20083</guid>
      <dc:creator>richard_zhu</dc:creator>
      <dc:date>2014-03-03T02:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: iMX6 PCIe: How to mmap() a PCIe device?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241232#M20084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please tell me where i can download that arm eeprom tool for i210?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 09:43:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241232#M20084</guid>
      <dc:creator>samuelbrucksch</dc:creator>
      <dc:date>2014-08-06T09:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: iMX6 PCIe: How to mmap() a PCIe device?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241233#M20085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/people/richard.zhu"&gt;Hongxing Zhu&lt;/A&gt; is right ! i211 need to be enumerate at boot up&lt;/P&gt;&lt;P&gt;Since I get back in the bus error problem I will propose you a really simple solution to solve it.&lt;/P&gt;&lt;P&gt;What have to be done is to make the i211 detected by the probe function of igb driver. If you don't use an i210 component you can simply fake the igb driver telling him that i210 id is the i211 unprogrammed id&lt;/P&gt;&lt;P&gt;What you can do before compilation of you linux is a simple :&lt;/P&gt;&lt;P&gt;sed -i -e "s/0x1533/0x1532/g" ${S}/drivers/net/ethernet/intel/igb/e1000_hw.h&lt;/P&gt;&lt;P&gt;Then the i211 unprogrammed is detected as an i210, the driver will fail but you will be able to use eepromarmtool&lt;/P&gt;&lt;P&gt;Hope it will help&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aurelien BOUIN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 10:04:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX6-PCIe-How-to-mmap-a-PCIe-device/m-p/241233#M20085</guid>
      <dc:creator>aurelienbouin</dc:creator>
      <dc:date>2015-10-28T10:04:34Z</dc:date>
    </item>
  </channel>
</rss>

