[coreboot] r3081 - in trunk/coreboot-v2/src: arch/i386/boot include/boot

svn at coreboot.org svn at coreboot.org
Sun Jan 27 15:12:55 CET 2008


Author: oxygene
Date: 2008-01-27 15:12:54 +0100 (Sun, 27 Jan 2008)
New Revision: 3081

Modified:
   trunk/coreboot-v2/src/arch/i386/boot/coreboot_table.c
   trunk/coreboot-v2/src/include/boot/coreboot_tables.h
Log:
Add a new record type "console" for lbtable, and insert one record
for each output device we support, so the payload can figure out
where to find consoles that the user cares about.

Signed-off-by: Patrick Georgi <patrick at georgi-clan.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>



Modified: trunk/coreboot-v2/src/arch/i386/boot/coreboot_table.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/boot/coreboot_table.c	2008-01-27 07:17:14 UTC (rev 3080)
+++ trunk/coreboot-v2/src/arch/i386/boot/coreboot_table.c	2008-01-27 14:12:54 UTC (rev 3081)
@@ -90,6 +90,39 @@
 #endif
 }
 
+void add_console(struct lb_header *header, u16 consoletype)
+{
+	struct lb_record *rec;
+	struct lb_console *console;
+	rec = lb_new_record(header);
+	console = (struct lb_console *)lb_new_record(header);
+	console->tag = LB_TAG_CONSOLE;
+	console->size = sizeof(*console);
+	console->type = consoletype;
+}
+
+void lb_console(struct lb_header *header)
+{
+#ifdef CONFIG_CONSOLE_SERIAL8250
+	add_console(header, LB_TAG_CONSOLE_SERIAL8250);
+#endif
+#ifdef CONFIG_CONSOLE_VGA
+	add_console(header, LB_TAG_CONSOLE_VGA);
+#endif
+#ifdef CONFIG_CONSOLE_BTEXT
+	add_console(header, LB_TAG_CONSOLE_BTEXT);
+#endif
+#ifdef CONFIG_CONSOLE_LOGBUF
+	add_console(header, LB_TAG_CONSOLE_LOGBUF);
+#endif
+#ifdef CONFIG_CONSOLE_SROM
+	add_console(header, LB_TAG_CONSOLE_SROM);
+#endif
+#ifdef CONFIG_USBDEBUG_DIRECT
+	add_console(header, LB_TAG_CONSOLE_EHCI);
+#endif
+}
+
 struct lb_mainboard *lb_mainboard(struct lb_header *header)
 {
 	struct lb_record *rec;
@@ -426,6 +459,8 @@
 	lb_mainboard(head);
 	/* Record the serial port, if present */
 	lb_serial(head);
+	/* Record our console setup */
+	lb_console(head);
 	/* Record our various random string information */
 	lb_strings(head);
 

Modified: trunk/coreboot-v2/src/include/boot/coreboot_tables.h
===================================================================
--- trunk/coreboot-v2/src/include/boot/coreboot_tables.h	2008-01-27 07:17:14 UTC (rev 3080)
+++ trunk/coreboot-v2/src/include/boot/coreboot_tables.h	2008-01-27 14:12:54 UTC (rev 3081)
@@ -138,6 +138,8 @@
 	uint8_t  string[0];
 };
 
+/* 0xe is taken by v3 */
+
 #define LB_TAG_SERIAL		0x000f
 struct lb_serial {
 	uint32_t tag;
@@ -145,6 +147,20 @@
 	uint16_t ioport;
 };
 
+#define LB_TAG_CONSOLE		0x0010
+struct lb_console {
+	uint32_t tag;
+	uint32_t size;
+	uint16_t type;
+};
+
+#define LB_TAG_CONSOLE_SERIAL8250	0
+#define LB_TAG_CONSOLE_VGA		1
+#define LB_TAG_CONSOLE_BTEXT		2
+#define LB_TAG_CONSOLE_LOGBUF		3
+#define LB_TAG_CONSOLE_SROM		4
+#define LB_TAG_CONSOLE_EHCI		5
+
 /* The following structures are for the cmos definitions table */
 #define LB_TAG_CMOS_OPTION_TABLE 200
 /* cmos header record */





More information about the coreboot mailing list