- Initial checkin of the freebios2 tree
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@784 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
19
src/console/logbuf_console.c
Normal file
19
src/console/logbuf_console.c
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <console/console.h>
|
||||
|
||||
#define LOGBUF_SIZE 1024
|
||||
|
||||
// KEEP THIS GLOBAL.
|
||||
// I need the address so I can watch it with the ARIUM hardware. RGM.
|
||||
char logbuf[LOGBUF_SIZE];
|
||||
int logbuf_offset = 0;
|
||||
|
||||
static void logbuf_tx_byte(unsigned char byte)
|
||||
{
|
||||
logbuf[logbuf_offset] = byte;
|
||||
logbuf_offset = (logbuf_offset +1) % LOGBUF_SIZE;
|
||||
}
|
||||
|
||||
static struct console_driver __console = {
|
||||
.init = 0,
|
||||
.tx_byte = logbuf_tx_byte,
|
||||
};}
|
Reference in New Issue
Block a user