summaryrefslogtreecommitdiff
path: root/src/console/init.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-02-28 14:37:27 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2014-04-09 11:38:12 +0200
commit56ae13983bae2ba4214dd635c46afad7e7bc50c1 (patch)
tree99f8aa55ebc7929e9599c033d925a4247e4fe257 /src/console/init.c
parentb2d25967142437a82da150d0134923e3fd783dbf (diff)
downloadcoreboot-56ae13983bae2ba4214dd635c46afad7e7bc50c1.tar.xz
console: Hide global console_loglevel
Change-Id: I7bdc468bc3f74516abb2c583bdb5b6d7555d987c Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5333 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
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)