MonkOS  v0.1
A simple 64-bit operating system (x86_64)
exception.c File Reference

CPU exceptions. More...

Go to the source code of this file.

Functions

static void dump_context (int id, const interrupt_context_t *context)
 
static void hang ()
 
static void isr_fatal (const interrupt_context_t *context)
 
static void isr_breakpoint (const interrupt_context_t *context)
 
void exceptions_init ()
 Initialize all exception handling routines. More...
 

Variables

static const char * exceptionstr []
 

Detailed Description

CPU exceptions.

Definition in file exception.c.

Function Documentation

static void dump_context ( int  id,
const interrupt_context_t *  context 
)
static

Definition at line 44 of file exception.c.

Referenced by isr_fatal().

static void hang ( )
static

Definition at line 72 of file exception.c.

Referenced by isr_fatal().

static void isr_fatal ( const interrupt_context_t *  context)
static

Definition at line 81 of file exception.c.

Referenced by exceptions_init().

static void isr_breakpoint ( const interrupt_context_t *  context)
static

Definition at line 99 of file exception.c.

Referenced by exceptions_init().

void exceptions_init ( )

Initialize all exception handling routines.

Definition at line 107 of file exception.c.

Referenced by kmain().

Variable Documentation

const char* exceptionstr[]
static
Initial value:
=
{
"#DE: Divide by zero exception",
"#DB: Debug exception",
"Non-maskable interrupt",
"#BP: Breakpoint exception",
"#OF: Overflow exception",
"#BR: BOUND Range exceeded exception",
"#UD: Invalid opcode exception",
"#NM: Device not available exception",
"#DF: Double fault exception",
"Coprocessor segment overrun",
"#TS: Invalid TSS exception",
"#NP: Segment not present exception",
"#SS: Stack fault exception",
"#GP: General protection exception",
"#PF: Page fault exception",
"Unknown exception",
"#MF: x87 FPU floating-point error",
"#AC: Alignment check exception",
"#MC: Machine-check exception",
"#XM: SIMD floating-point exception",
"#VE: Virtualization exception",
}

Definition at line 18 of file exception.c.

Referenced by isr_fatal().