cat /proc/interrupts shows a bunch of IRQs such as
LOC. The per-line comments in the output give clear explanation, but if they do not have a numeric IRQ number, how does the x86 CPU respond to them, in terms of entries in the Interrupt Descriptor Table?
The non-numeric entries in
/proc/interrupts correspond to arch-specific, non-device-related interrupts.
On x86, the IDT layout is described in
- Vectors 0 ... 31 : system traps and exceptions - hardcoded events
- Vectors 32 ... 127 : device interrupts
- Vector 128 : legacy int80 syscall interface
- Vectors 129 ... LOCAL_TIMER_VECTOR-1
- Vectors LOCAL_TIMER_VECTOR ... 255 : special interrupts
The arch-specific interrupts are handled by IDT entries from 0 to 31 and from 129 to 255, with the local timer interrupt the first in the latter range. So when you see 0 in
/proc/interrupts, it’s IDT entry 32; when you see NMI, it’s entry 2; etc. The IDT itself is set up in