Skip to main content

Module tss

Module tss 

Source
Expand description

Task State Segment (TSS) for Strat9-OS

The TSS is required for:

  • Interrupt Stack Table (IST) entries for safe exception handling
  • Ring 3 -> Ring 0 stack switching (privilege_stack_table[0] = rsp0)

Constants§

DOUBLE_FAULT_IST_INDEX
IST index used for the double fault handler

Functions§

init
Initialize the TSS with IST entries
init_cpu
Initialize the TSS for a given CPU index.
set_kernel_stack
Update TSS.rsp0 — the kernel stack pointer used when transitioning from Ring 3 to Ring 0 on interrupt/syscall.
set_kernel_stack_for
Update TSS.rsp0 for a specific CPU index.
tss_for
Get a reference to the TSS for a given CPU index (for GDT descriptor creation).