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).