aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers
diff options
context:
space:
mode:
authorMarvin Borner2021-02-21 15:45:41 +0100
committerMarvin Borner2021-02-21 15:45:41 +0100
commitafeb7e4f00eff33e9e1cfcb766825e7c87f5f1d1 (patch)
tree87572c38c6cfd3bf49119ecb63de2e8c3ad4fb02 /kernel/drivers
parent17b83714ecc713f3faebf668a3d286e531f41859 (diff)
Activated SSE/FPU features for better performance
Diffstat (limited to 'kernel/drivers')
-rw-r--r--kernel/drivers/fpu.c24
-rw-r--r--kernel/drivers/mouse.c4
2 files changed, 4 insertions, 24 deletions
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 <def.h>
-
-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();