<?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>P-SeriesのトピックP2041 : PCIe devices' driver causing BUS Error</title>
    <link>https://community.nxp.com/t5/P-Series/P2041-PCIe-devices-driver-causing-BUS-Error/m-p/461280#M2676</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;We're using Pericom's 608GP extender. Using the same, we're able to read the configuration space of the every PCIe device. However, we're not able to access the BAR regions of any device.&lt;/P&gt;&lt;P&gt;Whenever we try to read/write to this BAR regions the same through the kernel driver, we're getting following bus error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Machine check in kernel mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Caused by (from MCSR=a000): Load Error Report&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Guarded Load Error Report&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Oops: Machine check, sig: 7 [#1]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;SMP NR_CPUS=8 CoreNet Generic&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Modules linked in: emapci(PO) nfsd exportfs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;CPU: 3 PID: 1625 Comm: ddccm Tainted: P&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; O 3.12.37-rt51+g43cecda #2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;task: e911ca30 ti: effd8000 task.ti: e9af8000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;NIP: f94bc410 LR: f94ba430 CTR: 00000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;REGS: effd9f10 TRAP: 0204&amp;nbsp;&amp;nbsp; Tainted: P&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; O&amp;nbsp; (3.12.37-rt51+g43cecda)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;MSR: 00029002 &amp;lt;CE,EE,ME&amp;gt;&amp;nbsp; CR: 28002422&amp;nbsp; XER: 00000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;GPR00: f94ba320 e9af9d10 e911ca30 f94bfc70 00000000 f91fe804 e011f000 00000e01 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;GPR08: 00020000 00000100 f91fe000 1f541215 c0018350 10024a5c 10100000 00000000 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;GPR16: 00000001 e96d60f0 00000000 00000000 00000000 00000000 00000000 e9af9e38 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;GPR24: 00000000 00000000 f94bfc70 00000000 00000000 00000000 00000000 00000000 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;NIP [f94bc410] ddcReadReg32+0x40/0x80 [emapci]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;LR [f94ba430] emapci_open+0x430/0x560 [emapci]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Call Trace:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9d10] [f94ba320] emapci_open+0x320/0x560 [emapci] (unreliable)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9d50] [c0101b9c] chrdev_open+0xbc/0x1b0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9d80] [c00fa9e0] do_dentry_open.isra.15+0x1c0/0x2c0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9da0] [c00fab0c] finish_open+0x2c/0x60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9db0] [c010c32c] do_last.isra.46+0x3fc/0xc60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9e20] [c010cc44] path_openat+0xb4/0x660&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9e80] [c010e160] do_filp_open+0x30/0xb0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9f00] [c00fbf70] do_sys_open+0x150/0x290&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9f40] [c000fe24] ret_from_syscall+0x0/0x3c&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;--- Exception: c01 at 0xfef43d0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LR = 0x100023fc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Instruction dump:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;3929fc70 7c691a14 812307f0 752a4000 812300b4 8143001c 40c20028 7c8449d6 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;54a5103a 7ca52214 7ca55214 7c0004ac &amp;lt;7c602c2c&amp;gt; 0c030000 4c00012c 4e800020 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;---[ end trace 2a777fae257abea4 ]---&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Bus error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We've written the driver in following way:&lt;/P&gt;&lt;P style="color: #000099; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #fdfdfd;"&gt;res = pci_enable_device(pdev);&lt;BR /&gt;if (res) {&lt;BR /&gt;PERR("pci device enable failed\n");&lt;BR /&gt;return -EFAULT;&lt;BR /&gt;}&lt;BR /&gt;basePhys = pci_resource_start(pdev,0);&lt;BR /&gt;baseLength = pci_resource_len(pdev,0);&lt;BR /&gt;if(pci_request_region(pdev,0,DRIVER_NAME)==0) {&lt;BR /&gt;PINFO("GOT The Resource\n");&lt;BR /&gt;}&lt;BR /&gt;if((pci_resource_flags(pdev,0) &amp;amp; IORESOURCE_MEM) != IORESOURCE_MEM) {&lt;BR /&gt;PINFO("Not Equal to IORESOURCE_MEM\n");&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;PINFO("Equal to IORESOURCE_MEM\n");&lt;BR /&gt;}&lt;BR /&gt;actVirtAddr = (unsigned long) bus_to_virt(basePhys); //for PowerPC p2041 architecture we have to do this function call&lt;BR /&gt;//because p2041 supports 36Byte addressing&lt;BR /&gt;virtAddress = (unsigned long) ioremap(actVirtAddr,baseLength);&lt;BR /&gt;elpc_adc_comm_address = virtAddress;&lt;/P&gt;&lt;P style="color: #000099; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #fdfdfd;"&gt;&lt;/P&gt;&lt;P style="color: #000099; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #fdfdfd;"&gt;&lt;SPAN style="color: #303030;"&gt;The PCI Configuration dump is in attachments:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000099; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #fdfdfd;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Mar 2016 13:32:13 GMT</pubDate>
    <dc:creator>madhurwani</dc:creator>
    <dc:date>2016-03-08T13:32:13Z</dc:date>
    <item>
      <title>P2041 : PCIe devices' driver causing BUS Error</title>
      <link>https://community.nxp.com/t5/P-Series/P2041-PCIe-devices-driver-causing-BUS-Error/m-p/461280#M2676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;We're using Pericom's 608GP extender. Using the same, we're able to read the configuration space of the every PCIe device. However, we're not able to access the BAR regions of any device.&lt;/P&gt;&lt;P&gt;Whenever we try to read/write to this BAR regions the same through the kernel driver, we're getting following bus error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Machine check in kernel mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Caused by (from MCSR=a000): Load Error Report&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Guarded Load Error Report&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Oops: Machine check, sig: 7 [#1]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;SMP NR_CPUS=8 CoreNet Generic&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Modules linked in: emapci(PO) nfsd exportfs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;CPU: 3 PID: 1625 Comm: ddccm Tainted: P&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; O 3.12.37-rt51+g43cecda #2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;task: e911ca30 ti: effd8000 task.ti: e9af8000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;NIP: f94bc410 LR: f94ba430 CTR: 00000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;REGS: effd9f10 TRAP: 0204&amp;nbsp;&amp;nbsp; Tainted: P&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; O&amp;nbsp; (3.12.37-rt51+g43cecda)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;MSR: 00029002 &amp;lt;CE,EE,ME&amp;gt;&amp;nbsp; CR: 28002422&amp;nbsp; XER: 00000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;GPR00: f94ba320 e9af9d10 e911ca30 f94bfc70 00000000 f91fe804 e011f000 00000e01 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;GPR08: 00020000 00000100 f91fe000 1f541215 c0018350 10024a5c 10100000 00000000 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;GPR16: 00000001 e96d60f0 00000000 00000000 00000000 00000000 00000000 e9af9e38 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;GPR24: 00000000 00000000 f94bfc70 00000000 00000000 00000000 00000000 00000000 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;NIP [f94bc410] ddcReadReg32+0x40/0x80 [emapci]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;LR [f94ba430] emapci_open+0x430/0x560 [emapci]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Call Trace:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9d10] [f94ba320] emapci_open+0x320/0x560 [emapci] (unreliable)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9d50] [c0101b9c] chrdev_open+0xbc/0x1b0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9d80] [c00fa9e0] do_dentry_open.isra.15+0x1c0/0x2c0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9da0] [c00fab0c] finish_open+0x2c/0x60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9db0] [c010c32c] do_last.isra.46+0x3fc/0xc60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9e20] [c010cc44] path_openat+0xb4/0x660&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9e80] [c010e160] do_filp_open+0x30/0xb0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9f00] [c00fbf70] do_sys_open+0x150/0x290&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;[e9af9f40] [c000fe24] ret_from_syscall+0x0/0x3c&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;--- Exception: c01 at 0xfef43d0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LR = 0x100023fc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Instruction dump:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;3929fc70 7c691a14 812307f0 752a4000 812300b4 8143001c 40c20028 7c8449d6 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;54a5103a 7ca52214 7ca55214 7c0004ac &amp;lt;7c602c2c&amp;gt; 0c030000 4c00012c 4e800020 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;---[ end trace 2a777fae257abea4 ]---&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;Bus error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We've written the driver in following way:&lt;/P&gt;&lt;P style="color: #000099; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #fdfdfd;"&gt;res = pci_enable_device(pdev);&lt;BR /&gt;if (res) {&lt;BR /&gt;PERR("pci device enable failed\n");&lt;BR /&gt;return -EFAULT;&lt;BR /&gt;}&lt;BR /&gt;basePhys = pci_resource_start(pdev,0);&lt;BR /&gt;baseLength = pci_resource_len(pdev,0);&lt;BR /&gt;if(pci_request_region(pdev,0,DRIVER_NAME)==0) {&lt;BR /&gt;PINFO("GOT The Resource\n");&lt;BR /&gt;}&lt;BR /&gt;if((pci_resource_flags(pdev,0) &amp;amp; IORESOURCE_MEM) != IORESOURCE_MEM) {&lt;BR /&gt;PINFO("Not Equal to IORESOURCE_MEM\n");&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;PINFO("Equal to IORESOURCE_MEM\n");&lt;BR /&gt;}&lt;BR /&gt;actVirtAddr = (unsigned long) bus_to_virt(basePhys); //for PowerPC p2041 architecture we have to do this function call&lt;BR /&gt;//because p2041 supports 36Byte addressing&lt;BR /&gt;virtAddress = (unsigned long) ioremap(actVirtAddr,baseLength);&lt;BR /&gt;elpc_adc_comm_address = virtAddress;&lt;/P&gt;&lt;P style="color: #000099; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #fdfdfd;"&gt;&lt;/P&gt;&lt;P style="color: #000099; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #fdfdfd;"&gt;&lt;SPAN style="color: #303030;"&gt;The PCI Configuration dump is in attachments:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000099; font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: #fdfdfd;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 13:32:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/P2041-PCIe-devices-driver-causing-BUS-Error/m-p/461280#M2676</guid>
      <dc:creator>madhurwani</dc:creator>
      <dc:date>2016-03-08T13:32:13Z</dc:date>
    </item>
  </channel>
</rss>

