diff options
author | Marvin Borner | 2021-07-10 18:36:50 +0200 |
---|---|---|
committer | Marvin Borner | 2021-07-10 18:36:50 +0200 |
commit | 4f1ae4fa4250369919a975f5568425f6791b2489 (patch) | |
tree | aec903e642561edbf6a6cccf513abccff882426f /src/loader/int.c | |
parent | ad56eb28f0614db4b7656ade390f1c79b446cbc9 (diff) |
Fixed interrupts and added keyboard handler
Diffstat (limited to 'src/loader/int.c')
-rw-r--r-- | src/loader/int.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/loader/int.c b/src/loader/int.c index 8fc0ae3..d4e4841 100644 --- a/src/loader/int.c +++ b/src/loader/int.c @@ -11,21 +11,21 @@ extern u32 int_table[]; static struct idt_entry idt_entries[256] = { 0 }; -REAL struct idt_ptr idt = { .size = sizeof(idt_entries) - 1, .base = &idt_entries }; +REAL static struct idt_ptr idt = { .size = sizeof(idt_entries) - 1, .base = idt_entries }; void idt_install(void) { for (u8 i = 0; i < 3; i++) - idt_entries[i] = IDT_ENTRY(int_table[i], 0x08, INT_GATE); + idt_entries[i] = IDT_ENTRY(int_table[i], 0x18, INT_GATE); - idt_entries[3] = IDT_ENTRY(int_table[3], 0x08, INT_TRAP); - idt_entries[4] = IDT_ENTRY(int_table[4], 0x08, INT_TRAP); + idt_entries[3] = IDT_ENTRY(int_table[3], 0x18, INT_TRAP); + idt_entries[4] = IDT_ENTRY(int_table[4], 0x18, INT_TRAP); for (u8 i = 5; i < 48; i++) - idt_entries[i] = IDT_ENTRY(int_table[i], 0x08, INT_GATE); + idt_entries[i] = IDT_ENTRY(int_table[i], 0x18, INT_GATE); // Load table - __asm__ volatile("lidt %0" : : "m"(idt)); + __asm__ volatile("lidt %0" : : "m"(idt) : "memory"); } /** |