From 21ccb00f168f48322d00b57e4aa7fc28a1a8c272 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 3 Apr 2014 19:04:14 -0700 Subject: [PATCH] console: Make more consoles (including cbmem) work in the bootblock. The cbmem console had been explicitly disabled in the bootblock because of the complexity of handing off the console from the bootblock to the ROM stage. The fixed cbmem location means no handoff is really necessary, so these can be re-enabled. Also include some other shared console drivers if they and bootblock console have been enabled. BUG=None TEST=Built and booted on nyan and saw bootblock console output in cbmem. Built for falco. BRANCH=None Change-Id: Iffe2747d6d526b58fabb0195f8744ae420f2e19d Signed-off-by: Gabe Black Reviewed-on: https://chromium-review.googlesource.com/193168 Reviewed-by: Aaron Durbin Commit-Queue: Gabe Black Tested-by: Gabe Black --- src/arch/arm/early_console.c | 2 +- src/console/console.c | 2 +- src/lib/Makefile.inc | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/arch/arm/early_console.c b/src/arch/arm/early_console.c index 26f3df2d30..b03e6d9d0a 100644 --- a/src/arch/arm/early_console.c +++ b/src/arch/arm/early_console.c @@ -41,7 +41,7 @@ void console_tx_byte(unsigned char byte) #if CONFIG_USBDEBUG usbdebug_tx_byte(0, byte); #endif -#if CONFIG_CONSOLE_CBMEM && !defined(__BOOT_BLOCK__) +#if CONFIG_CONSOLE_CBMEM cbmemc_tx_byte(byte); #endif } diff --git a/src/console/console.c b/src/console/console.c index 7aee527abb..64056b43ea 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -117,7 +117,7 @@ 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 cbmemc_init(); #endif static const char console_test[] = diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index d23b96116c..23db12dcd3 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -30,6 +30,13 @@ ifneq ($(CONFIG_HAVE_ARCH_MEMMOVE),y) bootblock-y += memmove.c endif +ifeq ($(CONFIG_BOOTBLOCK_CONSOLE),y) +bootblock-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c +bootblock-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c +bootblock-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c +bootblock-$(CONFIG_CONSOLE_NE2K) += ne2k.c +endif + ifneq ($(CONFIG_HAVE_ARCH_MEMSET),y) romstage-y += memset.c rmodules-y += memset.c