Re: /proc/pci design idea

Martin Mares (mj@atrey.karlin.mff.cuni.cz)
Fri, 12 Sep 1997 10:03:34 +0200


Hello,

> I'm considering taking on the task of moving device identification
> messages for PCI devices into user space. It makes little sense to me
> to keep vendor/device names compiled into the kernel. Makes it ugly for
> those of us who ship PCI boards with linux drivers as modules.
>
> So I'm thinking of turning /proc/pci into the directory /proc/pcibus
> with subdirectories xx (bus number) and yy under that for a device.
>
> i.e. /proc/pcibus/01/40 identifies a specific device on bus 1, dev_fn 0x40.
>
> That file would contain the 256byte configuration space for the device.
> A user-mode program would interpret the bytes to make a pretty display,
> if such a thing is desired. (Such a thing is desired by me:-)
>
> I'm starting with a 2.1.55 kernel and I can probably have it working in a
> few days.

Maybe you should implement also a per-device text file containing the
most important information (as present in current /proc/pci, but without
id -> name translation). Or maybe make the id -> name translation
a configurable option (but mark all the names as initdata and re-allocate
those corresponding to real devices).

Have a nice fortnight

-- 
Martin `MJ' Mares   <mj@gts.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"You can't do that in horizontal mode!"