CBMEM CONSOLE: Add code using the new console driver.
authorVadim Bendebury <vbendeb@chromium.org>
Fri, 30 Sep 2011 18:16:49 +0000 (11:16 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Thu, 29 Mar 2012 18:14:52 +0000 (20:14 +0200)
The new added code is compiled in when the CBMEM_CONSOLE config
flag is enabled.

Change-Id: Ifd1f492ce6321412a014333babbc5b3f14635988
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://review.coreboot.org/721
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
src/arch/x86/lib/romcc_console.c
src/arch/x86/lib/romstage_console.c
src/boot/hardwaremain.c
src/console/console.c

index 13ee1f004f350832220a7e678e93ef4d4153ba05..0e1f4e60039c66c9c877d4e214f3d1dfedfb059c 100644 (file)
@@ -46,6 +46,9 @@ static void __console_tx_byte(unsigned char byte)
 #if CONFIG_CONSOLE_NE2K
        ne2k_append_data_byte(byte, CONFIG_CONSOLE_NE2K_IO_PORT);
 #endif
 #if CONFIG_CONSOLE_NE2K
        ne2k_append_data_byte(byte, CONFIG_CONSOLE_NE2K_IO_PORT);
 #endif
+#if CONFIG_CONSOLE_CBMEM
+       cbmemc_tx_byte(byte);
+#endif
 }
 
 static void __console_tx_nibble(unsigned nibble)
 }
 
 static void __console_tx_nibble(unsigned nibble)
index 8adb3ba93d2324ee4259aeb6f5d35f94255aa838..0f2272709bc14445ac9373158795ee079dfbfcb1 100644 (file)
@@ -46,6 +46,9 @@ static void console_tx_byte(unsigned char byte)
 #if CONFIG_CONSOLE_NE2K
        ne2k_append_data(&byte, 1, CONFIG_CONSOLE_NE2K_IO_PORT);
 #endif
 #if CONFIG_CONSOLE_NE2K
        ne2k_append_data(&byte, 1, CONFIG_CONSOLE_NE2K_IO_PORT);
 #endif
+#if CONFIG_CONSOLE_CBMEM
+       cbmemc_tx_byte(byte);
+#endif
 }
 
 static void console_tx_flush(void)
 }
 
 static void console_tx_flush(void)
index 3d15b551c387f746dfdf20078c3c44053c065849..9b293c049a61833899abc886fb0cb7395ead7afe 100644 (file)
@@ -92,6 +92,9 @@ void hardwaremain(int boot_complete)
 
 #if CONFIG_WRITE_HIGH_TABLES == 1
        cbmem_initialize();
 
 #if CONFIG_WRITE_HIGH_TABLES == 1
        cbmem_initialize();
+#if CONFIG_CONSOLE_CBMEM
+       cbmemc_reinit();
+#endif
 #endif
 #if CONFIG_HAVE_ACPI_RESUME == 1
        suspend_resume();
 #endif
 #if CONFIG_HAVE_ACPI_RESUME == 1
        suspend_resume();
index d93366852abcd0a742b820f79cf1b12ec64b1a58..8f60f04d4caebcadcb95a5991cf42f94ba28b75a 100644 (file)
@@ -87,7 +87,7 @@ int console_tst_byte(void)
        return 0;
 }
 
        return 0;
 }
 
-#else
+#else // __PRE_RAM__   ^^^ NOT defined   vvv defined
 
 void console_init(void)
 {
 
 void console_init(void)
 {
@@ -103,6 +103,9 @@ void console_init(void)
 #endif
 #if CONFIG_CONSOLE_NE2K
        ne2k_init(CONFIG_CONSOLE_NE2K_IO_PORT);
 #endif
 #if CONFIG_CONSOLE_NE2K
        ne2k_init(CONFIG_CONSOLE_NE2K_IO_PORT);
+#endif
+#if CONFIG_CONSOLE_CBMEM
+       cbmemc_init();
 #endif
        static const char console_test[] =
                "\n\ncoreboot-"
 #endif
        static const char console_test[] =
                "\n\ncoreboot-"