⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

init_syscall

Function init_syscall 

Source
pub fn init_syscall()
Expand description

Initialize SYSCALL/SYSRET support.

Configures the following MSRs:

  • EFER: Enable SYSCALL/SYSRET extensions
  • LSTAR: Set syscall entry point to syscall_entry
  • STAR: Set segment selectors for SYSCALL (kernel) and SYSRET (user)
  • SFMASK: Mask IF flag so syscall entry runs with interrupts disabled
  • KernelGsBase: Point to PerCpuData for swapgs in syscall_entry

Must be called after gdt::init() and before any user-mode transitions.