wilkie 1842896ee9 Replace INT 0x80 with native SYSCALL/SYSRET
Implement fast system calls using the x86-64 SYSCALL/SYSRET instructions:

- Configure MSRs: EFER (enable SCE), STAR (segment selectors),
  LSTAR (entry point), SFMASK (disable interrupts on entry)
- Add per-CPU data structure accessed via GS segment for kernel
  stack pointer storage during privilege transitions
- Use SWAPGS in syscall entry to access per-CPU data and switch
  from user to kernel stack
- Add SWAPGS before IRETQ to user mode to set up correct GS state
  for subsequent syscalls

SYSCALL/SYSRET is significantly faster than INT 0x80 as it avoids
IDT lookup and uses direct MSR-configured entry.
2025-12-28 02:18:33 -05:00
Description
An exokernel operating system written in D
9.6 MiB
Languages
D 93.7%
C 3.5%
Makefile 1%
Assembly 0.9%
Shell 0.8%
Other 0.1%