dprintf: allow overriding the serial port address
authorH. Peter Anvin <hpa@linux.intel.com>
Fri, 2 Jul 2010 01:02:11 +0000 (18:02 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Fri, 2 Jul 2010 01:02:11 +0000 (18:02 -0700)
Allow overriding the serial port address, e.g. for systems which only
have PCI serial ports.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
com32/lib/vdprintf.c

index 330279b..d74f278 100644 (file)
@@ -30,7 +30,12 @@ enum serial_port_regs {
     MSR = 6,
     SCR = 7,
 };
-static const uint16_t debug_base = 0x03f8; /* I/O base address */
+
+#ifndef DEBUG_PORT
+# define DEBUG_PORT 0x03f8     /* I/O base address */
+#endif
+
+static const uint16_t debug_base = DEBUG_PORT;
 
 static void debug_putc(char c)
 {