Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3970
-gerrit
commit 174f32edf8b6f036ab9eaa0aa42802f98f758264 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Fri Oct 11 21:14:59 2013 +0300
Have option of timestamps, CBMEM console and usbdebug for most boards
As boards without EARLY_CBMEM_INIT do not initialize CBMEM in romstage, and have no CAR migration, these features are available for ramstage only.
Change-Id: Ic3f77ccdedd4e71ba693619c02c9b98b328a0882 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/Kconfig | 2 +- src/arch/x86/lib/romstage_console.c | 6 +++--- src/console/Kconfig | 1 - src/console/console.c | 4 ++-- src/include/timestamp.h | 2 +- src/lib/usbdebug.c | 6 ++---- 6 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/src/Kconfig b/src/Kconfig index 4af8002..10f8c18 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -190,7 +190,7 @@ config DYNAMIC_CBMEM
config COLLECT_TIMESTAMPS bool "Create a table of timestamps collected during boot" - depends on (EARLY_CBMEM_INIT || DYNAMIC_CBMEM) + default n help Make coreboot create a table of timer-ID/timer-value pairs to allow measuring time spent at different phases of the boot process. diff --git a/src/arch/x86/lib/romstage_console.c b/src/arch/x86/lib/romstage_console.c index 1c3141c..fc90085 100644 --- a/src/arch/x86/lib/romstage_console.c +++ b/src/arch/x86/lib/romstage_console.c @@ -49,13 +49,13 @@ void console_tx_byte(unsigned char byte) #if CONFIG_CONSOLE_SERIAL8250 uart8250_tx_byte(CONFIG_TTYS0_BASE, byte); #endif -#if CONFIG_USBDEBUG +#if CONFIG_USBDEBUG && (CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__)) usbdebug_tx_byte(dbgp_console_output(), byte); #endif #if CONFIG_CONSOLE_NE2K ne2k_append_data(&byte, 1, CONFIG_CONSOLE_NE2K_IO_PORT); #endif -#if CONFIG_CONSOLE_CBMEM +#if CONFIG_CONSOLE_CBMEM && (CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__)) cbmemc_tx_byte(byte); #endif #if CONFIG_SPKMODEM @@ -74,7 +74,7 @@ void console_tx_flush(void) #if CONFIG_CONSOLE_NE2K ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT); #endif -#if CONFIG_USBDEBUG +#if CONFIG_USBDEBUG && (CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__)) usbdebug_tx_flush(dbgp_console_output()); #endif } diff --git a/src/console/Kconfig b/src/console/Kconfig index 9bfb6e9..f415d93 100644 --- a/src/console/Kconfig +++ b/src/console/Kconfig @@ -274,7 +274,6 @@ config CONSOLE_NE2K_IO_PORT boundary, qemu needs broader align)
config CONSOLE_CBMEM - depends on (EARLY_CBMEM_INIT || DYNAMIC_CBMEM) bool "Send console output to a CBMEM buffer" default n help diff --git a/src/console/console.c b/src/console/console.c index 06a4604..014a4f7 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -113,13 +113,13 @@ void console_init(void) #if CONFIG_CONSOLE_NE2K ne2k_init(CONFIG_CONSOLE_NE2K_IO_PORT); #endif -#if CONFIG_CONSOLE_CBMEM && !defined(__BOOT_BLOCK__) +#if CONFIG_CONSOLE_CBMEM && CONFIG_EARLY_CBMEM_INIT && !defined(__BOOT_BLOCK__) cbmemc_init(); #endif #if CONFIG_SPKMODEM spkmodem_init(); #endif -#if CONFIG_USBDEBUG && !defined(__BOOT_BLOCK__) +#if CONFIG_USBDEBUG && CONFIG_EARLY_CBMEM_INIT && !defined(__BOOT_BLOCK__) usbdebug_init(); #endif
diff --git a/src/include/timestamp.h b/src/include/timestamp.h index edc0076..9e780c3 100644 --- a/src/include/timestamp.h +++ b/src/include/timestamp.h @@ -54,7 +54,7 @@ enum timestamp_id { TS_SELFBOOT_JUMP = 99, };
-#if CONFIG_COLLECT_TIMESTAMPS +#if CONFIG_COLLECT_TIMESTAMPS && (CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__)) #include <cpu/x86/tsc.h> void timestamp_init(tsc_t base); void timestamp_add(enum timestamp_id id, tsc_t ts_time); diff --git a/src/lib/usbdebug.c b/src/lib/usbdebug.c index 3faec10..e5f7902 100644 --- a/src/lib/usbdebug.c +++ b/src/lib/usbdebug.c @@ -579,13 +579,13 @@ err: } #endif /* CONFIG_USBDEBUG_OPTIONAL_HUB_PORT */
-#if defined(__PRE_RAM__) || !CONFIG_EARLY_CONSOLE static void enable_usbdebug(void) { +#if defined(__PRE_RAM__) || !(CONFIG_EARLY_CONSOLE && CONFIG_EARLY_CBMEM_INIT) pci_devfn_t dbg_dev = pci_ehci_dbg_dev(CONFIG_USBDEBUG_HCD_INDEX); pci_ehci_dbg_enable(dbg_dev, CONFIG_EHCI_BAR); -} #endif +}
static void set_debug_port(unsigned int port) { @@ -1038,8 +1038,6 @@ int usbdebug_init(void) if (!get_usbdebug_from_cbmem(dbg_info)) return 0; #endif -#if defined(__PRE_RAM__) || !CONFIG_EARLY_CONSOLE enable_usbdebug(); -#endif return usbdebug_init_(CONFIG_EHCI_BAR, CONFIG_EHCI_DEBUG_OFFSET, dbg_info); }