[syslinux:master] dprintf: allow overriding the serial port address

syslinux-bot for H. Peter Anvin hpa at linux.intel.com
Thu Jul 1 18:06:17 PDT 2010


Commit-ID:  20ea30320a6195b7cba950b8bdbbb8289560a646
Gitweb:     http://syslinux.zytor.com/commit/20ea30320a6195b7cba950b8bdbbb8289560a646
Author:     H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Thu, 1 Jul 2010 18:02:11 -0700
Committer:  H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Thu, 1 Jul 2010 18:02:11 -0700

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 <hpa at linux.intel.com>


---
 com32/lib/vdprintf.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

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)
 {



More information about the Syslinux-commits mailing list