From afeb7e4f00eff33e9e1cfcb766825e7c87f5f1d1 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 21 Feb 2021 15:45:41 +0100 Subject: Activated SSE/FPU features for better performance --- kernel/drivers/fpu.c | 24 ------------------------ kernel/drivers/mouse.c | 4 ++++ 2 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 kernel/drivers/fpu.c (limited to 'kernel/drivers') diff --git a/kernel/drivers/fpu.c b/kernel/drivers/fpu.c deleted file mode 100644 index e61e267..0000000 --- a/kernel/drivers/fpu.c +++ /dev/null @@ -1,24 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#include - -void set_fpu_cw(const u16 cw) -{ - __asm__ volatile("fldcw %0" ::"m"(cw)); -} - -void fpu_install(void) -{ - __asm__ volatile("clts"); - u32 t = 0; - __asm__ volatile("mov %%cr0, %0" : "=r"(t)); - t &= (u32) ~(1 << 2); - t |= (1 << 1); - __asm__ volatile("mov %0, %%cr0" ::"r"(t)); - - __asm__ volatile("mov %%cr4, %0" : "=r"(t)); - t |= 3 << 9; - __asm__ volatile("mov %0, %%cr4" ::"r"(t)); - - __asm__ volatile("fninit"); -} diff --git a/kernel/drivers/mouse.c b/kernel/drivers/mouse.c index 6f329aa..e2f7311 100644 --- a/kernel/drivers/mouse.c +++ b/kernel/drivers/mouse.c @@ -116,6 +116,10 @@ void mouse_install(void) mouse_serial_wait(1); outb(0x60, status); + // Use default settings + mouse_serial_write(0xF6); + mouse_serial_read(); + // Enable mousewheel mouse_serial_write(0xF2); mouse_serial_read(); -- cgit v1.2.3