When the PC boots up, the PIC IRQ's are mapped to interrupts 8 to 15 and 70 to 77.

So when your kernel boots up and you switch into protected mode, the PIC's remain unchanged, and the low 8 IRQ's end up corresponding to the same interrupt as CPU exceptions 8 to 15.

If one of these fire off, you can test if its an CPU exception or IRQ by testing some bits in the PIC status register but there is a much easier way, remap the PIC to use different interrupts than the CPU exceptions! See Can I remap the PIC? for more information on how this is done.


Categories: HardWareIrq