mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-14 16:26:30 +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
|
||||
*
|
||||
* \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 bdf PCI bdf of device
|
||||
*/
|
||||
Irq_connection(Env &env,
|
||||
Label const &label,
|
||||
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 },
|
||||
Args("irq_number=", label, ", "
|
||||
"device_config_phys=", Hex(device_config_phys), ", "
|
||||
"bdf=", Hex(bdf), ", "
|
||||
"irq_type=", unsigned(type))),
|
||||
Irq_session_client(cap())
|
||||
{ }
|
||||
|
@ -168,7 +168,8 @@ Genode::Irq_session_capability Device_component::irq(unsigned idx)
|
||||
} else
|
||||
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
|
||||
irq.irq.construct(_env, irq.number, irq.mode, irq.polarity);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user