start implementing APIC utils

This commit is contained in:
2025-08-29 18:35:22 +03:00
parent 9e21167bd3
commit fb8dd43dd3
9 changed files with 176 additions and 15 deletions
+17 -3
View File
@@ -5,6 +5,7 @@
#include "../include/pit.h"
#include "../include/keyboard.h"
#include "../include/task.h"
#include "../include/apic.h"
#include <stddef.h>
@@ -103,8 +104,14 @@ void handle_page_fault(uint32_t error_code, uint32_t faulting_address)
__attribute__((interrupt)) void isr_timer(struct interrupt_frame *frame)
{
pit_init(100);
pic_end_int(0x0);
if(lapic_enabled)
{
lapic_eoi();
}
else
{
pic_end_int(0x0);
}
//scheduler_lock();
schedule();
@@ -115,7 +122,14 @@ __attribute__((interrupt)) void isr_custom(struct interrupt_frame *frame)
{
//terminal_writestring("YOOOOO!!!!!! I LOVE KATYA!!!!");
handle_keyboard();
pic_end_int(0x1);
if(lapic_enabled)
{
lapic_eoi();
}
else
{
pic_end_int(0x1);
}
}
void isr0()