* Accessing PCI expansion ROMs
@ 2002-10-28 5:29 Martin Schwenke
0 siblings, 0 replies; only message in thread
From: Martin Schwenke @ 2002-10-28 5:29 UTC (permalink / raw)
To: linux-kernel
I want to extract VPD (Vital Product Data) from the expansion ROMs on
PCI 2.0/2.1 devices. The PCI specification tells me all I need to
know once I can actually access the ROM I'm after.
On ppc I can use xmon (or write a dedicated utility) to get to
expansion ROMs and extract the required part. On i386, expansion ROMs
don't have addresses assigned and the PCI initialisation code seems to
explicitly disable and unassign them (and this seems to be recommended
by the PCI specification).
So, it looks like there might be a few options...
* Userspace. Is there a reliable way of accessing the ROMs from
userspace? Does it work the same way on different architectures?
I know I can assign an address and enable a ROM via PCI
configuration space, but I don't know if either of these things can
be done safely from userspace.
* Kernel. Write some kernel code to dynamically retrieve the contents
of expansion ROMs.
This might involve assigning an address, enabling the ROM, reading
data, disabling the ROM and then possibly unassigning it again.
* Kernel. Write some kernel code that hooks into the PCI
initialisation/hotplug to grab the contents of expansion ROMs before
they are unassigned and disabled. Copy the data and put it into
/proc or /devices - yep, a bit gross, but the amount of data tends
to be small.
Any ideas? I'd really like it to be architecture independent,
preferably userspace. However, it can't be done there, it'll have to
be done in the kernel... and then possibly architecture by
architecture...
Please copy me on replies, since I'm not subscribed to linux-kernel.
Thanks...
peace & happiness,
martin
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-10-28 5:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-28 5:29 Accessing PCI expansion ROMs Martin Schwenke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®