From d1bc331855caab351a70676b5085787292a45fea Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Wed, 22 Jun 2011 16:39:19 -0700 Subject: Extend coreboot table entry for serial ports Add information about memory mapped/io mapped base addresses. and fix up libpayload to use the same structures Signed-off-by: Stefan Reinauer Change-Id: I5f7b5eda6063261b9acb7a46310172d4a5471dfb Reviewed-on: http://review.coreboot.org/261 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- payloads/libpayload/arch/i386/coreboot.c | 4 +++- payloads/libpayload/arch/powerpc/coreboot.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'payloads/libpayload/arch') diff --git a/payloads/libpayload/arch/i386/coreboot.c b/payloads/libpayload/arch/i386/coreboot.c index e3c944d443..bdef4e85d3 100644 --- a/payloads/libpayload/arch/i386/coreboot.c +++ b/payloads/libpayload/arch/i386/coreboot.c @@ -77,7 +77,9 @@ static void cb_parse_memory(unsigned char *ptr, struct sysinfo_t *info) static void cb_parse_serial(unsigned char *ptr, struct sysinfo_t *info) { struct cb_serial *ser = (struct cb_serial *)ptr; - info->ser_ioport = ser->ioport; + if (ser->type != CB_SERIAL_TYPE_IO_MAPPED) + return; + info->ser_ioport = ser->baseaddr; } #ifdef CONFIG_NVRAM diff --git a/payloads/libpayload/arch/powerpc/coreboot.c b/payloads/libpayload/arch/powerpc/coreboot.c index ee1842c82f..7da87ed2f2 100644 --- a/payloads/libpayload/arch/powerpc/coreboot.c +++ b/payloads/libpayload/arch/powerpc/coreboot.c @@ -77,7 +77,9 @@ static void cb_parse_memory(unsigned char *ptr, struct sysinfo_t *info) static void cb_parse_serial(unsigned char *ptr, struct sysinfo_t *info) { struct cb_serial *ser = (struct cb_serial *)ptr; - info->ser_ioport = ser->ioport; + if (ser->type != CB_SERIAL_TYPE_IO_MAPPED) + return; + info->ser_ioport = ser->baseaddr; } #ifdef CONFIG_NVRAM -- cgit v1.2.3