mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
system calls
This commit is contained in:
@@ -34,8 +34,10 @@ static void reloadgdtr(){
|
||||
|
||||
gdtr.offset = &arch_getcls()->gdt;
|
||||
gdtr.size = sizeof(gdt_t) - 1;
|
||||
asm("lgdt (%%rax)" : : "a"(&gdtr) : "memory");
|
||||
asm("ltr %%ax" : : "a"(0x48));
|
||||
asm volatile("lgdt (%%rax)" : : "a"(&gdtr) : "memory");
|
||||
asm volatile("ltr %%ax" : : "a"(0x48));
|
||||
asm volatile("swapgs;mov $0, %%ax;mov %%ax, %%gs;mov %%ax, %%fs;swapgs;" : : : "ax");
|
||||
|
||||
}
|
||||
|
||||
void gdt_init(){
|
||||
|
||||
Reference in New Issue
Block a user