mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 16:35:28 +00:00
parent
1f1d1af041
commit
336140c5f1
@ -63,6 +63,24 @@ void Platform::Pci_buses::scan_bus(Config_access &config_access,
|
|||||||
bridges()->insert(new (heap) Bridge(bus, dev, fun, sec_bus,
|
bridges()->insert(new (heap) Bridge(bus, dev, fun, sec_bus,
|
||||||
sub_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);
|
scan_bus(config_access, heap, sec_bus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user