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++) {
64 if (driver == econsole_drivers)
66 while (!driver->tst_byte());
67 return driver->rx_byte();
70 int console_tst_byte(void)
72 struct console_driver *driver;
75 for(driver = console_drivers; driver < econsole_drivers; driver++)
77 return driver->tst_byte();
82 * Write POST information
84 void post_code(uint8_t value)
87 #if CONFIG_SERIAL_POST==1
88 printk_emerg("POST: 0x%02x\n", value);
94 /* Report a fatal error */
95 void die(const char *msg)
97 printk_emerg("%s", msg);