mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 11:27:29 +00:00
pci_decode: disable MSI/MSI-X capabilities
Default disabled initialization prevents follow-up errors if one capability is already enabled on boot, but platform_drv decides to enable the other one. The PCI spec explicitly states that "Behavior is undefined if both MSI and MSI-X are enabled simultaneously". Fixes #5228
This commit is contained in:
parent
b793802333
commit
e90f6988d8
@ -145,6 +145,10 @@ bus_t Main::parse_pci_function(Bdf bdf,
|
||||
bool msi_x = cfg.msi_x_cap.constructed();
|
||||
irq_pin_t irq_pin = cfg.read<Config::Irq_pin>();
|
||||
|
||||
/* disable MSI/MSI-X by default */
|
||||
if (msi) cfg.msi_cap->write<Pci::Config::Msi_capability::Control::Enable>(0);
|
||||
if (msi_x) cfg.msi_x_cap->write<Pci::Config::Msi_x_capability::Control::Enable>(0);
|
||||
|
||||
gen.node("device", [&]
|
||||
{
|
||||
auto string = [&] (uint64_t v) { return String<16>(Hex(v)); };
|
||||
|
Loading…
x
Reference in New Issue
Block a user