summaryrefslogtreecommitdiff
path: root/src/console/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/console/init.c')
-rw-r--r--src/console/init.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/console/init.c b/src/console/init.c
index c6ceab54c2..d7c8cc36b0 100644
--- a/src/console/init.c
+++ b/src/console/init.c
@@ -29,8 +29,14 @@
#include <device/pci.h>
#endif
-#if !defined(__PRE_RAM__)
-int console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
+#if !defined(__ROMCC__)
+/* While in romstage, console loglevel is built-time constant. */
+static ROMSTAGE_CONST int console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
+
+int console_log_level(int msg_level)
+{
+ return (console_loglevel >= msg_level);
+}
#endif
void console_init(void)