Re: accessing a PCIe register from userspace through kmem or other ways ?

From: Ryan Stone <rysto32_at_gmail.com>
Date: Fri, 1 Apr 2016 12:48:24 -0400
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.
Received on Fri Apr 01 2016 - 14:48:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:03 UTC