I want to map PCIe Memory mapped config space into the user space. I am trying to use mmap system call to map the MMCONFIG physical address into the user space. I did some search but not able to figure out what to populate in the fd parameter in-order to do the correct mapping.
mmap system call : void mmap(void addr, size_t length, int prot, int flags, int fd, off_t offset);
Physical address from /proc/iomem : e0000000-efffffff : PCI MMCONFIG 0000 [bus 00-ff]
I could access PCIe enhanced configuration space using port 0xcfc & 0xcf8 but i want to achieve the same by mapping physical address into user space.
Thanks in advance
System: RHEL / x86_64