From 2a0f0573db14ab3fed3d888c349a1057fdbb2ce2 Mon Sep 17 00:00:00 2001 From: Eggert Jung Date: Sat, 10 May 2025 21:17:52 +0200 Subject: [PATCH] set IDT --- interrupt/handlers.asm | 2 +- interrupt/handlers.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/interrupt/handlers.asm b/interrupt/handlers.asm index 3207c0c..40b5a7f 100644 --- a/interrupt/handlers.asm +++ b/interrupt/handlers.asm @@ -33,5 +33,5 @@ handle_keyboard_asm: pop rsi; pop rdi; pop rax; - + add rsp, 4; iret ; diff --git a/interrupt/handlers.cc b/interrupt/handlers.cc index 42b7779..71b0b2a 100644 --- a/interrupt/handlers.cc +++ b/interrupt/handlers.cc @@ -101,6 +101,9 @@ void initInterruptHandlers() { IDT::InterruptDescriptor::ReturningWithError(handle_page_fault)); // TODO: Add more handlers here + IDT::set(Core::Interrupt::Vector::KEYBOARD, + IDT::InterruptDescriptor::Returning(handle_keyboard_asm)); + // Load the idt pointer IDT::load(); }