syscall doesn't need RPL 3 bits on kernel code
All checks were successful
Build documentation / build-and-deploy (push) Successful in 24s

This commit is contained in:
2026-01-14 21:21:20 +01:00
parent e5cc3a64d3
commit 55166f9d5f
2 changed files with 4 additions and 2 deletions

View File

@@ -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);