PCI BAR mmap
John Baldwin
jhb at freebsd.org
Tue Jul 31 16:23:26 UTC 2012
On Tuesday, July 31, 2012 12:14:41 pm Adrian Chadd wrote:
> On 31 July 2012 08:22, Venkat Duvvuru <venkatduvvuru.ml at gmail.com> wrote:
> > Hi John,
> > Thanks for your response.
> > Is there an alternative to mmap the PCI BARs, I mean without implementing
> > an mmap method in the driver, something like a pci subsystem mmap in
Linux.
> > Linux allows to mmap PCI BARs without any change in the device driver.
>
> I guess someone could implement a sysctl API to access PCI BAR
> registers, rather than mapping /dev/pci or however pciconf -r works.
>
> That way you'd implement it once and all devices would have their BAR
> registers show up in a userland-friendly way.
Eh, no sysctl. /dev/pci uses ioctls. However, having a generic way to mmap
BARs may be useful.
--
John Baldwin
More information about the freebsd-net
mailing list