diff options
author | Marvin Borner | 2021-06-03 16:47:46 +0200 |
---|---|---|
committer | Marvin Borner | 2021-06-03 16:47:46 +0200 |
commit | f7890c4b16b5d817db286119ac0a88630c3a1cf9 (patch) | |
tree | c991a512ac36e632b3a69a165ca556174d4063c7 /kernel/drivers | |
parent | 98e15f73f090c32b5197ecec0845c408d4a54608 (diff) |
Smashed some dumb bugs
aargh
Diffstat (limited to 'kernel/drivers')
-rw-r--r-- | kernel/drivers/cpu.c | 13 | ||||
-rw-r--r-- | kernel/drivers/int.c | 3 |
2 files changed, 9 insertions, 7 deletions
diff --git a/kernel/drivers/cpu.c b/kernel/drivers/cpu.c index 44091a3..93c2cf3 100644 --- a/kernel/drivers/cpu.c +++ b/kernel/drivers/cpu.c @@ -156,6 +156,9 @@ CLEAR void cpu_enable_features(void) cpu_extended_information = cpuid(0x80000001); cpu_extended_features = cpuid(0x7); + // Enable NMI + outb(0x70, inb(0x70) & 0x7F); + // Enable SSE if (cpu_features.edx & CPUID_FEAT_EDX_SSE) { __asm__ volatile("clts"); @@ -201,11 +204,11 @@ CLEAR void cpu_enable_features(void) } // Enable UMIP // TODO: QEMU support?! - if (cpu_extended_features.ecx & CPUID_EXT_FEAT_ECX_UMIP) { - cr4_set(cr4_get() | 0x800); - } else { - print("No UMIP support :(\n"); - } + /* if (cpu_extended_features.ecx & CPUID_EXT_FEAT_ECX_UMIP) { */ + /* cr4_set(cr4_get() | 0x800); */ + /* } else { */ + /* print("No UMIP support :(\n"); */ + /* } */ } /** diff --git a/kernel/drivers/int.c b/kernel/drivers/int.c index 47a2699..39462fa 100644 --- a/kernel/drivers/int.c +++ b/kernel/drivers/int.c @@ -109,8 +109,8 @@ static void int_trap_handler(struct int_frame *frame) frame->eip, frame->eip - proc->entry); printf("\t\t-> Process: [entry: %x, kstack: %x, esp %x, ustack: %x]\n", proc->entry, proc->stack.kernel, frame->esp, proc->stack.user); - proc_exit(proc, 1); faulting--; + proc_exit(proc, 1); } else { while (1) __asm__ volatile("cli\nhlt"); @@ -129,7 +129,6 @@ CLEAR void int_event_handler_add(u32 int_no, void (*handler)(void)) int_event_handlers[int_no] = handler; } -#include <mm.h> static u32 int_event_handler(struct int_frame *frame) { u32 int_no = frame->int_no - 32; |