Here in this article, I will explain about how to trace your code in InterruptEnable, InterruptHandler, InterruptDone and InterruptDisable.
Lets start from code in xxx_Init, when we generate System IRQ using IRQ (KernelIoControl) and save this information in it's irq-sys irq table.
Now we create a thread (CreateThread).
After creating event, we bind System IRQ with an event(InterruptInitialize). This is the point when OEMInterruptEnable (to initialize the interrupt) is getting called. Now ABCinterruptEnable(implementer dependent name) get called. As InterruptInitialize called with Syetsm IRQ so OEMInterruptEnable convert System IRQ to IRQ and with this parameter it call ABCInterruptEnable. So depending on this IRQ it enable the interrupt control registers.
InterruptDisable and InterruptDone call OEMInterruptDisable and OEMInterruptDone respectively.
Now I will talk about ISR part. As soon as, Interrupt occurs in device, the vector table in vector.inc(private code) called and jump to exception code related to the IRQHandler in armtrap.s. Now before going to perform any action it save register context and change mode to IRQ handling.
After saving and does nessesacity code execution, it calls OALInterruptHandler in ISR. (I guess we say vector table because it has magnitude like the address of the IRQHandler and it has Direction which say where to go.) In ISR, in OALInterruptHandler, It will check the interrupt register which will give information about the interrupting device to decide the interrupt device and the do the appropriate task. like masking the lower priority interrupt as well as it self and then clearing the pending register.
After returning the SysIntr, kernel will check for the with which event, this sysIntr is mapped and then signal the event and which will make sure that WaitForSingleObject API or any other API which are waiting for the event to get signalled will be called
No comments:
Post a Comment
Please add your valuable feedback and suggestion...
Note: Only a member of this blog may post a comment.