term: depreciate rt, and switch to flanterm
This commit is contained in:
parent
020d4f092f
commit
621f268f5b
23 changed files with 3201 additions and 9941 deletions
14
kernel/src/sys/arch/x86_64/fpu.c
Normal file
14
kernel/src/sys/arch/x86_64/fpu.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
void fpu_set_cw(const uint16_t cw) {
|
||||
asm volatile("fldcw %0" :: "m"(cw));
|
||||
}
|
||||
|
||||
void fpu_activate() {
|
||||
size_t cr4;
|
||||
asm volatile ("mov %%cr4, %0" : "=r"(cr4));
|
||||
cr4 |= 0x200;
|
||||
asm volatile ("mov %0, %%cr4" :: "r"(cr4));
|
||||
fpu_set_cw(0x37F);
|
||||
}
|
6
kernel/src/sys/arch/x86_64/fpu.h
Normal file
6
kernel/src/sys/arch/x86_64/fpu.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void fpu_set_cw(const uint16_t cw);
|
||||
void fpu_activate();
|
Loading…
Add table
Add a link
Reference in a new issue