accessing a PCIe register from userspace through kmem or other ways ?
Ryan Stone
rysto32 at gmail.com
Fri Apr 1 16:48:25 UTC 2016
On Fri, Apr 1, 2016 at 12:31 PM, John Baldwin <jhb at freebsd.org> wrote:
> Sorry, I mapped PCIe registers to the PCI-e config space register set. I
> am
> not sure exactly how libpciaccess handles register access (perhaps it reads
> raw bars and maps them via /dev/mem)? However, it would not be hard to a
> new ioctl to /dev/pci to allow one to mmap a specific BAR of a given
> device.
>
That is actually a really good question. I know that with some recent
BIOSes if I enabled allocating 64-bit addresses to BARs, the BAR would
actually be mapped outside of the range of /dev/mem. From a quick glance
at libpciaccess, I don't think that it handles this case. A specific
mechanism for allowing mmaping of BARs would be useful, I think.
More information about the freebsd-current
mailing list