I am working on a project where I need to access a FPGA memory through PCI BAR0 from userspace.
What I used to do in older kernels is open the file named resource0 which is located in /sys/bus/pci/devices/my_device/ and then use the mmap() function which exposes the FPGA memory to the userspace.
Unfortunately, in kernel version 4.7 (architecture ARM64) it seems that for some reason resource0 file is not created.
When I use the lspci I can see that the system recognizes the PCI BARs of the FPGA. In addition, when I search the /sys/bus/pci/devices/my_device/ directory I can see that there is a file named resource which has among others the addresses of the PCI BARs written in it.
Is anyone familiar with a similar situation? How can I make linux create the resource0 file?