Public Types | Public Member Functions
idt_x64 Class Reference

Public Types

using size_type = uint16_t
 
using integer_pointer = uintptr_t
 
using interrupt_descriptor_type = uint64_t
 

Public Member Functions

 idt_x64 () noexcept
 
 idt_x64 (size_type size) noexcept
 
 ~idt_x64 ()=default
 
auto base () const
 
auto limit () const
 

Detailed Description

Interrupt Descriptor Table

The interrupt descriptor tables is like the GDT. Each descriptor in 64bit mode is 16 bytes with the upper 64bits containing the upper 32bit offset (like like a TSS descriptor). Unlike the GDT, entry 0 is used, and there "should be" 256 entries, which means it consumes 4k. We left the implementation in a way where you can decide how big you want it, but it really should be 256.

For more information on the IDT, please see Volume 3, section 6.10 of the Intel Manual. For 64bit, see section 6.14.

Note
For now, the IDT is global, and blank as we have interrupts disabled. At some point when we decide to add support for interrupts we will need to implement this class completely.

Definition at line 154 of file idt_x64.h.

Member Typedef Documentation

◆ size_type

using idt_x64::size_type = uint16_t

Definition at line 158 of file idt_x64.h.

◆ integer_pointer

using idt_x64::integer_pointer = uintptr_t

Definition at line 159 of file idt_x64.h.

◆ interrupt_descriptor_type

Definition at line 160 of file idt_x64.h.

Constructor & Destructor Documentation

◆ idt_x64() [1/2]

idt_x64::idt_x64 ( )
inlinenoexcept

Constructor

Wraps around the IDT that is currently stored in the hardware.

Precondition
expects: none
Postcondition
ensures: none

Definition at line 169 of file idt_x64.h.

◆ idt_x64() [2/2]

idt_x64::idt_x64 ( size_type  size)
inlinenoexcept

Constructor

Creates a new IDT, with size defining the number of descriptors in the IDT.

Precondition
expects: size != 0
Postcondition
ensures: none
Parameters
sizenumber of entries in the IDT

Definition at line 188 of file idt_x64.h.

◆ ~idt_x64()

idt_x64::~idt_x64 ( )
default

Destructor

Precondition
expects: none
Postcondition
ensures: none

Member Function Documentation

◆ base()

auto idt_x64::base ( ) const
inline

IDT Base Address

Precondition
expects: none
Postcondition
ensures: none
Returns
returns the base address of the IDT itself.

Definition at line 212 of file idt_x64.h.

◆ limit()

auto idt_x64::limit ( ) const
inline

IDT Limit

Precondition
expects: none
Postcondition
ensures: none
Returns
returns the size of the IDT itself in bytes

Definition at line 222 of file idt_x64.h.


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