Skip to content

Commit

Permalink
enable interrupts on IDT loading
Browse files Browse the repository at this point in the history
  • Loading branch information
jwt2706 committed Aug 27, 2024
1 parent 0c8ef0c commit 3b0ca2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/src/drivers/idt.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ void idt_set_gate(int n, uint64_t handler) {
}

void load_idt(struct idt_ptr* idt_ptr) {
asm volatile ("lidt (%0)" : : "r"(idt_ptr));
asm volatile ("lidt (%0)" : : "r"(idt_ptr)); // load idt
asm volatile ("sti"); // enable interrupts
}

void idt_install(struct terminal* term) {
Expand Down

0 comments on commit 3b0ca2b

Please sign in to comment.