KernOS
interrupt.h File Reference
#include <common.h>
#include <utilities.h>
#include <registers.h>
#include <ports.h>
#include <pic.h>
Include dependency graph for interrupt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  INTRP::DescriptorEntry
 Exception and interrupt gate descriptor entry. More...
 
class  INTRP::Mask
 Disables interrupt on construction, restores previous interrupt mask on scope exit. More...
 
struct  IrqPort
 
class  IRQScope
 

Namespaces

 INTRP
 interrupt namespace
 
 INIT
 contains all kernel initialization routines
 

Enumerations

enum  INTRP::IVT : uint8_t {
  INTRP::RESERVED_START = 0x0, INTRP::DIV_0_FAULT = RESERVED_START, INTRP::DEBUG_TRAP = 0x1, INTRP::NMI_INTERRUPT = 0x2,
  INTRP::BREAKPOINT_TRAP = 0x3, INTRP::OVERFLOW_TRAP = 0x4, INTRP::OUT_OF_BOUNDS_FAULT = 0x5, INTRP::INVALID_OPCODE_FAULT = 0x6,
  INTRP::NO_MATH_COP_FAULT = 0x7, INTRP::DOUBLE_FAULT = 0x8, INTRP::COP_SEG_OVERRUN_FAULT = 0x9, INTRP::INVALID_TSS_FAULT = 0x0A,
  INTRP::SEG_NOT_PRESENT_FAULT = 0x0B, INTRP::STACK_SEG_FAULT = 0x0C, INTRP::GEN_PROTECTION_FAULT = 0x0D, INTRP::PAGE_FAULT = 0x0E,
  INTRP::RESERVED = 0x0F, INTRP::MATH_FAULT = 0x10, INTRP::ALIGNMENT_CHECK_FAULT = 0x11, INTRP::MACHINE_CHECK_ABORT = 0x12,
  INTRP::SIMD_FP_XF_FAULT = 0x13, INTRP::RESERVED_END = 0x1F, INTRP::PIC1_OFFSET = 0x20, INTRP::USER_DEFINED_START = PIC1_OFFSET,
  INTRP::TIMER = 0x20, INTRP::KEYBOARD = 0x21, INTRP::PIC2_CASCADE = 0x22, INTRP::SERIAL2 = 0x23,
  INTRP::SERIAL1 = 0x24, INTRP::PARALLEL2 = 0x25, INTRP::DISKETTE = 0x26, INTRP::PARALLEL1 = 0x27,
  INTRP::PIC2_OFFSET = 0x28, INTRP::CMOS = 0x28, INTRP::CGA = 0x29, INTRP::RESERVED1 = 0x2A,
  INTRP::RESERVED2 = 0x2B, INTRP::PS2 = 0x2C, INTRP::FPU = 0x2D, INTRP::HARDDISK = 0x2E,
  INTRP::RESERVED3 = 0x2F, INTRP::USER_DEFINED_END = 0xFF
}
 

Functions

void INTRP::RegisterHandler (DescriptorEntry IdtTable[], size_t Idx, func_ptr Handler)
 Creates interrupt descriptor entries in idt_table, and loads into CPU. More...
 
void UnmaskInterrupt (const IrqPort Irq)
 
void INIT::idt ()
 Creates interrupt descriptor table and loads to CPU. More...
 

Variables

const uint16_t INTRP::IDT_ENTRIES = 256
 

Function Documentation

◆ UnmaskInterrupt()

void UnmaskInterrupt ( const IrqPort  Irq)
inline

Definition at line 156 of file interrupt.h.