PatchworkOS
Loading...
Searching...
No Matches
panic.h
Go to the documentation of this file.
1#pragma once
2
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
33typedef struct panic_symbol
34{
38 char name[MAX_NAME];
40
48void panic_stack_trace(const interrupt_frame_t* frame);
49
55void panic_symbols_init(const boot_kernel_t* kernel);
56
60NORETURN void panic(const interrupt_frame_t* frame, const char* format, ...);
61
#define MAX_NAME
Maximum length of names.
Definition MAX_NAME.h:11
#define NORETURN
GCC noreturn function attribute.
Definition defs.h:39
void panic_stack_trace(const interrupt_frame_t *frame)
Print a stack trace from a interrupt frame.
Definition panic.c:281
void panic_symbols_init(const boot_kernel_t *kernel)
Initialize panic symbols from the bootloader-provided kernel information.
Definition panic.c:321
NORETURN void panic(const interrupt_frame_t *frame, const char *format,...)
Panic the kernel, printing a message and halting.
Definition panic.c:362
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:43
Trap Frame Structure.
Definition interrupt.h:42
A entry in a doubly linked list.
Definition list.h:38
Panic symbol structure.
Definition panic.h:34
list_entry_t entry
Definition panic.h:35
uintptr_t start
Definition panic.h:36
uintptr_t end
Definition panic.h:37