console: Split loglevel for fast and slow
For fast CBMEM console use minimum BIOS_DEBUG level. For other consoles, Kconfig and/or nvram settings apply. Change-Id: Iff56a0a3182f258200cac80e013957d598cc2130 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/31370 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
committed by
Patrick Georgi
parent
7132f259bf
commit
e613d704d1
@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include <arch/early_variables.h>
|
||||
#include <commonlib/helpers.h>
|
||||
#include <console/console.h>
|
||||
#include <console/uart.h>
|
||||
#include <console/streams.h>
|
||||
@ -64,7 +65,18 @@ static void init_log_level(void)
|
||||
|
||||
int console_log_level(int msg_level)
|
||||
{
|
||||
return (get_log_level() >= msg_level);
|
||||
int log_level = get_log_level();
|
||||
|
||||
if (log_level < 0)
|
||||
return CONSOLE_LOG_NONE;
|
||||
|
||||
if (msg_level <= log_level)
|
||||
return CONSOLE_LOG_ALL;
|
||||
|
||||
if (IS_ENABLED(CONFIG_CONSOLE_CBMEM) && (msg_level <= BIOS_DEBUG))
|
||||
return CONSOLE_LOG_FAST;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
asmlinkage void console_init(void)
|
||||
|
Reference in New Issue
Block a user