libpayload: If there's no IO space, complain if the serial claims to use it

Change-Id: I36c750d520ff034c9ca9b9af46bd99bd49af7355
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/2659
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Gabe Black 2013-01-18 18:24:46 -08:00 committed by Ronald G. Minnich
parent 1c1171208f
commit d8d4d113f0
1 changed files with 10 additions and 2 deletions

View File

@ -97,10 +97,18 @@ void serial_init(void)
serial_is_mem_mapped = serial_is_mem_mapped =
(lib_sysinfo.serial->type == CB_SERIAL_TYPE_MEMORY_MAPPED); (lib_sysinfo.serial->type == CB_SERIAL_TYPE_MEMORY_MAPPED);
if (!serial_is_mem_mapped && (inb(IOBASE + 0x05) == 0xFF) && if (!serial_is_mem_mapped) {
#ifdef CONFIG_IO_ADDRESS_SPACE
if ((inb(IOBASE + 0x05) == 0xFF) &&
(inb(IOBASE + 0x06) == 0xFF)) { (inb(IOBASE + 0x06) == 0xFF)) {
return; return;
} }
#else
printf("IO space mapped serial not supported.");
return;
#endif
}
serial_hardware_is_present = 1; serial_hardware_is_present = 1;