AW: Interrupt handling

"Christian, Martin, OPEE45" <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>
Hi Sergio!

> after having read the byte from the serial input data port,
> you should clear the relevant interrupt bit in the serial device

The serial device (which is part of the bridge) has two types of
registers:
a) Interrupt Cause (cr)
b) Interrupt Mask (mr)

This is my understanding of ACK and MASK:
1.) ACK an interrupt means: cr <- 0
2.) MASK an interrupt means: mr <- 0

My understanding of the whole interrupt handling is this:
1.) The kernel calls handle_irq(), which is provided by the platform
2.) handle_irq() calls a mask_and_ack()
3.) mask_and_ack does MASK and ACK (see above), which means it tells the
device "I've seen your interrupt" and disables it untils it's handled
4.) handle_irq() calls the kernels handle_interrupt()
5.) The kernel creates an interrupt thread which sends an IPC to a
registered interrupt handler
6.) Now we are in user mode! The interrupt handler receives the
interrupt and does something meaningfull
7.) After handling the interrupt, the user mode handler sends back an
IPC to the kernel interrupt thread
8.) The kernel interrupt thread should unmask the interrupt again and
finish.

Please correct me, if I'm wrong! I especially don't see a reason why a
user mode thread should unmask the interrupt. It's all low level stuff.

Best,

Martin.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.