StuBS
idt.h File Reference

Interrupt Descriptor Table (IDT) containing the entry points for interrupt handling. More...

#include "types.h"
Include dependency graph for idt.h:

Namespaces

namespace  IDT
 "Interrupt Descriptor Table (IDT)
 

Enumerations

enum  IDT::Gate {
  IDT::GATE_TASK = 0x5 ,
  IDT::GATE_INT = 0x6 ,
  IDT::GATE_TRAP = 0x7
}
 Gate types. More...
 
enum  IDT::GateSize {
  IDT::GATE_SIZE_16 = 0 ,
  IDT::GATE_SIZE_32 = 1
}
 Segment type. More...
 
enum  IDT::DPL {
  IDT::DPL_KERNEL = 0 ,
  IDT::DPL_USER = 3
}
 Descriptor Privilege Level. More...
 

Functions

void IDT::load ()
 Load the IDT's address and size into the IDT-Register via idtr.
 
void IDT::handle (uint8_t vector, void *handler, enum Gate type=Gate::GATE_INT, enum GateSize size=GateSize::GATE_SIZE_32, enum DPL dpl=DPL::DPL_KERNEL, bool present=true)
 Configure entry point for interrupt handling. More...
 

Detailed Description

Interrupt Descriptor Table (IDT) containing the entry points for interrupt handling.