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

Module syscall

Module syscall 

Source
Expand description

x86_64 system call entry point and SYSCALL/SYSRET MSR configuration.

This module configures the CPU’s SYSCALL/SYSRET mechanism for user-kernel transitions. The key components are:

  • syscall_entry: naked assembly handler invoked by the SYSCALL instruction
  • PerCpuData: per-CPU storage for kernel/user RSP, accessed via GS segment
  • init_syscall: MSR configuration (EFER, STAR, LSTAR, SFMASK, KernelGsBase)

Structs§

PerCpuData
Per-CPU data accessed via GS segment register during syscall entry/exit.
SyscallFrame
Saved user register frame from SYSCALL entry.

Functions§

get_saved_user_rsp
Get the user RSP saved by syscall_entry into per-CPU data.
get_syscall_frame
Get a reference to the saved syscall register frame.
init_syscall
Initialize SYSCALL/SYSRET support.
per_cpu_data_ptr
Get a mutable pointer to the per-CPU data.
syscall_entry
x86_64 SYSCALL instruction entry point