mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
Initial commit
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user