What happens when an interrupt occurs? This article will focus on what the kernel does when the interrupt occurs, so this will assume that the interrupt is initialized and enabled.
1.       IRQ is signaled in hardware
2.       A vectored function is called in the kernel – the calling of the function is controlled by hardware, so the implementation is CPU family dependent. The vector table is initialized by the Kernel when it starts.
3.       Interrupts are disabled
4.       OEMInterruptHandler() is called to determine the SYSINTR value associated with the IRQ – OEMInterruptHandler() is platform dependent, so while there is some commonality, that is not guaranteed. OEMInterruptHandler() is required to identify the SYSINTR value associated with the IRQ and return the value. OEMInterruptHandler() usually disable the IRQ, to be re-enabled when the driver calls InterruptDone().
5.       Interrupts are re-enabled
6.       The event associated with the SYSINTR is signaled
7.       The scheduler schedules the highest priority thread to run
Copyright © 2009 – Bruce Eitman
All Rights Reserved