Userspace mmap to PCI is failing

2017-02-17 Thread lex000luthor
Hello, I am trying to mmap a PCI device, but it fails with EINVAL. ... fd = open("/dev/mem", O_RDWR | O_SYNC); ... rv = mmap64(0, size, PROT_READ, MAP_SHARED, fd, pci_addr); ... The pci_addr is the address obtained from lspci output which is a 64 bit address. The pci_addr has a value of

Userspace mmap to PCI is failing

2017-02-17 Thread lex000luthor
Hello, I am trying to mmap a PCI device, but it fails with EINVAL. ... fd = open("/dev/mem", O_RDWR | O_SYNC); ... rv = mmap64(0, size, PROT_READ, MAP_SHARED, fd, pci_addr); ... The pci_addr is the address obtained from lspci output which is a 64 bit address. The pci_addr has a value of