[coreboot-gerrit] Patch set updated for coreboot: a818b10 console: Squelch console output from AP CPUs in romstage

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Tue Aug 13 15:32:34 CEST 2013

Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3854


commit a818b10616c9a3513afd374008c5b197a2a15b17
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Mon Aug 12 23:29:57 2013 +0300

    console: Squelch console output from AP CPUs in romstage
    Add Kconfig option SQUELCH_EARLY_SMP and have it enabled by
    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 at gmail.com>
 src/arch/x86/lib/romstage_console.c |  9 ++++++++-
 src/console/Kconfig                 | 12 ++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/arch/x86/lib/romstage_console.c b/src/arch/x86/lib/romstage_console.c
index 2e743ad..1c3141c 100644
--- a/src/arch/x86/lib/romstage_console.c
+++ b/src/arch/x86/lib/romstage_console.c
@@ -31,7 +31,9 @@
 #include <console/spkmodem.h>
+#include <cpu/x86/lapic.h>
 void console_tx_byte(unsigned char byte)
@@ -86,6 +88,11 @@ int do_printk(int msg_level, const char *fmt, ...)
 		return 0;
+	if (!boot_cpu())
+		return 0;
 	va_start(args, fmt);
 	i = vtxprintf(console_tx_byte, fmt, args);
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 1d050f7..13d4433 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -14,6 +14,18 @@ config EARLY_CONSOLE
 	  Use console during early (pre-RAM) boot stages
+	bool "Squelch AP CPUs from early console."
+	default y
+	depends on EARLY_CONSOLE
+	help
+	  When selected only the BSP CPU will output to early console.
+	  Console drivers have unpredictable behavious if multiple threads
+	  attempt to share the same resources without a spinlock.
+	  If unsure, say Y.
 	bool "Serial port console output"
 	default y

More information about the coreboot-gerrit mailing list