<?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>QorIQのトピックRe: Problem configuring PCIe inbound windows on Linux Kernel</title>
    <link>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395056#M1663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i use mpc8039, i meet pci inbound regeiste, please give me some help,&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12pt;"&gt;For example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&amp;nbsp; &lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;pci-&amp;gt;piw[0].&lt;/EM&gt;pitar = 0x00000c00;&amp;nbsp; //DDR_addr = 0x00c0_0000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &lt;EM style="border: 0px; font-weight: inherit;"&gt;pci-&amp;gt;piw[0].&lt;/EM&gt;piwbar = 0x000a0000;&amp;nbsp; //PCI_addr (base) = 0xa000_0000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &lt;EM style="border: 0px; font-weight: inherit;"&gt;pci-&amp;gt;piw[0].&lt;/EM&gt;piwbear = 0x00000000;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &lt;EM style="border: 0px; font-weight: inherit;"&gt;pci-&amp;gt;piw[0].&lt;/EM&gt;piwar = 0x80044013;&amp;nbsp; //size=1MB&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;i regeister inbound ,but not working , no matter pitar how to set ,can see DDR_addr = 0x0 working,can you tell me how to set &amp;nbsp;these regerister.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;THANKS&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Dec 2016 08:21:54 GMT</pubDate>
    <dc:creator>威杨</dc:creator>
    <dc:date>2016-12-21T08:21:54Z</dc:date>
    <item>
      <title>Problem configuring PCIe inbound windows on Linux Kernel</title>
      <link>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395050#M1657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to configure PCIe communications on my Freescale P1012 board by means of your driver fsl-pci.c&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to configure inbound windows at addresses 0x3fe00000(PEX1) and 0x3fd00000(PEX2) but it seems that the function “setup_pci_atmu” sets a single inbound window at address 0x00000000, Am I correct? How can I proceed to configure these windows?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an uboot that configures my PCIe inbound and outbound windows. If I comment the setup of PCIe inbound memory window on the “setup_pci_atmu” function in the kernel(I have attached the modified fsl_pci.c file) so that the uboot configuration of the inbound windows is not modified and I start receiving PCIe messages, some processes running over the linux kernel (not using PCIe communications) give an exception such as:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;maindiagupd[167]: unhandled signal 11 at 00000000 nip 0feed38c lr 10023768 code 30001&lt;/P&gt;&lt;P&gt;busybox[215]: unhandled signal 4 at 100a7944 nip 100a7944 lr 1000930c code 30001&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If no PCIe messages are being received, the previous processes running over kernel work properly, so I suppose I need to include some information of the inbound windows for the Linux kernel. Could you please help me to understand how can I configure the addresses of the PCIe inbound windows on the driver?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Maria&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337273"&gt;fsl_pci.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2015 10:13:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395050#M1657</guid>
      <dc:creator>masasi</dc:creator>
      <dc:date>2015-10-14T10:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem configuring PCIe inbound windows on Linux Kernel</title>
      <link>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395051#M1658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;SPAN class="replyToName"&gt;masasi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;The default inbound window(BAR0) configured as 1M is used for inbound memory transaction to access CCSR memory mapped registers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;If the external PCI device is required to access the DDR of the target board, it is needed to set corresponding inbound window(for example BAR1) which is used to translate PCIe address to the local DDR address. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;In the kernel file ./arch/powerpc/sysdev/fsl_pci.c, you could refer to the section "&amp;gt;4G of memory setup second PCI inbound window" to setup inbound memory windows in the function setup_pci_atmu according to your requirement. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Yiping&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, 15 Oct 2015 09:56:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395051#M1658</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2015-10-15T09:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem configuring PCIe inbound windows on Linux Kernel</title>
      <link>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395052#M1659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Thank you for your help!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;I have setup the inbound memory window as you suggested on the &lt;SPAN class="replyToName"&gt;setup_pci_atmu function but I do not receive any message, Do I have to configure the &lt;/SPAN&gt;inbound memory windows on a certain range? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&lt;SPAN class="replyToName"&gt;This is the code I included on setup_pci_atmu function:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; &lt;EM&gt;/* PCIe can overmap inbound &amp;amp; outbound since RX &amp;amp; TX are separated */&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) {&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; /* Size window to exact size if power-of-two or one size up */&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; if ((1ull &amp;lt;&amp;lt; mem_log) != mem) {&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; mem_log++;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; if ((1ull &amp;lt;&amp;lt; mem_log) &amp;gt; mem)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&amp;nbsp; pr_info("%s: Setting PCI inbound window "&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; "greater than memory size\n", name);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; }&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; piwar |= ((mem_log - 1) &amp;amp; PIWAR_SZ_MASK);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; /* Setup inbound memory window */&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; if(!strcmp("/pcie@ff70a000",name)){&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; out_be32(&amp;amp;pci-&amp;gt;piw[win_idx].pitar,&amp;nbsp; 0x0003FE00);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; out_be32(&amp;amp;pci-&amp;gt;piw[win_idx].piwbar, 0x000AD000);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; out_be32(&amp;amp;pci-&amp;gt;piw[win_idx].piwar,&amp;nbsp; piwar);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; win_idx--;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; hose-&amp;gt;dma_window_base_cur = 0x00000000;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; hose-&amp;gt;dma_window_size = (resource_size_t)sz;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&amp;nbsp; /* Setup inbound memory window */&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; out_be32(&amp;amp;pci-&amp;gt;piw[win_idx].pitar,&amp;nbsp; 0x000B0100);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; out_be32(&amp;amp;pci-&amp;gt;piw[win_idx].piwbar, 0x000AB000);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; out_be32(&amp;amp;pci-&amp;gt;piw[win_idx].piwar,&amp;nbsp; piwar);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; win_idx--;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; hose-&amp;gt;dma_window_base_cur = 0xB0100000;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; hose-&amp;gt;dma_window_size = (resource_size_t)sz;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; }&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; if(!strcmp("/pcie@ff709000",name)){&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; out_be32(&amp;amp;pci-&amp;gt;piw[win_idx].pitar,&amp;nbsp; 0x0003FD00);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; out_be32(&amp;amp;pci-&amp;gt;piw[win_idx].piwbar, 0x000BD000);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; out_be32(&amp;amp;pci-&amp;gt;piw[win_idx].piwar,&amp;nbsp; piwar);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; win_idx--;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; hose-&amp;gt;dma_window_base_cur = 0x00000000;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; hose-&amp;gt;dma_window_size = (resource_size_t)sz;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; /* Setup inbound memory window */&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; out_be32(&amp;amp;pci-&amp;gt;piw[win_idx].pitar,&amp;nbsp; 0x000A0100);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; out_be32(&amp;amp;pci-&amp;gt;piw[win_idx].piwbar, 0x000BA000);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; out_be32(&amp;amp;pci-&amp;gt;piw[win_idx].piwar,&amp;nbsp; piwar);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; win_idx--;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; hose-&amp;gt;dma_window_base_cur = 0x00000000;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; hose-&amp;gt;dma_window_size = (resource_size_t)sz;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; }&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; /*&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; * if we have &amp;gt;4G of memory setup second PCI inbound window to&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; * let devices that are 64-bit address capable to work w/o&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; * SWIOTLB and access the full range of memory&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; */&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Then on the kernel user space I try to map the inbound windows by using mmap command as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp; int fd;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void *where;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Open PCIe devices&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; fd=open("/dev/mem",O_RDWR);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; where=mmap(0,0x100000,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0x3fe00000);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(where==(void *)0xffffffff)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; close(fd);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; printf("Cannot open PCIe uA-uD communications\n");&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt; exit(-1);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pcie_inboundA=(void *) where;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;}&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;And then read inbound window as:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Memcpy(rx_buffer, pcie_inboundA,size);&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;And no message is received. Is there a problem with the inbound window address range that I am using??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Thanks again for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 12:28:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395052#M1659</guid>
      <dc:creator>masasi</dc:creator>
      <dc:date>2015-10-15T12:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem configuring PCIe inbound windows on Linux Kernel</title>
      <link>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395053#M1660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;Hello &lt;SPAN class="replyToName"&gt;masasi,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;Probably there is problem with inbound ATMU configuration, please check the following.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;PEXITAR1 (PCI Express inbound translation address register), it contains the starting point of translated internal platform address.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;PEXIWBAR1 (PCI Express inbound window base address register ) i.e. contains the PCI Express starting point.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;PEXIWAR1 - PCI Express inbound window attributes register, define the window sizes to translate and other attributes for the translations.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;PEXIWAR1[IWS] Inbound window size.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;For system memory &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;PEXIWAR1[TRGT]=0b1111 //Local memory space&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;For example:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN class="replytoname"&gt;&lt;EM&gt;pci-&amp;gt;piw[0].&lt;/EM&gt;pitar = 0x00000c00;&amp;nbsp; //DDR_addr = 0x00c0_0000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN class="replytoname"&gt;&amp;nbsp; &lt;EM&gt;pci-&amp;gt;piw[0].&lt;/EM&gt;piwbar = 0x000a0000;&amp;nbsp; //PCI_addr (base) = 0xa000_0000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN class="replytoname"&gt;&amp;nbsp; &lt;EM&gt;pci-&amp;gt;piw[0].&lt;/EM&gt;piwbear = 0x00000000;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN class="replytoname"&gt;&amp;nbsp; &lt;EM&gt;pci-&amp;gt;piw[0].&lt;/EM&gt;piwar = 0x80044013;&amp;nbsp; //size=1MB&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN class="replytoname"&gt;Please try whether it would be fine if configure these inbound windows in u-boot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Yiping&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>Fri, 16 Oct 2015 14:24:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395053#M1660</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2015-10-16T14:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem configuring PCIe inbound windows on Linux Kernel</title>
      <link>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395054#M1661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;Originally, I had the PCIe inbound windows configured at u-boot and did not allow the kernel to change this configuration, the communications worked properly so I am sure the &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;inbound ATMU configuration I am using is ok. The problem is that although I am able to receive PCIe messages on the kernel user space, at some point I get a segmentation fault or illegal instruction exception (unhandled signal 4 or unhandled signal 11) on some of the processes I am running(These exceptions are caused by the reception of the PCIe messages because if I stop sending those messages, the processes work fine).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Maybe this is a problem regarding DDR configuration on the kernel?? I have a 1G DDR RAM configured by u-boot from address 0x00000000 to 0x40000000 and the PCIe inbound windows go from 0x3FD00000 to 0x3FE200000(I reserved this memory range on u-boot). When the kernel boots I do not pass the DDR size through bootargs or configure DDR memory size using the device tree, does the kernel figure out what size is the DDR? Also, do I need to reserve PCIe inbound window memory range in the kernel as well so the kernel does not try to use the memory space I reserved for PCIe incoming messages for other purposes??If so, how can I reserve it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Thanks again!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Oct 2015 07:04:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395054#M1661</guid>
      <dc:creator>masasi</dc:creator>
      <dc:date>2015-10-17T07:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem configuring PCIe inbound windows on Linux Kernel</title>
      <link>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395055#M1662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;SPAN class="replyToName"&gt;masasi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;This block of memory should be reserved in the EP device driver.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt; In addition, it seems that a default inbound window has been configured in u-boot to let the PCIe EP to access the whole memory map(including DDR) of the target, so in Kernel PCIe EP can access DDR memory directly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Yiping&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>Mon, 19 Oct 2015 11:56:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395055#M1662</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2015-10-19T11:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem configuring PCIe inbound windows on Linux Kernel</title>
      <link>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395056#M1663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i use mpc8039, i meet pci inbound regeiste, please give me some help,&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12pt;"&gt;For example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&amp;nbsp; &lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;pci-&amp;gt;piw[0].&lt;/EM&gt;pitar = 0x00000c00;&amp;nbsp; //DDR_addr = 0x00c0_0000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &lt;EM style="border: 0px; font-weight: inherit;"&gt;pci-&amp;gt;piw[0].&lt;/EM&gt;piwbar = 0x000a0000;&amp;nbsp; //PCI_addr (base) = 0xa000_0000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &lt;EM style="border: 0px; font-weight: inherit;"&gt;pci-&amp;gt;piw[0].&lt;/EM&gt;piwbear = 0x00000000;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &lt;EM style="border: 0px; font-weight: inherit;"&gt;pci-&amp;gt;piw[0].&lt;/EM&gt;piwar = 0x80044013;&amp;nbsp; //size=1MB&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;i regeister inbound ,but not working , no matter pitar how to set ,can see DDR_addr = 0x0 working,can you tell me how to set &amp;nbsp;these regerister.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 0px 0px 0.0001pt;"&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;THANKS&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2016 08:21:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Problem-configuring-PCIe-inbound-windows-on-Linux-Kernel/m-p/395056#M1663</guid>
      <dc:creator>威杨</dc:creator>
      <dc:date>2016-12-21T08:21:54Z</dc:date>
    </item>
  </channel>
</rss>

