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

IDT structure. More...

#include <arch/i386/idt.hpp>

Classes

struct  entry_t
 IDT table entry. More...
struct  pointer_t
 IDT table pointer. More...

Public Types

using table_t = std::array<entry_t, IDT_SIZE>
 IDT table type.
using offset_t = std::add_pointer_t<void()>
 IDT offset type.

Public Member Functions

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

Static Public Member Functions

static auto setEntry (const offset_t handle, const igros_word_t selector, const igros_byte_t type) noexcept -> entry_t
 Make IDT entry.
static constexpr auto calcSize (const table_t &table) noexcept -> igros_word_t
 Calc IDT size.
static void setPointer (const pointer_t &pointer) noexcept
 Set IDT pointer.
static void init () noexcept
 Init IDT table.

Static Private Attributes

static constexpr auto IDT_SIZE {256_usize}
 Number of IDT entries.

Detailed Description

IDT structure.

Definition at line 33 of file idt.hpp.

Member Typedef Documentation

◆ offset_t

using igros::i386::idt::offset_t = std::add_pointer_t<void()>

IDT offset type.

Definition at line 76 of file idt.hpp.

◆ table_t

IDT table type.

Definition at line 73 of file idt.hpp.

Member Function Documentation

◆ calcSize()

auto igros::i386::idt::calcSize ( const table_t & table) ->igros_word_t
staticnodiscardconstexprnoexcept

Calc IDT size.

Calculate IDT size.

Parameters
tableIDT
Returns
IDT size in bytes - 1 (IDT pointer limit)

Definition at line 121 of file idt.hpp.

◆ setEntry()

auto igros::i386::idt::setEntry ( const offset_t handle,
const igros_word_t selector,
const igros_byte_t type )->entry_t
inlinestaticnodiscardnoexcept

Make IDT entry.

Parameters
handleHandler address
selectorCode segment selector
typeGate type and attributes
Returns
IDT entry

Definition at line 107 of file idt.hpp.

◆ setPointer()

void igros::i386::idt::setPointer ( const pointer_t & pointer)
staticnoexcept

Set IDT pointer.

Parameters
pointerIDT pointer to load

Member Data Documentation

◆ IDT_SIZE

auto igros::i386::idt::IDT_SIZE {256_usize}
staticconstexprprivate

Number of IDT entries.

Definition at line 36 of file idt.hpp.


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