PCI BAR mmap

Venkat Duvvuru venkatduvvuru.ml at gmail.com
Tue Jul 31 15:22:26 UTC 2012


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.

/Venkat

On Tue, Jul 31, 2012 at 7:21 PM, John Baldwin <jhb at freebsd.org> wrote:

>  On Tuesday, July 31, 2012 8:48:00 am Venkat Duvvuru wrote:
> > Hi,
> > How to mmap PCI  BARs from userland in freebsd?
> > In Linux the PCI BAR appears as a file in the sysfs file system. How can
> I
> > access PCI BAR as a file in freebsd to mmap it?
>
> You can export a BAR via a d_mmap() method from a cdevsw device you create
> in
> your driver.
>
> --
> John Baldwin
>


More information about the freebsd-net mailing list