mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-03-09 20:32:11 +00:00
PCI-to-PCI bridges now return true in supports_io_space().
Doing so ensures that accesses to the I/O space are broadcasted to the PCI-to-PCI bridges automatically.
This commit is contained in:
parent
2c026259b1
commit
a34e0a4737
@ -50,6 +50,10 @@ public:
|
||||
virtual uint32_t pci_cfg_read(uint32_t reg_offs, AccessDetails &details);
|
||||
virtual void pci_cfg_write(uint32_t reg_offs, uint32_t value, AccessDetails &details);
|
||||
|
||||
bool supports_io_space() {
|
||||
return true;
|
||||
};
|
||||
|
||||
// plugin interface for using in the derived classes
|
||||
std::function<uint8_t()> pci_rd_primary_bus;
|
||||
std::function<void(uint8_t)> pci_wr_primary_bus;
|
||||
|
@ -171,15 +171,8 @@ uint32_t PCIHost::pci_io_read_broadcast(uint32_t offset, int size)
|
||||
|
||||
// broadcast I/O request to devices that support I/O space
|
||||
// until a device returns true that means "request accepted"
|
||||
if (pci_io_read_loop (offset, size, res)) {
|
||||
if (pci_io_read_loop(offset, size, res))
|
||||
return res;
|
||||
}
|
||||
|
||||
// broadcast I/O request to devices sitting behind PCI-to-PCI bridges
|
||||
for (auto& dev : this->bridge_devs) {
|
||||
if (dev->pci_io_read_loop(offset, size, res))
|
||||
return res;
|
||||
}
|
||||
|
||||
// no device has accepted the request -> report error
|
||||
HWComponent *hwc = dynamic_cast<HWComponent*>(this);
|
||||
@ -196,15 +189,8 @@ void PCIHost::pci_io_write_broadcast(uint32_t offset, int size, uint32_t value)
|
||||
{
|
||||
// broadcast I/O request to devices that support I/O space
|
||||
// until a device returns true that means "request accepted"
|
||||
if (pci_io_write_loop(offset, size, value)) {
|
||||
if (pci_io_write_loop(offset, size, value))
|
||||
return;
|
||||
}
|
||||
|
||||
// broadcast I/O request to devices sitting behind PCI-to-PCI bridges
|
||||
for (auto& dev : this->bridge_devs) {
|
||||
if (dev->pci_io_write_loop(offset, size, value))
|
||||
return;
|
||||
}
|
||||
|
||||
// no device has accepted the request -> report error
|
||||
HWComponent *hwc = dynamic_cast<HWComponent*>(this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user