svn commit: r188018 - in head: sys/dev/pci usr.sbin/pciconf

Robert Noland rnoland at FreeBSD.org
Wed Feb 25 18:07:59 PST 2009


On Wed, 2009-02-25 at 18:35 -0600, Nathan Whitehorn wrote:
> Robert Noland wrote:
> > On Wed, 2009-02-25 at 12:51 -0500, John Baldwin wrote:
> >> On Wednesday 25 February 2009 12:27:23 pm Nathan Whitehorn wrote:
> >>> John Baldwin wrote:
> >>>> Author: jhb
> >>>> Date: Mon Feb  2 19:54:16 2009
> >>>> New Revision: 188018
> >>>> URL: http://svn.freebsd.org/changeset/base/188018
> >>>>
> >>>> Log:
> >>>>   - Add a new ioctl to /dev/pci to fetch details on an individual BAR of a
> >>>>     device.  The details include the current value of the BAR (including all
> >>>>     the flag bits and the current base address), its length, and whether or not
> >>>>     it is enabled.  Since this operation is not invasive, non-root users are
> >>>>     allowed to use it (unlike manual config register access which requires
> >>>>     root).  The intention is that userland apps (such as Xorg) will use this
> >>>>     interface rather than dangerously frobbing the BARs from userland to
> >>>>     obtain this information.
> >>>>   - Add a new sub-mode to the 'list' mode of pciconf.  The -b flag when used
> >>>>     with -l will now list all the active BARs for each device.
> >>>>
> >>> Do you happen to have any patches for libpciaccess to use this?
> >>>
> >>> Libpciaccess (and so the latest Xorg server) hoses my PowerPC machine 
> >>> when trying to list BARs, but pciconf -b works correctly. There are 
> >>> probably endianness problems in the libpciaccess code, and it would be 
> >>> nice to just replace that mess with this interface.
> >> No, I don't have any patches.  rnoland@ might.  This interface was explicitly
> >> designed to replace mess in libpciaccess. :)
> > 
> > I still need to work on getting this into libpciaccess.  It's
> > complicated by the fact that we still need to keep the existing code in
> > place and only use the new ioctl where it exists...
> > 
> > I'll try and get a patch together soon.
> 
> I have a patch at http://people.freebsd.org/~nwhitehorn/freebsd_pci.c.patch
> 
> This is tested on PowerPC and amd64 running -CURRENT, and is in addition 
> to the patch currently applied by ports. It *should* gracefully use the 
> old pathway if the new ioctl isn't available. And now I have working X 
> on PPC!

Nifty, I hadn't thought of using the ioctl define as the trigger.

Thanks, committed!

I'll probably go ahead and commit this upstream as well now.  I would
still like to know what is trashing usb for some folks though.

robert.

> -Nathan
-- 
Robert Noland <rnoland at FreeBSD.org>
FreeBSD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20090226/45ce93a3/attachment.pgp


More information about the svn-src-all mailing list