indicogniBuild a VMM

Lab

Interrupt lifecycle

Used in chapter 11, chapter 12.

See an interrupt as state, not a call: a level line, an edge and a latched edge played against a masked CPU, and, from chapter 12, one interrupt inside the GIC, when the source stops asking early, late or never.

Runs in browser
The life of one interrupt Top: with IRQs masked, a level line stays pending until the CPU unmasks, an edge with no latch is lost, and a latched edge waits in its latch. Bottom: the four GIC states of INTID 33. Raising the line makes it pending; reading the IAR makes it active, or active and pending while a level line is still high; lowering the line removes the pending half; writing the EOI makes it inactive, or pending again if a level line is still high, which is an interrupt storm. CPU masked, then unmasks level line: pending ... still pending ... handler runs edge, no latch: pulse, gone ... nothing pending ... nothing happens edge, latched: latch set ... still pending ... handler runs GIC state of INTID 33 inactive pending active and pending active raise IAR lower line EOI EOI, line still high: storm An edge: the IAR clears pending even with the line high, so the EOI ends it.

All labs