PCI in /proc, /sys, and so on

From: Albert Cahalan (albert@users.sourceforge.net)
Date: Sat May 31 2003 - 21:18:29 EST


In /proc/bus/pci, there is a tree containing
files to access PCI config space (only, no BARs)
and a seemingly out-of-place "devices" file.
There is no support for multiple domains.
Like this:
.
|-- 00
| |-- 0b.0
| `-- 10.0
|-- 01
| |-- 0b.0
| |-- 17.0
| |-- 18.0
| |-- 19.0
| `-- 1a.0
|-- 02
| |-- 0b.0
| `-- 0f.0
`-- devices

Over in /sys/devices, there is a tree with more
info. At first glance I thought "pci0" would be
the first domain, but really it is just the bus
number. So that duplicates part of the name
lower down the tree: /sys/devices/pci2/02:0b.0
has a pair of "2" that are redundant.

So, there's no PCI domain support anywhere except
in some nasty ioctl, and no interface to allow
simple file-based access to PCI MMIO regions.

Future directions? Where would file-based access
be most acceptable? (in /proc, in /sys, or ???)

It sure would be nice to have all the stuff for
any given device end up in the same directory.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/