mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-14 13:18:19 +00:00
pci_decode: enable all bridges
set I/O port, MMIO, and bus master to enabled for bridges where disabled. issue #4578
This commit is contained in:
committed by
Christian Helmuth
parent
e7ba0b7371
commit
7f0c89f378
@ -82,6 +82,18 @@ void Main::parse_pci_function(Bdf bdf,
|
|||||||
new (heap) Bridge(parent.sub_bridges, bdf,
|
new (heap) Bridge(parent.sub_bridges, bdf,
|
||||||
bcfg.secondary_bus_number(),
|
bcfg.secondary_bus_number(),
|
||||||
bcfg.subordinate_bus_number());
|
bcfg.subordinate_bus_number());
|
||||||
|
|
||||||
|
/* enable I/O spaces and DMA in bridges if not done already */
|
||||||
|
using Command = Pci::Config::Command;
|
||||||
|
Command::access_t command = bcfg.read<Command>();
|
||||||
|
if (Command::Io_space_enable::get(command) == 0 ||
|
||||||
|
Command::Memory_space_enable::get(command) == 0 ||
|
||||||
|
Command::Bus_master_enable::get(command) == 0) {
|
||||||
|
Command::Io_space_enable::set(command, 1);
|
||||||
|
Command::Memory_space_enable::set(command, 1);
|
||||||
|
Command::Bus_master_enable::set(command, 1);
|
||||||
|
bcfg.write<Command>(command);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user