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> Reviewed-on: http://review.coreboot.org/3970 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
parent
082c19ea89
commit
2644793ef4
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue