PatchworkOS
Loading...
Searching...
No Matches
panic.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
kernel/cpu/interrupt.h
>
4
#include <
kernel/defs.h
>
5
6
#include <
boot/boot_info.h
>
7
8
#include <
sys/list.h
>
9
21
#define PANIC_NO_CPU_ID UINT32_MAX
22
26
#define PANIC_MAX_STACK_FRAMES 16
27
33
typedef
struct
panic_symbol
34
{
35
list_entry_t
entry
;
36
uintptr_t
start
;
37
uintptr_t
end
;
38
char
name[
MAX_NAME
];
39
}
panic_symbol_t
;
40
48
void
panic_stack_trace
(
const
interrupt_frame_t
* frame);
49
55
void
panic_symbols_init
(
const
boot_kernel_t
* kernel);
56
60
NORETURN
void
panic
(
const
interrupt_frame_t
* frame,
const
char
* format, ...);
61
MAX_NAME
#define MAX_NAME
Maximum length of names.
Definition
MAX_NAME.h:11
boot_info.h
defs.h
NORETURN
#define NORETURN
GCC noreturn function attribute.
Definition
defs.h:39
panic_stack_trace
void panic_stack_trace(const interrupt_frame_t *frame)
Print a stack trace from a interrupt frame.
Definition
panic.c:281
panic_symbols_init
void panic_symbols_init(const boot_kernel_t *kernel)
Initialize panic symbols from the bootloader-provided kernel information.
Definition
panic.c:321
panic
NORETURN void panic(const interrupt_frame_t *frame, const char *format,...)
Panic the kernel, printing a message and halting.
Definition
panic.c:362
interrupt.h
list.h
uintptr_t
__UINTPTR_TYPE__ uintptr_t
Definition
stdint.h:43
boot_kernel_t
Definition
boot_info.h:79
interrupt_frame_t
Trap Frame Structure.
Definition
interrupt.h:42
list_entry_t
A entry in a doubly linked list.
Definition
list.h:38
panic_symbol_t
Panic symbol structure.
Definition
panic.h:34
panic_symbol_t::entry
list_entry_t entry
Definition
panic.h:35
panic_symbol_t::start
uintptr_t start
Definition
panic.h:36
panic_symbol_t::end
uintptr_t end
Definition
panic.h:37
include
kernel
log
panic.h
Generated by
1.9.8