IgrOS-Kernel 0.1.34.545
Simple C++20 Kernel for i386/x86_64
Loading...
Searching...
No Matches
igros::x86_64::tss Class Referencefinal

Task state segment: in long mode only stack pointers for privilege. More...

#include <arch/x86_64/tss.hpp>

Classes

struct  segment_t
 Task state segment layout. More...

Public Types

enum class  IST : igros_byte_t { NONE = 0_u8 , DOUBLE_FAULT = 1_u8 , NMI = 2_u8 , MACHINE_CHECK = 3_u8 }
 Interrupt stack table index (0 - no stack switch). More...

Public Member Functions

 ~tss () noexcept=default
 D-tor.
 tss (const tss &other)=delete
 Copy c-tor.
auto operator= (const tss &other) -> tss &=delete
 Copy assignment.
 tss () noexcept=delete
 Default c-tor.

Static Public Member Functions

static auto init () noexcept -> const segment_t &
 Set up task state segment interrupt stacks (returns static segment for GDT).

Static Public Attributes

static constexpr auto STACK_SIZE {0x4000_usize}
 Interrupt stack size.

Detailed Description

Task state segment: in long mode only stack pointers for privilege.

changes (RSP0..2) and interrupt stack table (IST1..7)

Definition at line 29 of file tss.hpp.

Member Enumeration Documentation

◆ IST

Interrupt stack table index (0 - no stack switch).

Enumerator
DOUBLE_FAULT 

#DF: kernel stack may be broken (overflow)

NMI 

NMI: may arrive at any instruction.

MACHINE_CHECK 

#MC: may arrive at any instruction

Definition at line 42 of file tss.hpp.

Member Function Documentation

◆ init()

auto igros::x86_64::tss::init ( ) ->constsegment_t &
staticnodiscardnoexcept

Set up task state segment interrupt stacks (returns static segment for GDT).

Returns
Task state segment (static, for GDT descriptor)

Definition at line 26 of file tss.cpp.

Member Data Documentation

◆ STACK_SIZE

auto igros::x86_64::tss::STACK_SIZE {0x4000_usize}
staticconstexpr

Interrupt stack size.

Definition at line 50 of file tss.hpp.


The documentation for this class was generated from the following files: