47015bc75ca3f06d39f237c294d04d5fd8383e44
[coreboot.git] / src / arch / i386 / lib / console.c
1 #include <console/loglevel.h>
2
3 #if CONFIG_USE_PRINTK_IN_CAR == 0
4 static void __console_tx_byte(unsigned char byte)
5 {
6         uart_tx_byte(byte);
7 }
8
9 #include "console_print.c"
10
11 #else  
12 /* CONFIG_USE_PRINTK_IN_CAR == 1 */
13
14 #include "console_printk.c"
15
16 #endif /* CONFIG_USE_PRINTK_IN_CAR */
17
18 #ifndef COREBOOT_EXTRA_VERSION
19 #define COREBOOT_EXTRA_VERSION ""
20 #endif
21
22 static void console_init(void)
23 {
24         static const char console_test[] = 
25                 "\r\n\r\ncoreboot-"
26                 COREBOOT_VERSION
27                 COREBOOT_EXTRA_VERSION
28                 " "
29                 COREBOOT_BUILD
30                 " starting...\r\n";
31         print_info(console_test);
32 }
33
34
35 static void die(const char *str)
36 {
37         print_emerg(str);
38         do {
39                 hlt();
40         } while(1);
41 }