David Hendricks (dhendrix@chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2365
-gerrit
commit 4672926c0a765d47c18300ef842a92ce6f4cdd38 Author: David Hendricks dhendrix@chromium.org Date: Mon Feb 11 19:23:18 2013 -0800
armv7: add lb_serial entry to coreboot tables
This should at least give the payload enough information to drive the UART.
Change-Id: I65009d862e9731b609d09ea215cd0dd774109c11 Signed-off-by: David Hendricks dhendrix@chromium.org --- src/arch/armv7/boot/coreboot_table.c | 18 +++++++++++++++++- src/include/boot/coreboot_tables.h | 1 + 2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/arch/armv7/boot/coreboot_table.c b/src/arch/armv7/boot/coreboot_table.c index 76fc8fb..5201f1e 100644 --- a/src/arch/armv7/boot/coreboot_table.c +++ b/src/arch/armv7/boot/coreboot_table.c @@ -136,13 +136,26 @@ static struct lb_serial *lb_serial(struct lb_header *header) } else { return NULL; } +#elif CONFIG_HAVE_UART_SPECIAL + /* FIXME(dhendrix): this should probably go in a board-specific file */ + struct lb_record *rec; + struct lb_serial *serial; + rec = lb_new_record(header); + serial = (struct lb_serial *)rec; + serial->tag = LB_TAG_SERIAL; + serial->size = sizeof(*serial); + serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED; + serial->baseaddr = CONFIG_CONSOLE_SERIAL_UART_ADDRESS; + serial->baud = CONFIG_TTYS0_BAUD; + return serial; #else return NULL; #endif }
+/* FIXME: maybe just check for CONFIG_CONSOLE_SERIAL? */ #if CONFIG_CONSOLE_SERIAL8250 || CONFIG_CONSOLE_SERIAL8250MEM || \ - CONFIG_CONSOLE_LOGBUF || CONFIG_USBDEBUG + CONFIG_HAVE_UART_SPECIAL || CONFIG_CONSOLE_LOGBUF || CONFIG_USBDEBUG static void add_console(struct lb_header *header, u16 consoletype) { struct lb_console *console; @@ -162,6 +175,9 @@ static void lb_console(struct lb_header *header) #if CONFIG_CONSOLE_SERIAL8250MEM add_console(header, LB_TAG_CONSOLE_SERIAL8250MEM); #endif +#if CONFIG_HAVE_UART_SPECIAL + add_console(header, LB_TAG_CONSOLE_UART_SPECIAL); +#endif #if CONFIG_CONSOLE_LOGBUF add_console(header, LB_TAG_CONSOLE_LOGBUF); #endif diff --git a/src/include/boot/coreboot_tables.h b/src/include/boot/coreboot_tables.h index 9cf90d3..04427d2 100644 --- a/src/include/boot/coreboot_tables.h +++ b/src/include/boot/coreboot_tables.h @@ -167,6 +167,7 @@ struct lb_console { #define LB_TAG_CONSOLE_SROM 4 // OBSOLETE #define LB_TAG_CONSOLE_EHCI 5 #define LB_TAG_CONSOLE_SERIAL8250MEM 6 +#define LB_TAG_CONSOLE_UART_SPECIAL 7
#define LB_TAG_FORWARD 0x0011 struct lb_forward {