mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-11 20:01:48 +00:00
pci_decode: IRQ reporting for MSI/MSI-X only devices
Don't skip IRQ reporting if legacy IRQ/GSIs are not supported as the device may support MSI/MSI-X exclusively. The commit also enables reserved_memory reporting of devices without IRQs. Ref genodelabs/genode#4578
This commit is contained in:
@ -148,10 +148,22 @@ void Main::parse_pci_function(Bdf bdf,
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/* IRQ pins count from 1-4 (INTA-D), zero means no IRQ defined */
|
/*
|
||||||
if (!irq_pin)
|
* Only generate <irq> nodes if at least one of the following
|
||||||
return;
|
* options is operational.
|
||||||
|
*
|
||||||
|
* - An IRQ pin from 1-4 (INTA-D) specifies legacy IRQ or GSI can be
|
||||||
|
* used, zero means no IRQ defined.
|
||||||
|
* - The used platform/kernel is MSI-capable and the device includes an
|
||||||
|
* MSI/MSI-X PCI capability.
|
||||||
|
*
|
||||||
|
* An <irq> node advertises (in decreasing priority) MSI-X, MSI, or
|
||||||
|
* legacy/GSI exclusively.
|
||||||
|
*/
|
||||||
|
bool const supports_irq = irq_pin != 0;
|
||||||
|
bool const supports_msi = msi_capable && (msi_x || msi);
|
||||||
|
|
||||||
|
if (supports_irq || supports_msi)
|
||||||
gen.node("irq", [&]
|
gen.node("irq", [&]
|
||||||
{
|
{
|
||||||
if (msi_capable && msi_x) {
|
if (msi_capable && msi_x) {
|
||||||
|
Reference in New Issue
Block a user