[coreboot-gerrit] New patch to review for coreboot: console: Make console_log_level depend on CONFIG_CONSOLE_SERIAL

Hannah Williams (hannah.williams@intel.com) gerrit at coreboot.org
Wed Mar 8 21:10:49 CET 2017


Hannah Williams (hannah.williams at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18689

-gerrit

commit 9ea1bfbd204c2294b1762a84c425e1e42dca3c33
Author: Hannah Williams <hannah.williams at intel.com>
Date:   Wed Nov 30 13:26:49 2016 -0800

    console: Make console_log_level depend on CONFIG_CONSOLE_SERIAL
    
    Functions like do_printk and do_printk_va_list do not have
    checks to see if  CONFIG_CONSOLE_SERIAL is enabled and this can cause
    problems because the underlying uart driver may not be configured when
    CONFIG_CONSOLE_SERIAL=n. Hence ignore console log level check if
    CONFIG_CONSOLE_SERIAL=n
    
    Change-Id: I1a76d363119d0173f52f65eeba1c6d4a0a46412a
    Signed-off-by: Hannah Williams <hannah.williams at intel.com>
---
 src/console/init.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/console/init.c b/src/console/init.c
index 189079b..c59f241 100644
--- a/src/console/init.c
+++ b/src/console/init.c
@@ -27,7 +27,10 @@ static ROMSTAGE_CONST int console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
 
 int console_log_level(int msg_level)
 {
-	return (console_loglevel >= msg_level);
+	if (IS_ENABLED(CONFIG_CONSOLE_SERIAL))
+		return (console_loglevel >= msg_level);
+	else
+		return 0;
 }
 
 asmlinkage void console_init(void)



More information about the coreboot-gerrit mailing list