From 361cd8153d3426f2ba4f65ccb396e8e20e738068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 12 Aug 2013 23:29:57 +0300 Subject: console: Squelch console output from AP CPUs in romstage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: http://review.coreboot.org/3854 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Aaron Durbin --- src/arch/x86/lib/romstage_console.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/arch') diff --git a/src/arch/x86/lib/romstage_console.c b/src/arch/x86/lib/romstage_console.c index 2e743adc17..1c3141ccb8 100644 --- a/src/arch/x86/lib/romstage_console.c +++ b/src/arch/x86/lib/romstage_console.c @@ -31,7 +31,9 @@ #if CONFIG_SPKMODEM #include #endif - +#if CONFIG_SQUELCH_EARLY_SMP +#include +#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); -- cgit v1.2.3