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

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, July 31, 2012 12:14:41 pm Adrian Chadd wrote:
> On 31 July 2012 08:22, Venkat Duvvuru <venkatduvvuru.ml@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



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