From the very little knowledge i have, every PCI
device has 4 interrupt pins. Pins from the many different PCI
devices on the motherboard (Built-in or external devices) are routed to an IO-APIC
(Advanced programmable interrupt controller) through a programmable interrupt router. So that was the topology.
As far as i know when an interrupt occur, the IO-APIC
will be signaled and it will raise an INT to the CPU then magic happens and CPU starts executing an ISR (Interrupt Service Routine).
What was that magic ?
What is the communication that should happen between the CPU and the IO-APIC
to handle the INT ?
I mean how does the CPU received the interrupt vector (is it a special PCI
bus cycle ?) & what will happen if the the IRQ
was shared by many devices (Take x86 Linux
as a platform reference) ?
-
Related: superuser.com/questions/218179/…– Mokubai ♦Jun 24, 2017 at 5:16
-
@Mokubai that link didn't answer my question.– Karim ManaouilJun 24, 2017 at 7:28
-
Hence I said it was related and not a duplicate. It may be tangential and provide information about the problem.– Mokubai ♦Jun 24, 2017 at 9:20
1 Answer
The interrupt vector is already stored in the interrupt vector table, so the CPU doesn't need to get it from a peripheral. If the interrupt is associated with an IO-APIC or similar device that can raise interrupts for different reasons, the interrupt handler will query that device to find out why it raised the interrupt. There's no special bus cycle for this, it's the same way a CPU would get any information from one of its peripherals.