MentOS  0.8.0
The Mentoring Operating System
Macros | Functions | Variables
idt.c File Reference

Functions which manage the Interrupt Descriptor Table (IDT). More...

Macros

#define __DEBUG_HEADER__   "[IDT ]"
 Change header.
 
#define __DEBUG_LEVEL__   LOGLEVEL_NOTICE
 Set log level.
 

Functions

void INT_0 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_1 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_2 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_3 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_4 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_5 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_6 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_7 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_8 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_9 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_10 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_11 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_12 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_13 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_14 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_15 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_16 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_17 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_18 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_19 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_20 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_21 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_22 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_23 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_24 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_25 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_26 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_27 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_28 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_29 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_30 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_31 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void INT_80 (pt_regs *)
 Interrupt Service Routine (ISR) for exception handling.
 
void IRQ_0 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_1 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_2 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_3 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_4 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_5 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_6 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_7 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_8 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_9 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_10 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_11 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_12 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_13 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_14 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void IRQ_15 (pt_regs *)
 Interrupt Request (IRQ) coming from the PIC.
 
void idt_flush (uint32_t idt_pointer)
 This function is in idt.asm. More...
 
static void __idt_set_gate (uint8_t index, interrupt_handler_t handler, uint16_t options, uint8_t seg_sel)
 Use this function to set an entry in the IDT. More...
 
void init_idt (void)
 Initialise the interrupt descriptor table.
 

Variables

static idt_descriptor_t idt_table [IDT_SIZE]
 The IDT itself.
 
idt_pointer_t idt_pointer
 Pointer structure to give to the CPU.
 

Detailed Description

Functions which manage the Interrupt Descriptor Table (IDT).

Function Documentation

◆ __idt_set_gate()

static void __idt_set_gate ( uint8_t  index,
interrupt_handler_t  handler,
uint16_t  options,
uint8_t  seg_sel 
)
inlinestatic

Use this function to set an entry in the IDT.

Parameters
indexIndex of the IDT entry.
handlerPointer to the entry handler.
optionsDescriptors options (PRESENT, NOTPRESENT, KERNEL, USER).
seg_selGDT segment selector.

◆ idt_flush()

void idt_flush ( uint32_t  idt_pointer)

This function is in idt.asm.

Parameters
idt_pointerAddress of the idt.