Initial commit

This commit is contained in:
Matheus
2022-07-21 22:50:12 -03:00
commit b44469a3e1
55 changed files with 4661 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#include <arch/cls.h>
#include <arch/msr.h>
#include <stdint.h>
cls_t bspcls;
void arch_setcls(void* addr){
wrmsr(MSR_GSBASE, (uint64_t)addr);
}
void* arch_getcls(){
return (void*)rdmsr(MSR_GSBASE);
}
void bsp_setcls(){
arch_setcls(&bspcls);
}