32 void gdtLoad(const
igros::i386::gdt::pointer_t* const gdtPtr) noexcept;
82 .pointer = table.data(),
static constexpr auto setEntry(const igros_dword_t base, const igros_dword_t limit, const klib::kFlags< FLAGS > flags) noexcept -> entry_t
Set GDT entry.
static constexpr auto KERNEL_CODE
Kernel code segment.
static constexpr auto tssEntry(const igros_dword_t base, const igros_dword_t limit) noexcept -> entry_t
Available 32-bit TSS descriptor (base is known at run time only).
static constexpr auto TSS_DOUBLE_FAULT
Double fault task.
static constexpr auto GDT_ENTRY_DATA_RING0
Kernel data segment (ring 0, data).
static constexpr auto GDT_ENTRY_CODE_RING0
Kernel code segment (ring 0, code).
static constexpr auto GDT_ENTRY_EMPTY
Empty GDT entry (the first one).
static constexpr auto calcSize(const table_t &table) noexcept -> igros_word_t
Calc GDT size.
static void setPointer(const pointer_t &pointer) noexcept
Set GDT pointer.
static void init() noexcept
Init GDT table.
static constexpr auto TSS
Kernel task.
static constexpr auto GDT_ENTRY_DATA_RING3
User data segment (ring 3, data).
static constexpr auto GDT_ENTRY_CODE_RING3
User code segment (ring 3, code).
std::array< gdt::entry_t, gdt::GDT_SIZE > table_t
GDT table.
static constexpr auto KERNEL_DATA
Kernel data segment.
static void init(const igros_word_t codeSelector, const igros_word_t dataSelector) noexcept
Set up task state segments (double fault task uses current page directory).
static auto doubleFault() noexcept -> segment_t &
Double fault task state segment.
static auto kernel() noexcept -> segment_t &
Kernel task state segment.
std::uint32_t igros_dword_t
32-bit unsigned integer
void gdtLoad(const igros::i386::gdt::pointer_t *const gdtPtr) noexcept
Load GDT.
void gdtStore(igros::i386::gdt::pointer_t *const gdtPtr) noexcept
Store GDT.
void gdtResetSegments() noexcept
Reset segments to apply new GDT.
void tssLoad(const igros::igros_word_t selector) noexcept
Load task register.
Global descriptor table low-level operations.
Task state segment (i386).
i386 (32-bit protected mode): GDT, IDT, TSS, CPU registers
IgrOS kernel: common types and literals.
Task state segment layout (segment registers in low 16 bits).