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
+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;
struct lb_mainboard *lb_mainboard(struct lb_header *header)
{
struct lb_record *rec;
* size of the coreboot table.
*/
* size of the coreboot table.
*/
- /* Record our motheboard */
+ /* Record our motherboard */
+ /* Record the serial port, if present */
+ lb_serial(head);
/* Record our various random string information */
lb_strings(head);
/* Record our various random string information */
lb_strings(head);
+#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 */
/* The following structures are for the cmos definitions table */
#define LB_TAG_CMOS_OPTION_TABLE 200
/* cmos header record */