The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
Loading...
Searching...
No Matches
exception.h
Go to the documentation of this file.
1
#pragma once
2
#include "
isr.h
"
3
4
/**
5
* initialize the exception handling subsystem.
6
* this function registers a default exception handler for all CPU exceptions.
7
*/
8
void
exception_initialize
(
void
);
9
10
/**
11
* default exception handler.
12
* this function is called when a CPU exception occurs and no specific handler is registered for that exception
13
* @param regs pointer to the registers structure containing the CPU state at the time of the exception.
14
*/
15
void
exception_handler
(
struct
registers
*regs);
16
17
/**
18
* print the general-purpose and segment registers of a trapped context.
19
* @param regs the saved register state.
20
*/
21
void
exception_dump_regs
(
const
struct
registers
*regs);
22
23
/**
24
* panic for a trapped context: prints the faulting pc and, for faults in
25
* kernel mode, a backtrace from the trapped frame.
26
* @param message description of the fault.
27
* @param regs the saved register state.
28
*/
29
void
exception_panic
(
const
char
*message,
const
struct
registers
*regs)
__attribute__
((noreturn));
exception_handler
void exception_handler(struct registers *regs)
default exception handler.
Definition
exception.c:202
exception_initialize
void exception_initialize(void)
initialize the exception handling subsystem.
Definition
exception.c:236
exception_panic
void exception_panic(const char *message, const struct registers *regs)
panic for a trapped context: prints the faulting pc and, for faults in kernel mode,...
Definition
exception.c:157
exception_dump_regs
void exception_dump_regs(const struct registers *regs)
print the general-purpose and segment registers of a trapped context.
Definition
exception.c:49
isr.h
__attribute__
ELF32 file header.
Definition
elf.h:51
registers
saved register state pushed onto the stack by ISR stubs.
Definition
isr.h:41
src
arch
x86
cpu
exception.h
Generated by
1.18.0