genode/repos/base-hw
Reto Buerki c82f5e9269 hw_x86_64: Do not mask edge-triggered interrupts
Do not mask edge-triggered interrupts to avoid losing them while masked,
see Intel 82093AA I/O Advanced Programmable Interrupt Controller
(IOAPIC) specification, section 3.4.2, "Interrupt Mask":

"When this bit is 1, the interrupt signal is masked. Edge-sensitive
interrupts signaled on a masked interrupt pin are ignored (i.e., not
delivered or held pending)"

Or to quote Linus Torvalds on the subject:

"Now, edge-triggered interrupts are a _lot_ harder to mask, because the
Intel APIC is an unbelievable piece of sh*t, and has the edge-detect
logic _before_ the mask logic, so if a edge happens _while_ the device
is masked, you'll never ever see the edge ever again (unmasking will not
cause a new edge, so you simply lost the interrupt)."

So when you "mask" an edge-triggered IRQ, you can't really mask it at
all, because if you did that, you'd lose it forever if the IRQ comes in
while you masked it. Instead, we're supposed to leave it active, and set
a flag, and IF the IRQ comes in, we just remember it, and mask it at
that point instead, and then on unmasking, we have to replay it by
sending a self-IPI." [1]

[1] - http://yarchive.net/comp/linux/edge_triggered_interrupts.html

Ref #1448
2015-03-27 11:53:34 +01:00
..
doc imx31: remove platform completely (fix #1360) 2015-01-12 14:24:15 +01:00
include Update or add hw_x86_64 copyright headers 2015-03-27 11:53:32 +01:00
lib hw_x86_64: Add I/O port allocator to platform 2015-03-27 11:53:32 +01:00
mk hw_x86_64: Add various drivers to x86 2015-03-27 11:53:33 +01:00
run run: modularize run tool 2015-01-26 12:28:40 +01:00
src hw_x86_64: Do not mask edge-triggered interrupts 2015-03-27 11:53:34 +01:00