mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-22 00:41:55 +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:
@ -145,6 +145,10 @@ bus_t Main::parse_pci_function(Bdf bdf,
|
|||||||
bool msi_x = cfg.msi_x_cap.constructed();
|
bool msi_x = cfg.msi_x_cap.constructed();
|
||||||
irq_pin_t irq_pin = cfg.read<Config::Irq_pin>();
|
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", [&]
|
gen.node("device", [&]
|
||||||
{
|
{
|
||||||
auto string = [&] (uint64_t v) { return String<16>(Hex(v)); };
|
auto string = [&] (uint64_t v) { return String<16>(Hex(v)); };
|
||||||
|
Reference in New Issue
Block a user