WKern
|
#include <global.h>
#include <idt/idtirq.h>
#include <io/kio.h>
#include <mem/kmem.h>
#include <types/nums.h>
#include <utils/util.h>
Go to the source code of this file.
Functions | |
struct IdtPtr idt_ptrn | __attribute__ ((aligned(16))) |
void | IdtSetGate (u8 num, u32 base, u16 sel, u8 flags) |
Set an IDT gate (entry) at given index. | |
void | IdtLoad (void) |
void | debug_print_idt_entry (int i) |
Debug function to print an IDT entry's handler address. | |
void | AllIdt () |
Initialize and load the Interrupt Descriptor Table (IDT) |
Variables | |
struct IdtEntry | idt [IDT_ENTRIES] |
void AllIdt | ( | ) |
Initialize and load the Interrupt Descriptor Table (IDT)
< Install the Global Descriptor Table (GDT)
< Remap the PIC (Programmable Interrupt Controller)
< Mask all IRQs for safety
< Unmask IRQ1 (keyboard)
< Unmask IRQ0 (timer)
< Clear the IDT entries
< Set IDT limit
< Set IDT base address
< Set IRQ0 handler
< Set IRQ1 handler
< Disable CPU interrupts during setup
< Reload the GDT
< Load the new IDT
< Re-enable CPU interrupts
< Initialize PIT with base frequency (e.g., 1193182 Hz)
void debug_print_idt_entry | ( | int | i | ) |
|
extern |
External assembly function to load the IDT
struct IdtEntry idt[IDT_ENTRIES] |