Here’s what I need to do…
From either user-mode or driver or a combination of both (doesn’t matter
which) I need to be able to read the boot ROM from any PCI device which
has one.
I’ve done a few days research and followed up on snippets as best I could
but don’t have a definitive solution.
IIUC it’s not possible to read/write an arbitrary device’s PCI
configuration space safely, without writing a bus filter driver which,
again IIUC, isn’t documented/supported. Yes?
I can enumerate PCI devices and their resources from user-mode using
either the DEVCON sample or my own code via SetupDi_XXX but don’t know how
to identify the ROMBAR resource - there doesn’t appear to be a
corresponding ResType_XXX defined for it.
So my questions are:
* How does one identify ROMBARs in the resource list?
* Assuming I can extract the ROMBAR, can I safely read the contents of the
ROM from any PCI device from either user mode or, if need be, my
existing (though unrelated) device driver?
An aside:
I have downloaded some freeware software called PCI32 which enumerates PCI
devices and dumps the configuration space of all devices. According to the
doco it dynamically installs and removes a driver each time it is run. I’m
wondering if it can *safely* read the PCI config or whether it is throwing
caution to the wind and using I/O port accesses?
Interestingly it detects an unused ROMBAR on my graphics device - config
space dump shows “00000000” so I’m assumming it actually probes the
register, ie. it’s actually writing to config space!
Any advice would be greatly appreciated!
Regards,
–
Mark McDougall, Engineer
Virtual Logic Pty Ltd, http:
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266</http:>