Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2012 12:08:21 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Venkat Duvvuru <venkatduvvuru.ml@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: PCI BAR mmap
Message-ID:  <201207311208.21178.jhb@freebsd.org>
In-Reply-To: <CAGdae7aw0M_BNy2ozbPhznC7vuw-5%2BbxqJVx%2BJBnhzG4TnKsYg@mail.gmail.com>
References:  <CAGdae7a0xuKnFaeOTUykLcUKuCf17TTuYD_MuG4t7FKbHNoqAg@mail.gmail.com> <201207310951.12251.jhb@freebsd.org> <CAGdae7aw0M_BNy2ozbPhznC7vuw-5%2BbxqJVx%2BJBnhzG4TnKsYg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, July 31, 2012 11:22:25 am Venkat Duvvuru 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.

No, we do not currently have a generic way to mmap PCI BARs.

> /Venkat
> 
> On Tue, Jul 31, 2012 at 7:21 PM, John Baldwin <jhb@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
> >
> 

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207311208.21178.jhb>