// record completion in BIOS task complete flag void VISIBLE16 handle_76() { debug_isr(DEBUG_ISR_76); SET_BDA(disk_interrupt_flag, 0xff); eoi_pic2(); }
// INT74h : PS/2 mouse hardware interrupt void VISIBLE16 handle_74(void) { if (! CONFIG_PS2PORT) return; debug_isr(DEBUG_ISR_74); u8 v = inb(PORT_PS2_STATUS); if ((v & (I8042_STR_OBF|I8042_STR_AUXDATA)) != (I8042_STR_OBF|I8042_STR_AUXDATA)) { dprintf(1, "ps2 mouse irq but no mouse data.\n"); goto done; } v = inb(PORT_PS2_DATA); if (!(GET_EBDA(ps2ctr) & I8042_CTR_AUXINT)) // Interrupts not enabled. goto done; process_mouse(v); done: eoi_pic2(); }
// INT09h : Keyboard Hardware Service Entry Point void VISIBLE16 handle_09(void) { if (! CONFIG_PS2PORT) return; debug_isr(DEBUG_ISR_09); // read key from keyboard controller u8 v = inb(PORT_PS2_STATUS); if (v & I8042_STR_AUXDATA) { dprintf(1, "ps2 keyboard irq but found mouse data?!\n"); goto done; } v = inb(PORT_PS2_DATA); if (!(GET_EBDA(ps2ctr) & I8042_CTR_KBDINT)) // Interrupts not enabled. goto done; process_key(v); done: eoi_pic1(); }
// INT09h : Keyboard Hardware Service Entry Point void VISIBLE16 handle_09() { if (! CONFIG_PS2PORT) return; debug_isr(DEBUG_ISR_09); process_ps2irq(); eoi_pic1(); }