blob: 7eb8f4fa75e66c0c64a4286df2bb4e690880eaab [file] [log] [blame]
Eric Biederman6aa31cc2003-06-10 21:22:07 +00001static void outb(unsigned char value, unsigned short port)
2{
3 __builtin_outb(value, port);
4}
5
6static unsigned char inb(unsigned short port)
7{
8 return __builtin_inb(port);
9}
10
11static void __console_tx_byte(unsigned char byte)
12{
13 while(inb(0x3f8 + 0x05))
14 ;
15 outb(byte, 0x3f8 + 0x00);
16}
17
18static void __console_tx_string(int loglevel, const char *str)
19{
20 if (8 > loglevel) {
21 unsigned char ch;
22 while((ch = *str++) != '\0') {
23 __console_tx_byte(ch);
24 }
25 }
26}
27static void console_init(void)
28{
29 static const char console_test[] =
30 "\r\n\r\nLinuxBIOS-"
31 "1.1.0"
32 ".0Fallback"
33 " "
34 "Mon Jun 9 18:15:20 MDT 2003"
35 " starting...\r\n";
36 __console_tx_string(6, console_test);
37}