From 1166f9be0dcfd7b191991d9bba8db1028310bcc8 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sun, 20 Apr 2025 18:11:24 -0500 Subject: [PATCH] include/console: Add CFR object for setting the logging level Add a header with a CFR object for setting the coreboot console log level, so that all mainboards can make use of it without duplication. Change-Id: I473421e0e6b2031eb9846f5a798b427104dc3af3 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/87487 Tested-by: build bot (Jenkins) Reviewed-by: Sean Rhodes --- src/include/console/cfr.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/include/console/cfr.h diff --git a/src/include/console/cfr.h b/src/include/console/cfr.h new file mode 100644 index 0000000000..899fb3e464 --- /dev/null +++ b/src/include/console/cfr.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* + * CFR enums and structs for console + */ + +#ifndef _CONSOLE_CFR_H_ +#define _CONSOLE_CFR_H_ + +#include + +const struct sm_object debug_level = SM_DECLARE_ENUM({ + .opt_name = "debug_level", + .ui_name = "Console Log Level", + .ui_helptext = "Set the verbosity of the coreboot console output.", + .default_value = CONFIG_DEFAULT_CONSOLE_LOGLEVEL, + .values = (const struct sm_enum_value[]) { + { "Emergency", 0 }, + { "Alert", 1 }, + { "Critical", 2 }, + { "Error", 3 }, + { "Warning", 4 }, + { "Notice", 5 }, + { "Info", 6 }, + { "Debug", 7 }, + { "Spew", 8 }, + SM_ENUM_VALUE_END }, +}); + +#endif /* _CONSOLE_CFR_H_ */