3b6c7445035317b03b1d79bed3c476c67f583994
[coreboot.git] / src / console / logbuf_console.c
1 #include <console/console.h>
2
3 #define LOGBUF_SIZE  1024
4
5 // KEEP THIS GLOBAL. 
6 // I need the address so I can watch it with the ARIUM hardware. RGM.
7 char logbuf[LOGBUF_SIZE];
8 int logbuf_offset = 0;
9
10 static void logbuf_tx_byte(unsigned char byte)
11 {
12         logbuf[logbuf_offset] = byte;
13         logbuf_offset = (logbuf_offset +1) % LOGBUF_SIZE;
14 }
15
16 static const struct console_driver __console = {
17         .init    = 0,
18         .tx_byte = logbuf_tx_byte,
19         .rx_byte = 0,
20         .tst_byte = 0,
21 };}