[parisc-linux] enumerating devices from user space

Lyonel Vincent vincentl@ec-lyon.fr
Wed, 12 Mar 2003 17:32:36 +0100


Hi there,

I'm currently implementing a small tool called lshw (you can find it on
Freshmeat) that enumerates installed devices on a machine and reports them
as a device tree (text, HTML and XML).
For now it knows about DMI, PCI busses, SCSI, IDE and PCMCIA and I would
like to port it to PA-RISC Linux. I already get some very basic info from
/proc/cpuinfo.
Does anyone know how I can access the device tree as seen by the kernel?
(much like HP-UX's ioscan does and what is shown in dmesg)
I've tried digging in /proc without much success... is there a way to get
this information from user space? PPC Linux exposes the device tree in
/proc for example. A mechanism similar to /proc/bus/pci/devices (machine-
parseable text) would be great, too.

thanks for your help,
Lyonel.

PS: I noticed that /proc/iomem lists 00000000-000009ff as "PDC data (Page
Zero)", is there a chance I can find what I need there? (I dd-ed it from
/dev/mem but I can't say if it contains useful data...)

-- 
The software said it requires Windows 2000 or better, so I installed Linux.