drop unneeded __ROMCC__ checks when the check for __PRE_RAM__ is more
[coreboot.git] / src / arch / i386 / lib / console.c
1 #include <build.h>
2 #include <console/loglevel.h>
3
4 #if CONFIG_USE_PRINTK_IN_CAR == 0
5 #include "console_print.c"
6 #else  /* CONFIG_USE_PRINTK_IN_CAR == 1 */
7 #include <console/console.h>
8 #endif /* CONFIG_USE_PRINTK_IN_CAR */
9
10 void console_init(void)
11 {
12         static const char console_test[] = 
13                 "\r\n\r\ncoreboot-"
14                 COREBOOT_VERSION
15                 COREBOOT_EXTRA_VERSION
16                 " "
17                 COREBOOT_BUILD
18                 " starting...\r\n";
19         print_info(console_test);
20 }
21
22
23 void post_code(u8 value)
24 {
25 #if !defined(CONFIG_NO_POST) || CONFIG_NO_POST==0
26 #if CONFIG_SERIAL_POST==1
27         print_emerg("POST: 0x");
28         print_emerg_hex8(value);
29         print_emerg("\r\n");
30 #endif
31         outb(value, 0x80);
32 #endif
33 }
34
35 void die(const char *str)
36 {
37         print_emerg(str);
38         do {
39                 hlt();
40         } while(1);
41 }