console: Squelch console output from AP CPUs in romstage
Add Kconfig option SQUELCH_EARLY_SMP and have it enabled by default. Console drivers have unpredictable results if multiple threads attempt to share same resources without spinlock. Serial UARTs have not had huge problems, only distorted output, but those relying on cache-as-ram (CBMEM and usbdebug) may require this. Change-Id: I7f406fdea7b6dc6a341c4da2fab56f7b7ff568b4 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/3854 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
@@ -31,7 +31,9 @@
|
||||
#if CONFIG_SPKMODEM
|
||||
#include <console/spkmodem.h>
|
||||
#endif
|
||||
|
||||
#if CONFIG_SQUELCH_EARLY_SMP
|
||||
#include <cpu/x86/lapic.h>
|
||||
#endif
|
||||
|
||||
void console_tx_byte(unsigned char byte)
|
||||
{
|
||||
@@ -86,6 +88,11 @@ int do_printk(int msg_level, const char *fmt, ...)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if CONFIG_SQUELCH_EARLY_SMP
|
||||
if (!boot_cpu())
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
va_start(args, fmt);
|
||||
i = vtxprintf(console_tx_byte, fmt, args);
|
||||
va_end(args);
|
||||
|
Reference in New Issue
Block a user