mini part of the patch on the mailing list to fix the boards again
[coreboot.git] / src / arch / i386 / lib / console.c
index 2bab6032d30a106b22ad9a41395f1e9eb187ce52..69b5a66f38aa94797a221f034a74a75c8c1efda2 100644 (file)
@@ -1,16 +1,13 @@
+#include <build.h>
 #include <console/loglevel.h>
 
 #if CONFIG_USE_PRINTK_IN_CAR == 0
 #include "console_print.c"
 #else  /* CONFIG_USE_PRINTK_IN_CAR == 1 */
-#include "console_printk.c"
+#include <console/console.h>
 #endif /* CONFIG_USE_PRINTK_IN_CAR */
 
-#ifndef COREBOOT_EXTRA_VERSION
-#define COREBOOT_EXTRA_VERSION ""
-#endif
-
-static void console_init(void)
+void console_init(void)
 {
        static const char console_test[] = 
                "\r\n\r\ncoreboot-"
@@ -23,6 +20,18 @@ static void console_init(void)
 }
 
 
+void post_code(u8 value)
+{
+#if !defined(CONFIG_NO_POST) || CONFIG_NO_POST==0
+#if CONFIG_SERIAL_POST==1
+       print_emerg("POST: 0x");
+       print_emerg_hex8(value);
+       print_emerg("\r\n");
+#endif
+       outb(value, 0x80);
+#endif
+}
+
 void die(const char *str)
 {
        print_emerg(str);