Yesterday I sent out a copy of my showpci program, but it got stuck waiting for moderator approval because it was too big (I just attached the file).
You can now find it at http://garrett.damore.org/software/solaris/showpci.tar.gz Here's what I originally wrote about it: Attached please find a utility, "showpci", which will find all the PCI devices on your system and display them, including a textual description about them if one is known. I _think_ it will also work for Cardbus devices, but I can't verify that easily right now. This does not actively probe the bus, but merely looks at the properties that are already present in the device tree. This is a source form, in BSD license. It uses the NetBSD device database and an awk script written by Chris Demetriou, so it bears an attribution requirement as follows: # This product includes software developed by Christopher G. Demetriou. (It would be pretty easy to write the awk script to remove the attribution requirement if someone cared.) If someone wants to turn this into "real" code (integrate it into Solaris or Xorg or somesuch) please let me know. Thanks. To use it, just untar the source, then cd into "showpci" and do "make". The resulting binary requires root privilege run, primarily because you need to be root to look at prom properties. (I'm not sure why this is really necessary. Probably this could be easily changed so that /dev/openprom allowed anyone to do a "read", but there could be issues that I'm missing.) Oh yeah, I've only tested this on amd64 for the moment. But I'd be surprised if it doesn't work everywhere Solaris runs. It will probably run on Solaris 8 and newer. Obviously the file isn't an attachment as indicated, instead use the URL above to get to it. -- Garrett Garrett D'Amore wrote: > Yes, I have to eat my words. > > Further debugging indicated an error in my code. > > -- Garrett > > Edward Pilatowicz wrote: > >> On Thu, Aug 03, 2006 at 01:04:53PM -0700, Garrett D'Amore wrote: >> >> >>> Garrett D'Amore wrote: >>> >>> >>>> Casper.Dik at Sun.COM wrote: >>>> >>>> >>>> >>>>> Did someone mention scapci (/usr/X11/bin/scanpci; don't ask) and >>>>> pcitweak yet? >>>>> >>>>> Casper >>>>> >>>>> >>>>> >>>>> >>>> I've almost finished writing a fairly complete pci enumerator that only >>>> uses libdevinfo. stay tuned. >>>> >>>> -- Garrett >>>> >>>> >>>> >>>> >>> Fun. The enumeration using libdevinfo excludes devices that don't have >>> drivers attached. I'm trying an alternate approach using the openprom >>> interface. >>> >>> >>> >> hu? a libdevinfo snapshot does include information for devices that >> don't have drivers associated with them. see the -D option to prtconf. >> >> >> >>> I think we need an RFE to have libdevinfo iterate over _all_ devices >>> from the prom, even ones that don't have drivers attached. (Maybe a >>> flag to di_init(), and probably a bit of code to merge the kernel's >>> devinfo tree with the prom's.) >>> >>> -- >>> Garrett D'Amore, Principal Software Engineer >>> Tadpole Computer / Computing Technologies Division, >>> General Dynamics C4 Systems >>> http://www.tadpolecomputer.com/ >>> Phone: 951 325-2134 Fax: 951 325-2191 >>> >>> _______________________________________________ >>> laptop-discuss mailing list >>> laptop-discuss at opensolaris.org >>> >>> > > > -- Garrett D'Amore, Principal Software Engineer Tadpole Computer / Computing Technologies Division, General Dynamics C4 Systems http://www.tadpolecomputer.com/ Phone: 951 325-2134 Fax: 951 325-2191
