[ECOS] Interrupt handling and Device Drivers.
Tue Apr 4 01:10:00 GMT 2000
I have following questions.
It was clear from the documentation that with every device driver there
exists an init function which possibly might do the following things :
1. Initialize the device
2. perform h/w setup
3 Create interrupt
4. Hook an interrupt handler.
and so on.
Is there any cleanup function associated with device driver ? How does
any device gets de-initialized ?
My second query is about interrupt handling.
When more than one isr exists for a given vector (I hope this is done
through interrupt chaining ), what part of the kernel code calls those
isrs? It is understandable that in vectors.s the IRQ handler will call
the first handler in the chain. Correct me if I am incorrect.
My third query is about the handling of IRQ exception handler.
During handling of IRQ I observed the following steps in vectors.s
1 In handle_IRQ_or_FIQ switch mode to supervisor and disable irq and
2 Switch the stack if required based on irq_level.
3 Lock the scheduler
4 Decode the interrupt source using hal_IRQ_handler.
5 Call the interrupt handler pertaining to the above decoded vector.
6 Call interrupt_end.
Now why do we need to disable the irq and fiq again before following two
Are not they disabled in step 1 above?
And next few instructions will bring the processor back into the IRQ
Thanks In advance,
More information about the Ecos-discuss