syscall doesn't need RPL 3 bits on kernel code
All checks were successful
Build documentation / build-and-deploy (push) Successful in 24s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 24s
This commit is contained in:
@@ -34,8 +34,7 @@ int amd64_syscall_dispatch (void* stack_ptr) {
|
||||
}
|
||||
|
||||
void syscall_init (void) {
|
||||
amd64_wrmsr (MSR_STAR,
|
||||
((uint64_t)(GDT_KCODE | 0x03) << 32) | ((uint64_t)(GDT_KDATA | 0x03) << 48));
|
||||
amd64_wrmsr (MSR_STAR, ((uint64_t)GDT_KCODE << 32) | ((uint64_t)(GDT_KDATA | 0x03) << 48));
|
||||
amd64_wrmsr (MSR_LSTAR, (uint64_t)&amd64_syscall_entry);
|
||||
amd64_wrmsr (MSR_SYSCALL_MASK, (1ULL << 9));
|
||||
amd64_wrmsr (MSR_EFER, amd64_rdmsr (MSR_EFER) | EFER_SCE);
|
||||
|
||||
Reference in New Issue
Block a user