[coreboot-gerrit] New patch to review for coreboot: a8bba25 usbdebug: Add option to disable console for romstage

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Fri Dec 6 21:50:57 CET 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/4488

-gerrit

commit a8bba2597c208c013e59eaa0b4d502d19c1dc72b
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Fri Dec 6 21:50:55 2013 +0200

    usbdebug: Add option to disable console for romstage
    
    If there is trouble setting up usbdebug, it may be useful to delay
    usbdebug init to run in ramstage.
    
    Change-Id: I31de5a06d3f9ce19f71c422cce0c8cb0fd50f396
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/arch/x86/lib/romstage_console.c         |  4 ++--
 src/console/Kconfig                         | 14 ++++++++++----
 src/northbridge/intel/sandybridge/raminit.c |  2 +-
 3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/arch/x86/lib/romstage_console.c b/src/arch/x86/lib/romstage_console.c
index fc90085..278ef1a 100644
--- a/src/arch/x86/lib/romstage_console.c
+++ b/src/arch/x86/lib/romstage_console.c
@@ -49,7 +49,7 @@ void console_tx_byte(unsigned char byte)
 #if CONFIG_CONSOLE_SERIAL8250
 	uart8250_tx_byte(CONFIG_TTYS0_BASE, byte);
 #endif
-#if CONFIG_USBDEBUG && (CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__))
+#if CONFIG_USBDEBUG && (CONFIG_USBDEBUG_IN_ROMSTAGE || !defined(__PRE_RAM__))
 	usbdebug_tx_byte(dbgp_console_output(), byte);
 #endif
 #if CONFIG_CONSOLE_NE2K
@@ -74,7 +74,7 @@ void console_tx_flush(void)
 #if CONFIG_CONSOLE_NE2K
 	ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT);
 #endif
-#if CONFIG_USBDEBUG && (CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__))
+#if CONFIG_USBDEBUG && (CONFIG_USBDEBUG_IN_ROMSTAGE || !defined(__PRE_RAM__))
 	usbdebug_tx_flush(dbgp_console_output());
 #endif
 }
diff --git a/src/console/Kconfig b/src/console/Kconfig
index cd923ae..40903c1 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -173,12 +173,18 @@ config USBDEBUG
 
 	  If unsure, say N.
 
+if USBDEBUG
+
 config USBDEBUG_IN_ROMSTAGE
-	bool
-	default y if USBDEBUG && EARLY_CBMEM_INIT && EARLY_CONSOLE
-	default n
+	bool "Enable early (pre-RAM) usbdebug console output."
+	default y
+	depends on EARLY_CBMEM_INIT && EARLY_CONSOLE
+	help
+	   Configuring USB controllers in system-agent binary may cause
+	   problems to usbdebug. Disabling this option delays usbdebug to
+	   be setup on entry to ramstage.
 
-if USBDEBUG
+	   If unsure, say Y.
 
 config USBDEBUG_HCD_INDEX
 	int
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index 3b321d7..333a6b5 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -276,7 +276,7 @@ void sdram_initialize(struct pei_data *pei_data)
 		die("UEFI PEI System Agent not found.\n");
 	}
 
-#if CONFIG_USBDEBUG
+#if CONFIG_USBDEBUG_IN_ROMSTAGE
 	/* mrc.bin reconfigures USB, so reinit it to have debug */
 	usbdebug_init();
 #endif



More information about the coreboot-gerrit mailing list