Initial version of PCI access library

Ian Romanick idr at us.ibm.com
Fri Feb 17 17:37:44 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have just made available the source to my first pass at a PCI access
library.  The source can be found at:

	http://people.freedesktop.org/~idr/pci/

This is an early version for review.  It implements pretty much
everything described in the wiki.  This includes the "regex" based
device iterator (more on that below).  A sample program, pcils, is
included.  It operates somewhat like a stripped down lspci clone.

	http://wiki.x.org/wiki/PciReworkProposal

This initial version will ONLY work on fairly recent (2.6.12+?) Linux
kernels.  Several of the functions, such as pci_device_map_region and
pci_device_read_rom, require that files be available under
/sys/bus/pci/devices/* aren't available in early 2.6 releases.

No effort has (yet) been made to support non-Linux systems.

Both the wiki and the code need interfaces added to query the names for
the device, vendor, subdevice, and subvendor from pci.ids.  This
information is currently compiled into the scanpci module, and that is
just plain evil.

The device iteration interface also needs to be reworked.  However, I
want a better understanding of the server actually probes / iterates
devices first.  Can anyone explain to me how this works?  Is that
different from how we would /want/ it to work?  I like the Linux kernel
model, but I don't think that would work with non-PCI devices.

Comments are welcome.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFD9npoX1gOwKyEAw8RAg6mAJ9N9mKCEjmvuaj+ci4XpAmr/8u4qQCfeVeX
Ykix/kTT0WQAIZmwFsdS8kw=
=3IXJ
-----END PGP SIGNATURE-----



More information about the xorg mailing list