1 /* This file is part of the coreboot project. */
2 /* SPDX-License-Identifier: GPL-2.0-or-later */
10 * \brief Definitions of the log levels to be used in printk calls.
12 * Safe for inclusion in assembly.
17 * \brief BIOS_EMERG - Emergency / Fatal
19 * Log level for when the system is entirely unusable. To be used when execution
20 * is halting as a result of the failure. No further instructions should run.
22 * Example - End of all debug output / death notice.
30 * \brief BIOS_ALERT - Dying / Unrecoverable
32 * Log level for when the system is certainly in the process of dying.
33 * To be used when execution will eventually halt as a result of the
34 * failure, but the system can still output valuable debugging
37 * Example - Ram initialization fails, dumping relevant POST codes and
46 * \brief BIOS_CRIT - Recovery unlikely
48 * Log level for when the system has experienced a dire issue in essential
49 * components. To be used when boot will probably be unsuccessful as a
50 * result of the failure, but recovery/retry can be attempted.
52 * Example - MSR failures, SMM/SMI failures.
61 * \brief BIOS_ERR - System in incomplete state.
63 * Log level for when the system has experienced an issue that may not preclude
64 * a successful boot. To be used when coreboot execution may still succeed,
65 * but the error places some non-essential portion of the machine in a broken
66 * state that will be noticed downstream.
68 * Example - Payload could still load, but will be missing access to integral
69 * components such as drives.
77 * \brief BIOS_WARNING - Bad configuration
79 * Log level for when the system has noticed an issue that most likely will
80 * not preclude a successful boot. To be used when something is wrong, and
81 * would likely be noticed by an end user.
83 * Example - Bad ME firmware, bad microcode, mis-clocked CPU
87 #define BIOS_WARNING 4
91 * \brief BIOS_NOTICE - Unexpected but relatively insignificant
93 * Log level for when the system has noticed an issue that is an edge case,
94 * but is handled and is recoverable. To be used when an end-user would likely
97 * Example - Hardware was misconfigured, but is promptly fixed.
101 #define BIOS_NOTICE 5
105 * \brief BIOS_INFO - Expected events.
107 * Log level for when the system has experienced some typical event.
108 * Messages should be superficial in nature.
110 * Example - Success messages. Status messages.
118 * \brief BIOS_DEBUG - Verbose output
120 * Log level for details of a method. Messages may be dense,
121 * but should not be excessive. Messages should be detailed enough
122 * that this level provides sufficient details to diagnose a problem,
123 * but not necessarily enough to fix it.
125 * Example - Printing of important variables.
133 * \brief BIOS_SPEW - Excessively verbose output
135 * Log level for intricacies of a method. Messages might contain raw
136 * data and will produce large logs. Developers should try to make sure
137 * that this level is not useful to anyone besides developers.
139 * Example - Data dumps.
147 * \brief BIOS_NEVER - Muted log level.
149 * Roughly equal to commenting out a printk statement. Because a user
150 * should not set their log level higher than 8, these statements
153 * Example - A developer might locally define MY_LOGLEVEL to BIOS_SPEW,
154 * and later replace it with BIOS_NEVER as to mute their debug output.
161 #endif /* LOGLEVEL_H */