<div dir="ltr"><div>Hello,</div><div><br></div><div>I am having an important 
trouble while communicating with my PCI Endpoint devices MMIO. I am 
using T1042D4RDB-64B. PowerPC e5500 processor with kernel version 4.19 and default PCI driver is 'pcieport'. Kernel is built with Yocto 2.7.<br></div><div><br></div><div>I
 have a FPGA memory controller card which is programmed to light GPIO 
leds when it's memory is filled with data on PCI. I wrote a driver and 
tested it with x86 based Ubuntu and it's working as expected.</div><div><br></div><div>I
 used same driver with T1042D4RDB-64B. Kernel is giving UNRECOVERABLE 
MACHINE CHECK error when I try to read the same area I wrote before. 
Leds are also not lighting so that this means write operation is not 
working too. Seems like ATMU is not transferring the transactions to PCI
 endpoint device.</div><div><br></div><div>I tried same code piece with another endpoint device ( This is a GPU ) and I had same problem again.</div><div><br></div><div>I am seeking some help about this issue.<br></div><div><br></div><div><b>Detailed thread is here:</b><br></div><div><a href="https://community.nxp.com/thread/522267" target="_blank">https://community.nxp.com/thread/522267</a></div><div><br></div><div><b>Driver code piece</b><br></div><div>pci_request_regions(dev, "IO-pci"); <br></div><div>    pci_enable_device_mem(dev);</div><div>printk(KERN_INFO "Physical address start: %lX",pci_resource_start(dev,BAR_IO));<br>          printk(KERN_INFO "Physical address end: %lX",pci_resource_end(dev,BAR_IO));<br>          iomapped_addr_start = ioremap(pci_resfreescaleource_start(dev,BAR_IO),pci_resource_len(dev,BAR_IO));<br>          printk(KERN_INFO "Virtual address start: %lX",iomapped_addr_start);</div><div><br></div><div>if(iomapped_addr_start != NULL || iomapped_addr_start != 0)<br>         {<br>   for(i=0;i<pci_resource_len(dev,BAR_IO);i++)<br>         { <br>       printk(KERN_INFO "Before Write %lX \n",iomapped_addr_start+i);<br>       writeb(5,iomapped_addr_start+i);<br>       printk(KERN_INFO "Writed 5 \n");<br>       printk(KERN_INFO "Readed %d",readb(iomapped_addr_start+i)); <br>   }<br> }</div><div><br></div><div><b>Output:</b></div><div>Physical address start: 0x21000000</div><div>Physical address end: 0x210007ff</div><div>Virtual address start: 80000800888C0000</div><div>Before Write 80000800888C0000                                                   <br>Writed 5                                                                        <br>ntDlaibslaibnlgi nlgo clko cdke bduegbguginggi ngdu de ueto t ko erkenernl eltat<br>  x                                                                             <br>80000001 cecar 0x020c0000 cecar2 0x00001010                                     <br>CaCuasuesde db yb y( f(rformom M MCSCSR=R=a0a00000):): L Looad Error Report     <br>KeKrenrenle lp apannici c -- n onott s ysynncicningg: Unrecoverable Machine chek</div></div>