38 pr_warn(
"installing a new warning handler...");
44 pr_warn(
"removing warning handler...");
46 mos_warn(
"no previous warning handler installed");
84 pr_fatal(
"recursive panic detected, aborting...");
100 pr_fatal(
"!!!!!!!!!!!!!!!!!!!!!!!!");
101 pr_fatal(
"!!!!! KERNEL PANIC !!!!!");
102 pr_fatal(
"!!!!!!!!!!!!!!!!!!!!!!!!");
109 pr_emerg(
"instruction: see backtrace");
117 pr_emph(
"Current stack trace:");
124 pr_emph(
"Register states before interrupt:");
127 pr_emph(
"Stack trace before interrupt");
133 pr_emph(
"No interrupt context available");
141 if (hook->enabled && !*hook->enabled)
144 pr_dinfo2(panic,
"invoking panic hook '%s' at %ps", hook->name, (
void *) hook);
void platform_halt_cpu(void)
#define mos_warn(fmt,...)
#define MOS_PRINTK_BUFFER_SIZE
MOSAPI int vsnprintf(char *__restrict buf, size_t size, const char *__restrict format, va_list args)
void ipi_send_all(ipi_type_t type)
bool cmdline_string_truthiness(const char *arg, bool default_value)
#define once()
Returns true for the first call, false for all subsequent calls.
void __stack_chk_fail(void)
const panic_point_t __MOS_PANIC_LIST_START[]
void kwarn_handler_set(kmsg_handler_t *handler)
const panic_hook_t __MOS_PANIC_HOOKS_START[]
const panic_point_t __MOS_PANIC_LIST_END[]
static bool poweroff_on_panic
const panic_hook_t __MOS_PANIC_HOOKS_END[]
void try_handle_kernel_panics(ptr_t ip)
void try_handle_kernel_panics_at(const panic_point_t *point)
static const panic_point_t * find_panic_point(ptr_t ip)
static kmsg_handler_t * kwarn_handler
void __stack_chk_fail_local(void)
void kwarn_handler_remove(void)
void mos_kwarn(const char *func, u32 line, const char *fmt,...)
#define mos_panic(fmt,...)
void kmsg_handler_t(const char *func, u32 line, const char *fmt, va_list args)
void power_shutdown(void)
Shutdown the system.
bool printk_unquiet(void)
#define pr_fatal(fmt,...)
#define pr_emerg(fmt,...)
#define pr_dinfo2(feat, fmt,...)
void lprintk(loglevel_t loglevel, const char *format,...)
#define pr_dwarn(feat, fmt,...)
#define MOS_EARLY_SETUP(_param, _fn)