blob: 071fb2848c9486a5a3d7fc502cfa5efe4bfcd72f [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
12/* CONFIG_USE_INIT == 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
Stefan Reinauer7ce8c542005-12-02 21:52:30 +000016#endif /* CONFIG_USE_INIT */
Eric Biederman69afe282004-11-11 06:53:24 +000017
Eric Biederman8ca8d762003-04-22 19:02:15 +000018#ifndef LINUXBIOS_EXTRA_VERSION
Eric Biedermanb78c1972004-10-14 20:54:17 +000019#define LINUXBIOS_EXTRA_VERSION ""
Eric Biederman8ca8d762003-04-22 19:02:15 +000020#endif
21
Stefan Reinauer7ce8c542005-12-02 21:52:30 +000022
Eric Biederman8ca8d762003-04-22 19:02:15 +000023static void console_init(void)
24{
25 static const char console_test[] =
26 "\r\n\r\nLinuxBIOS-"
Eric Biedermanb78c1972004-10-14 20:54:17 +000027 LINUXBIOS_VERSION
28 LINUXBIOS_EXTRA_VERSION
Eric Biederman8ca8d762003-04-22 19:02:15 +000029 " "
Eric Biedermanb78c1972004-10-14 20:54:17 +000030 LINUXBIOS_BUILD
Eric Biederman8ca8d762003-04-22 19:02:15 +000031 " starting...\r\n";
32 print_info(console_test);
33}
Eric Biederman05f26fc2003-06-11 21:55:00 +000034
35
36static void die(const char *str)
37{
38 print_emerg(str);
39 do {
40 hlt();
41 } while(1);
42}