993edb2a35e0a36d0a65c4fea63c80de7046c6b9
[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 // do_printk
17 #include "../../../console/vtxprintf.c"
18 #include "printk_init.c"
19
20 #endif /* CONFIG_USE_PRINTK_IN_CAR */
21
22 #ifndef LINUXBIOS_EXTRA_VERSION
23 #define LINUXBIOS_EXTRA_VERSION ""
24 #endif
25
26
27 static void console_init(void)
28 {
29         static const char console_test[] = 
30                 "\r\n\r\nLinuxBIOS-"
31                 LINUXBIOS_VERSION
32                 LINUXBIOS_EXTRA_VERSION
33                 " "
34                 LINUXBIOS_BUILD
35                 " starting...\r\n";
36         print_info(console_test);
37 }
38
39
40 static void die(const char *str)
41 {
42         print_emerg(str);
43         do {
44                 hlt();
45         } while(1);
46 }