start implementing APIC utils
This commit is contained in:
+17
-3
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user