mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-02 16:52:52 +00:00
base: support specifying PCI bdf on irq creation
Required by the seL4 kernel interface for MSI creation and by another upstream kernel. Issue #5423
This commit is contained in:
parent
935681a7f4
commit
ea3ed25431
@ -46,17 +46,20 @@ struct Genode::Irq_connection : Connection<Irq_session>, Irq_session_client
|
|||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* \param label (virtual) interrupt number
|
* \param label (virtual) interrupt number
|
||||||
* \param device_config_phys config-space physical address
|
* \param device_config_phys PCI config-space physical address
|
||||||
* \param type interrupt type (e.g., msi/msi-x)
|
* \param type interrupt type (e.g., msi/msi-x)
|
||||||
|
* \param bdf PCI bdf of device
|
||||||
*/
|
*/
|
||||||
Irq_connection(Env &env,
|
Irq_connection(Env &env,
|
||||||
Label const &label,
|
Label const &label,
|
||||||
addr_t device_config_phys,
|
addr_t device_config_phys,
|
||||||
Type type = Irq_session::TYPE_MSI)
|
Type type,
|
||||||
|
unsigned bdf = 0x10000 /* invalid */)
|
||||||
:
|
:
|
||||||
Connection<Irq_session>(env, label, Ram_quota { RAM_QUOTA },
|
Connection<Irq_session>(env, label, Ram_quota { RAM_QUOTA },
|
||||||
Args("irq_number=", label, ", "
|
Args("irq_number=", label, ", "
|
||||||
"device_config_phys=", Hex(device_config_phys), ", "
|
"device_config_phys=", Hex(device_config_phys), ", "
|
||||||
|
"bdf=", Hex(bdf), ", "
|
||||||
"irq_type=", unsigned(type))),
|
"irq_type=", unsigned(type))),
|
||||||
Irq_session_client(cap())
|
Irq_session_client(cap())
|
||||||
{ }
|
{ }
|
||||||
|
@ -168,7 +168,8 @@ Genode::Irq_session_capability Device_component::irq(unsigned idx)
|
|||||||
} else
|
} else
|
||||||
error("MSI(-x) detected for device without pci-config!");
|
error("MSI(-x) detected for device without pci-config!");
|
||||||
|
|
||||||
irq.irq.construct(_env, irq.number, pci_cfg_addr, irq.type);
|
irq.irq.construct(_env, irq.number, pci_cfg_addr, irq.type,
|
||||||
|
Pci::Bdf::rid(_pci_config->bdf));
|
||||||
} else
|
} else
|
||||||
irq.irq.construct(_env, irq.number, irq.mode, irq.polarity);
|
irq.irq.construct(_env, irq.number, irq.mode, irq.polarity);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user