MOS Source Code
Loading...
Searching...
No Matches
panic.cpp File Reference
Include dependency graph for panic.cpp:

Go to the source code of this file.

Functions

void __stack_chk_fail (void)
void __stack_chk_fail_local (void)
 MOS_EARLY_SETUP ("poweroff_on_panic", setup_poweroff_on_panic)
void kwarn_handler_set (kmsg_handler_t *handler)
void kwarn_handler_remove (void)
static const panic_point_tfind_panic_point (ptr_t ip)
void try_handle_kernel_panics (ptr_t ip)
void handle_kernel_panic (const panic_point_t *point)
void mos_kwarn (const char *func, u32 line, const char *fmt,...)

Variables

u64 __stack_chk_guard = 0
static kmsg_handler_tkwarn_handler = NULL
static bool poweroff_on_panic = false
const panic_point_t __MOS_PANIC_LIST_START []
const panic_point_t __MOS_PANIC_LIST_END []
const panic_hook_t __MOS_PANIC_HOOKS_START []
const panic_hook_t __MOS_PANIC_HOOKS_END []

Function Documentation

◆ __stack_chk_fail()

void __stack_chk_fail ( void )

Definition at line 18 of file panic.cpp.

Referenced by __stack_chk_fail_local().

◆ __stack_chk_fail_local()

void __stack_chk_fail_local ( void )

Definition at line 23 of file panic.cpp.

Here is the call graph for this function:

◆ MOS_EARLY_SETUP()

MOS_EARLY_SETUP ( "poweroff_on_panic" ,
setup_poweroff_on_panic  )

Definition at line 31 of file panic.cpp.

Here is the call graph for this function:

◆ kwarn_handler_set()

void kwarn_handler_set ( kmsg_handler_t * handler)

Definition at line 37 of file panic.cpp.

Referenced by mos_test_engine_run_tests().

◆ kwarn_handler_remove()

void kwarn_handler_remove ( void )

Definition at line 43 of file panic.cpp.

Referenced by mos_test_engine_run_tests().

◆ find_panic_point()

const panic_point_t * find_panic_point ( ptr_t ip)
static

Definition at line 54 of file panic.cpp.

Referenced by try_handle_kernel_panics().

◆ try_handle_kernel_panics()

void try_handle_kernel_panics ( ptr_t ip)

Definition at line 68 of file panic.cpp.

Referenced by riscv64_trap_handler(), and x86_handle_exception().

Here is the call graph for this function:

◆ handle_kernel_panic()

void handle_kernel_panic ( const panic_point_t * point)

Definition at line 79 of file panic.cpp.

Referenced by try_handle_kernel_panics().

Here is the call graph for this function:

◆ mos_kwarn()

void mos_kwarn ( const char * func,
u32 line,
const char * fmt,
... )

Definition at line 164 of file panic.cpp.

Here is the call graph for this function:

Variable Documentation

◆ __stack_chk_guard

u64 __stack_chk_guard = 0

Definition at line 16 of file panic.cpp.

◆ kwarn_handler

kmsg_handler_t* kwarn_handler = NULL
static

Definition at line 28 of file panic.cpp.

Referenced by kwarn_handler_remove(), kwarn_handler_set(), and mos_kwarn().

◆ poweroff_on_panic

bool poweroff_on_panic = false
static

Definition at line 29 of file panic.cpp.

Referenced by handle_kernel_panic(), and MOS_EARLY_SETUP().

◆ __MOS_PANIC_LIST_START

const panic_point_t __MOS_PANIC_LIST_START[]
extern

Referenced by find_panic_point().

◆ __MOS_PANIC_LIST_END

const panic_point_t __MOS_PANIC_LIST_END[]

Definition at line 51 of file panic.cpp.

Referenced by find_panic_point().

◆ __MOS_PANIC_HOOKS_START

const panic_hook_t __MOS_PANIC_HOOKS_START[]
extern

Referenced by handle_kernel_panic().

◆ __MOS_PANIC_HOOKS_END

const panic_hook_t __MOS_PANIC_HOOKS_END[]

Definition at line 52 of file panic.cpp.

Referenced by handle_kernel_panic().