console: Ignore loglevel in nvram until ramstage
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 <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/21659 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
parent
8b64e7ae21
commit
c8bc983673
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue