blob: 59bb1000be61a6a4c6ff912385e68e0c4eba7eb9 [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
Eric Biederman8ca8d762003-04-22 19:02:15 +00004static void __console_tx_byte(unsigned char byte)
5{
6 uart_tx_byte(byte);
7}
8
Carl-Daniel Hailfingera81bb032007-03-02 14:21:09 +00009#include "console_print.c"
Eric Biederman8ca8d762003-04-22 19:02:15 +000010
Stefan Reinauer7ce8c542005-12-02 21:52:30 +000011#else
Yinghai Lu30b4abe2007-04-06 19:57:42 +000012/* CONFIG_USE_PRINTK_IN_CAR == 1 */
arch import user (historical)6ca76362005-07-06 17:17:25 +000013
Carl-Daniel Hailfingera81bb032007-03-02 14:21:09 +000014#include "console_printk.c"
arch import user (historical)6ca76362005-07-06 17:17:25 +000015
Yinghai Lu30b4abe2007-04-06 19:57:42 +000016// do_printk
17#include "../../../console/vtxprintf.c"
18#include "printk_init.c"
19
20#endif /* CONFIG_USE_PRINTK_IN_CAR */
Eric Biederman69afe282004-11-11 06:53:24 +000021
Stefan Reinauerf8ee1802008-01-18 15:08:58 +000022#ifndef COREBOOT_EXTRA_VERSION
23#define COREBOOT_EXTRA_VERSION ""
Eric Biederman8ca8d762003-04-22 19:02:15 +000024#endif
25
Stefan Reinauer7ce8c542005-12-02 21:52:30 +000026
Eric Biederman8ca8d762003-04-22 19:02:15 +000027static void console_init(void)
28{
29 static const char console_test[] =
Stefan Reinauerf8ee1802008-01-18 15:08:58 +000030 "\r\n\r\ncoreboot-"
31 COREBOOT_VERSION
32 COREBOOT_EXTRA_VERSION
Eric Biederman8ca8d762003-04-22 19:02:15 +000033 " "
Stefan Reinauerf8ee1802008-01-18 15:08:58 +000034 COREBOOT_BUILD
Eric Biederman8ca8d762003-04-22 19:02:15 +000035 " starting...\r\n";
36 print_info(console_test);
37}
Eric Biederman05f26fc2003-06-11 21:55:00 +000038
39
40static void die(const char *str)
41{
42 print_emerg(str);
43 do {
44 hlt();
45 } while(1);
46}