console: Skip non-BSP printk() earlier

Fix regression after commit:
  6032018 console: only allow console messages after initialization

Bail out early on AP CPUs, this avoids use of CAR_GLOBAL when
we have SQUELCH_EARLY_SMP=y.

Change-Id: I506c5fbec43a6eb6f6d9362d62a040def9e1e7bb
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/26120
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Kyösti Mälkki 2018-05-06 07:00:40 +03:00
parent f5b7e80c22
commit cebb684417
1 changed files with 3 additions and 4 deletions

View File

@ -44,13 +44,12 @@ int do_printk(int msg_level, const char *fmt, ...)
va_list args; va_list args;
int i; int i;
if (!console_log_level(msg_level)) if (IS_ENABLED(CONFIG_SQUELCH_EARLY_SMP) && ENV_CACHE_AS_RAM &&
!boot_cpu())
return 0; return 0;
#if IS_ENABLED (CONFIG_SQUELCH_EARLY_SMP) && defined(__PRE_RAM__) if (!console_log_level(msg_level))
if (!boot_cpu())
return 0; return 0;
#endif
DISABLE_TRACE; DISABLE_TRACE;
#ifdef __PRE_RAM__ #ifdef __PRE_RAM__