blob: 2bab6032d30a106b22ad9a41395f1e9eb187ce52 [file] [log] [blame]
Eric Biederman8ca8d762003-04-22 19:02:15 +00001#include <console/loglevel.h>
2
Yinghai Lu5f9624d2006-10-04 22:56:21 +00003#if CONFIG_USE_PRINTK_IN_CAR == 0
Carl-Daniel Hailfingera81bb032007-03-02 14:21:09 +00004#include "console_print.c"
Stefan Reinauer52fc6b12009-10-24 13:06:04 +00005#else /* CONFIG_USE_PRINTK_IN_CAR == 1 */
Carl-Daniel Hailfingera81bb032007-03-02 14:21:09 +00006#include "console_printk.c"
Yinghai Lu30b4abe2007-04-06 19:57:42 +00007#endif /* CONFIG_USE_PRINTK_IN_CAR */
Eric Biederman69afe282004-11-11 06:53:24 +00008
Stefan Reinauerf8ee1802008-01-18 15:08:58 +00009#ifndef COREBOOT_EXTRA_VERSION
10#define COREBOOT_EXTRA_VERSION ""
Eric Biederman8ca8d762003-04-22 19:02:15 +000011#endif
12
13static void console_init(void)
14{
15 static const char console_test[] =
Stefan Reinauerf8ee1802008-01-18 15:08:58 +000016 "\r\n\r\ncoreboot-"
17 COREBOOT_VERSION
18 COREBOOT_EXTRA_VERSION
Eric Biederman8ca8d762003-04-22 19:02:15 +000019 " "
Stefan Reinauerf8ee1802008-01-18 15:08:58 +000020 COREBOOT_BUILD
Eric Biederman8ca8d762003-04-22 19:02:15 +000021 " starting...\r\n";
22 print_info(console_test);
23}
Eric Biederman05f26fc2003-06-11 21:55:00 +000024
25
Stefan Reinauer52fc6b12009-10-24 13:06:04 +000026void die(const char *str)
Eric Biederman05f26fc2003-06-11 21:55:00 +000027{
28 print_emerg(str);
29 do {
30 hlt();
31 } while(1);
32}