From owner-svn-src-head@FreeBSD.ORG Thu Feb 26 02:07:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9559C106566B; Thu, 26 Feb 2009 02:07:58 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 624BD8FC08; Thu, 26 Feb 2009 02:07:58 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from [192.168.1.2] (adsl-156-5-199.bna.bellsouth.net [70.156.5.199]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n1Q26ab8015322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 25 Feb 2009 21:06:36 -0500 (EST) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Nathan Whitehorn In-Reply-To: <49A5E3D7.1080903@freebsd.org> References: <200902021954.n12JsGT2005768@svn.freebsd.org> <49A57F7B.3040704@freebsd.org> <200902251251.01789.jhb@freebsd.org> <1235584641.1273.69.camel@widget.2hip.net> <49A5E3D7.1080903@freebsd.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-rKipUPSY+6kngA0coVl4" Organization: FreeBSD Date: Wed, 25 Feb 2009 20:07:50 -0600 Message-Id: <1235614070.1308.2.camel@widget.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.24.4 FreeBSD GNOME Team Port X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00, MIME_QP_LONG_LINE,RDNS_DYNAMIC autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r188018 - in head: sys/dev/pci usr.sbin/pciconf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2009 02:07:59 -0000 --=-rKipUPSY+6kngA0coVl4 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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 BA= R of a > >>>> device. The details include the current value of the BAR (inclu= ding all > >>>> the flag bits and the current base address), its length, and whe= ther or not > >>>> it is enabled. Since this operation is not invasive, non-root u= sers are > >>>> allowed to use it (unlike manual config register access which re= quires > >>>> root). The intention is that userland apps (such as Xorg) will = use this > >>>> interface rather than dangerously frobbing the BARs from userlan= d to > >>>> obtain this information. > >>>> - Add a new sub-mode to the 'list' mode of pciconf. The -b flag w= hen 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= =20 > >>> when trying to list BARs, but pciconf -b works correctly. There are=20 > >>> probably endianness problems in the libpciaccess code, and it would b= e=20 > >>> nice to just replace that mess with this interface. > >> No, I don't have any patches. rnoland@ might. This interface was exp= licitly > >> designed to replace mess in libpciaccess. :) > >=20 > > 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... > >=20 > > I'll try and get a patch together soon. >=20 > I have a patch at http://people.freebsd.org/~nwhitehorn/freebsd_pci.c.pat= ch >=20 > This is tested on PowerPC and amd64 running -CURRENT, and is in addition=20 > to the patch currently applied by ports. It *should* gracefully use the=20 > old pathway if the new ioctl isn't available. And now I have working X=20 > 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 --=20 Robert Noland FreeBSD --=-rKipUPSY+6kngA0coVl4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEABECAAYFAkml+XYACgkQM4TrQ4qfROM6DACeLvsMsTPO9aU+5JgJ8tfH0HYA KwcAn1qYERVnfOZk2dMt2mKY0EwrWndO =5d4D -----END PGP SIGNATURE----- --=-rKipUPSY+6kngA0coVl4--