From 20ea30320a6195b7cba950b8bdbbb8289560a646 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 1 Jul 2010 18:02:11 -0700 Subject: [PATCH] dprintf: allow overriding the serial port address Allow overriding the serial port address, e.g. for systems which only have PCI serial ports. Signed-off-by: H. Peter Anvin --- com32/lib/vdprintf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/com32/lib/vdprintf.c b/com32/lib/vdprintf.c index 330279b..d74f278 100644 --- a/com32/lib/vdprintf.c +++ b/com32/lib/vdprintf.c @@ -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) { -- 2.7.4