summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2008-01-25 18:28:18 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2008-01-25 18:28:18 +0000
commit8c2a0c144557331ec04a9ab0617e31222011cda6 (patch)
treeb2f5bec67a116afe5485c465a888fbab302730eb /src
parent1a6177b7204b0a40555486274b8219993304ba42 (diff)
This patch adds a new record type for lbtable to provide information
about a serial port. If a port is defined in the board configuration, add it to lbtable. Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3076 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r--src/arch/i386/boot/coreboot_table.c20
-rw-r--r--src/include/boot/coreboot_tables.h7
2 files changed, 26 insertions, 1 deletions
diff --git a/src/arch/i386/boot/coreboot_table.c b/src/arch/i386/boot/coreboot_table.c
index b13b63ee65..963ff385f5 100644
--- a/src/arch/i386/boot/coreboot_table.c
+++ b/src/arch/i386/boot/coreboot_table.c
@@ -74,6 +74,22 @@ struct lb_memory *lb_memory(struct lb_header *header)
return mem;
}
+struct lb_serial *lb_serial(struct lb_header *header)
+{
+#if defined(TTYS0_BASE)
+ 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->ioport = TTYS0_BASE;
+ return serial;
+#else
+ return header;
+#endif
+}
+
struct lb_mainboard *lb_mainboard(struct lb_header *header)
{
struct lb_record *rec;
@@ -406,8 +422,10 @@ unsigned long write_coreboot_table(
* size of the coreboot table.
*/
- /* Record our motheboard */
+ /* Record our motherboard */
lb_mainboard(head);
+ /* Record the serial port, if present */
+ lb_serial(head);
/* Record our various random string information */
lb_strings(head);
diff --git a/src/include/boot/coreboot_tables.h b/src/include/boot/coreboot_tables.h
index 84bd99f515..25a8adcf6b 100644
--- a/src/include/boot/coreboot_tables.h
+++ b/src/include/boot/coreboot_tables.h
@@ -138,6 +138,13 @@ struct lb_string {
uint8_t string[0];
};
+#define LB_TAG_SERIAL 0x000f
+struct lb_serial {
+ uint32_t tag;
+ uint32_t size;
+ uint16_t ioport;
+};
+
/* The following structures are for the cmos definitions table */
#define LB_TAG_CMOS_OPTION_TABLE 200
/* cmos header record */