platform_drv: enable full access for pci bridges

Issue #2620
This commit is contained in:
Alexander Boettcher 2017-12-18 10:19:09 +01:00 committed by Norman Feske
parent 1f1d1af041
commit 336140c5f1

View File

@ -63,6 +63,24 @@ void Platform::Pci_buses::scan_bus(Config_access &config_access,
bridges()->insert(new (heap) Bridge(bus, dev, fun, sec_bus,
sub_bus));
enum {
PCI_CMD_REG = 0x4,
PCI_CMD_MASK = 0x7 /* IOPORT, MEM, DMA */
};
unsigned short cmd = config.read(&config_access, PCI_CMD_REG,
Platform::Device::ACCESS_16BIT);
if ((cmd & PCI_CMD_MASK) != PCI_CMD_MASK) {
config.write(&config_access, PCI_CMD_REG,
cmd | PCI_CMD_MASK,
Platform::Device::ACCESS_16BIT);
}
Genode::log(config, " - bridge ", sec_bus, ":0.0",
((cmd & PCI_CMD_MASK) != PCI_CMD_MASK) ? " enabled"
: "");
scan_bus(config_access, heap, sec_bus);
}
}