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

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 try_handle_kernel_panics_at (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 17 of file panic.c.

Referenced by __stack_chk_fail_local().

◆ __stack_chk_fail_local()

void __stack_chk_fail_local ( void )

Definition at line 22 of file panic.c.

+ Here is the call graph for this function:

◆ MOS_EARLY_SETUP()

MOS_EARLY_SETUP ( "poweroff_on_panic" ,
setup_poweroff_on_panic  )

Definition at line 30 of file panic.c.

+ Here is the call graph for this function:

◆ kwarn_handler_set()

void kwarn_handler_set ( kmsg_handler_t * handler)

Definition at line 36 of file panic.c.

Referenced by mos_test_engine_run_tests().

◆ kwarn_handler_remove()

void kwarn_handler_remove ( void )

Definition at line 42 of file panic.c.

Referenced by mos_test_engine_run_tests().

◆ find_panic_point()

static const panic_point_t * find_panic_point ( ptr_t ip)
static

Definition at line 53 of file panic.c.

Referenced by try_handle_kernel_panics().

◆ try_handle_kernel_panics()

void try_handle_kernel_panics ( ptr_t ip)

Definition at line 67 of file panic.c.

Referenced by riscv64_trap_handler(), and x86_handle_exception().

+ Here is the call graph for this function:

◆ try_handle_kernel_panics_at()

void try_handle_kernel_panics_at ( const panic_point_t * point)

Definition at line 78 of file panic.c.

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 163 of file panic.c.

+ Here is the call graph for this function:

Variable Documentation

◆ __stack_chk_guard

u64 __stack_chk_guard = 0

Definition at line 15 of file panic.c.

◆ kwarn_handler

kmsg_handler_t* kwarn_handler = NULL
static

Definition at line 27 of file panic.c.

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

◆ poweroff_on_panic

bool poweroff_on_panic = false
static

Definition at line 28 of file panic.c.

Referenced by MOS_EARLY_SETUP(), and try_handle_kernel_panics_at().

◆ __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 50 of file panic.c.

Referenced by find_panic_point().

◆ __MOS_PANIC_HOOKS_START

const panic_hook_t __MOS_PANIC_HOOKS_START[]
extern

◆ __MOS_PANIC_HOOKS_END

const panic_hook_t __MOS_PANIC_HOOKS_END[]

Definition at line 51 of file panic.c.

Referenced by try_handle_kernel_panics_at().