I'm having some question regarding PCI and IRQS.
How IRQs get assigned to devices that is connected to PCI bus , does it get assigned by the BIOS at boot time , or the bus choose it or the bus controller choose it automaticlly by itself who is responsable for that choice of IRQS numbers ?
when a device gets connected to a PCI bus can the device fill the IRQ field in the PCI Controller configuration register?
Can the Linux kernel assign and change the IRQS of connected devices ?
What about device controller like USB controller or SATA controller how we can assign an IRQ to the controller since it have more than one device that is connected to it , and how multiple devices like that are connected to the same controller use IRQS ?
How Linux identify devices that gets connected to the machine while it's running and how they get assigned an IRQ number and who is responsable for that ?
PCI configuration space is configured by the Bios, which means that Bios is supposed to enumerate all PCI devices at boot time. When a device is enumerated, the Bios routes an IRQ line to the IOAPIC input and set BAR registers, then, the kernel can request_irq() with the appropriate irq number read from the pci configuration space.