From c8bc983673cb2e700e0e65299c4471721f273818 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Sun, 24 Sep 2017 12:32:24 +0300 Subject: console: Ignore loglevel in nvram until ramstage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Calling get_option() triggers printk's before consoles are ready. Skip the call since console_loglevel is const anyways for __PRE_RAM__. Change-Id: I4d444bee1394449ce096c0aa30dca56365290e31 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/21659 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Nico Huber Reviewed-by: Paul Menzel --- src/console/init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/console') diff --git a/src/console/init.c b/src/console/init.c index c1565a420f..422315ad2a 100644 --- a/src/console/init.c +++ b/src/console/init.c @@ -33,7 +33,7 @@ static int console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL; static inline int get_log_level(void) { - if (IS_ENABLED(CONSOLE_LEVEL_CONST)) + if (CONSOLE_LEVEL_CONST) return CONFIG_DEFAULT_CONSOLE_LOGLEVEL; return console_loglevel; @@ -51,6 +51,9 @@ static void init_log_level(void) { int debug_level = CONFIG_DEFAULT_CONSOLE_LOGLEVEL; + if (CONSOLE_LEVEL_CONST) + return; + get_option(&debug_level, "debug_level"); set_log_level(debug_level); -- cgit v1.2.3