coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
die.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <console/console.h>
4 #include <halt.h>
5 
6 /*
7  * The method should be overwritten in mainboard directory to signal that a
8  * fatal error had occurred. On boards that do share the same EC and where the
9  * EC is capable of controlling LEDs or a buzzer the method can be overwritten
10  * in EC directory instead.
11  */
12 __weak void die_notify(void)
13 {
14 }
15 
16 /* Report a fatal error */
17 void __noreturn die(const char *fmt, ...)
18 {
19  va_list args;
20 
21  va_start(args, fmt);
22  vprintk(BIOS_EMERG, fmt, args);
23  va_end(args);
24 
25  die_notify();
26  halt();
27 }
struct @413::@414 args
#define __noreturn
Definition: compiler.h:31
__weak void die_notify(void)
Definition: die.c:12
void __noreturn die(const char *fmt,...)
Definition: die.c:17
int vprintk(int msg_level, const char *fmt, va_list args)
Definition: printk.c:128
void __noreturn halt(void)
halt the system reliably
Definition: halt.c:6
#define BIOS_EMERG
BIOS_EMERG - Emergency / Fatal.
Definition: loglevel.h:25
const struct smm_save_state_ops *legacy_ops __weak
Definition: save_state.c:8
#define va_end(v)
Definition: stdarg.h:14
#define va_start(v, l)
Note: This file is only for POSIX compatibility, and is meant to be chain-included via string....
Definition: stdarg.h:13
__builtin_va_list va_list
Definition: stdarg.h:16