2 * Bootstrap code for the INTEL
6 #include <console/console.h>
8 #include <pc80/mc146818rtc.h>
11 static int initialized;
13 /* initialize the console */
14 void console_init(void)
16 struct console_driver *driver;
17 if(get_option(&console_loglevel, "debug_level"))
18 console_loglevel=DEFAULT_CONSOLE_LOGLEVEL;
20 for(driver = console_drivers; driver < econsole_drivers; driver++) {
28 static void __console_tx_byte(unsigned char byte)
30 struct console_driver *driver;
31 for(driver = console_drivers; driver < econsole_drivers; driver++) {
32 driver->tx_byte(byte);
36 void console_tx_flush(void)
38 struct console_driver *driver;
39 for(driver = console_drivers; driver < econsole_drivers; driver++) {
40 if (!driver->tx_flush)
46 void console_tx_byte(unsigned char byte)
51 __console_tx_byte('\r');
52 __console_tx_byte(byte);
55 unsigned char console_rx_byte(void)
57 struct console_driver *driver;
60 for(driver = console_drivers; driver < econsole_drivers; driver++)
63 if (driver == econsole_drivers)
65 while (!driver->tst_byte());
66 return driver->rx_byte();
69 int console_tst_byte(void)
71 struct console_driver *driver;
74 for(driver = console_drivers; driver < econsole_drivers; driver++)
76 return driver->tst_byte();
81 * Write POST information
83 void post_code(uint8_t value)
86 #if CONFIG_SERIAL_POST==1
87 printk_emerg("POST: 0x%02x\n", value);
93 /* Report a fatal error */
94 void die(const char *msg)
96 printk_emerg("%s", msg);