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:
Kyösti Mälkki
2019-02-12 14:16:21 +02:00
committed by Patrick Georgi
parent 7132f259bf
commit e613d704d1
4 changed files with 32 additions and 8 deletions

View File

@ -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)