This commit is contained in:
nub31
2025-09-02 17:39:25 +02:00
parent 8cd6bd185d
commit a5bd7ad9a6
7 changed files with 169 additions and 35 deletions

View File

@@ -1,5 +1,6 @@
#pragma once
#include "kernel.h"
#include <stdint.h>
typedef struct
@@ -13,16 +14,22 @@ typedef struct
typedef void (*irq_handler_t)(const isr_frame_t*);
void pic_remap();
void remap_pic();
void disable_pic();
bool cpu_has_apic();
void enable_apic();
void register_irq_handler(uint8_t irq, irq_handler_t handler);
static inline void enable_interrupts()
{
__asm__ volatile("sti");
kprintf("Interrupts enabled\n");
}
static inline void disable_interrupts()
{
__asm__ volatile("cli");
kprintf("Interrupts disabled\n");
}