From 4210c4ae384753825e10c5ea4ad1e99e9bba2c1f Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Sun, 10 Dec 2023 18:07:35 +0100 Subject: handle IRQs --- stage3/interrupts.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'stage3/interrupts.c') diff --git a/stage3/interrupts.c b/stage3/interrupts.c index fa4e59d..e7b819e 100644 --- a/stage3/interrupts.c +++ b/stage3/interrupts.c @@ -2,6 +2,7 @@ #include "halt.h" #include "font.h" #include "heap.h" +#include "pic.h" extern u64 idt_entries[256]; // isr.asm @@ -91,6 +92,10 @@ void interrupt_handler(interrupt_frame *frame) dump_frame(frame); halt(); + } else if (frame->which-32 < 16) { + u64 irq = frame->which-32; + print("IRQ "); print_num(irq, 10, 0); print("\n"); + ack_irq(irq); } else { print("Spurious Interrupt "); print_num(frame->which, 10, 0); print("\n"); dump_frame(frame); -- cgit v1.2.3