Hi Everyone, but Particularly Kevin,

I'd like to contribute some coding. In particular, I'd like to work on
getting windows running in a double-headed system. To do this, I think we
need some PCI spoofing capability, a bit more sophisticated than the Bochs
PCI module seems to be.

Here is what I think we would need:

We need to be able to enable/disable/spoof PCI devices in the Guest OS
(actually, we don't really need to be able to report virtual devices - what
I term "spoofing" - but it will be useful for future emulation, is fairly
trivial, so why not at least allow for it now?). We need to be able to
enable/disable PCI devices in the Host OS.

To do this, I would see using a PCI class, possibly with some
macros/inlines/static class member functions. The same one could do both
jobs.

The class would maitain a array with an entry for each bus, device and
function combinaiton. Each entry would contain a flag indicating that the
corresponding combination should be passed through to the actual PCI bus,
masked out (as if the hardware that it corresponds to didn't exist) or
spoofed. In the latter case, there would be a pointer to the data that would
be used for the spoofed device's configuration table.

The spoofing data could be loaded from a configuration file.

This PCI class should be accessed with the target read/write before
accessing the actual PCI bus and the returned action would determine what
data would be passed on as if it came from the PCI I/O access. (If the
target were disabled, reads would return 0xFFFF, if enabled they would
return the values from the actual PCI bus and if spoofed they would return
data from the spoof configuration space).

In configuration method one, only two I/O addresses would need handling -
0xCF8 to select a location in configuration space and 0xCFC to read the
value.


A PCI bus scanner would be useful, too (could be used to determine which
devices to spoof/allow).


By the way, does anyone know of any situation where PCI configuration method
2 is used? I think the PC always uses method 1, but it would be nice to know
for sure.


Finally, what language is the project written in? C? C++? I can handle
either, but I'd rather not do both.



Sorry about the rambling nature of this post - I was writing as I was
thinking. Colin


Reply via email to