kernel/arch/x86_64/interrupts/irqs/pic/
irq7_spurious.rs1use crate::arch::x86_64::interrupts::pic;
7use x86_64::instructions::port::Port;
8use x86_64::structures::idt::InterruptStackFrame;
9
10pub extern "x86-interrupt" fn handler(
12 _: InterruptStackFrame
13) {
14 let mut port: Port<u8> = Port::new(pic::PIC_MASTER_CMD_PORT);
15 let isr;
16
17 unsafe {
21 port.write(0x0B);
22 isr = port.read();
23 }
24
25 if isr & (1 << 7) == 0 {
26 return;
27 }
28
29 pic::end_of_interrupt(pic::PIC_MASTER_OFFSET + 7);
30}