/proc/bus/pci Question
Steven Ness
sness en stormix.com
Mie Ene 26 05:51:47 CST 2000
Hi Martin,
Thanks again for your input. I'll look into libpci again.
Steven.
On Tue, 25 Jan 2000, Martin Mares wrote:
> Hi,
>
> > On my system, in /proc/bus/pci, there are two directories, "00" and "01",
> > I assume these represent the first and second PCI busses on my system.
> > My question is, what do the files in these directories do?
>
> These files contain full configuration space of the corresponding
> devices.
>
> > Also, a possibly related question: Is there any way to get the
> > pci_devices dev->class field from userspace? I notice that the new
> > /proc/bus/pci/devices file has a lot of information, but doesn't include
> > the class type (e.g. Storage, Video). I see that this information is
> > present in /proc/pci, but my understanding is that /proc/pci is
> > obsolete. Any easy way to get this information?
>
> Yes, you can read it from the configuration registers mapped as files.
> Anyway, it's much better to use the libpci library from the pciutils
> package (ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-2.1.4.tar.gz)
> for this purpose -- it provides a clean interface for accessing of PCI
> registers and uses the appropriate low-level functions according to the
> OS, libraries and CPU you have.
>
> Have a nice fortnight
> --
> Martin `MJ' Mares <mj en ucw.cz> <mj en suse.cz> http://atrey.karlin.mff.cuni.cz/~mj/
> "REALITY.SYS corrupted - reboot Universe (Y/N)?"
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda