NetBSD Problem Report #7418

Received: (qmail 10001 invoked from network); 19 Apr 1999 04:55:48 -0000
Message-Id: <199904190455.AAA06258@neuralgia.linnaean.org>
Date: Mon, 19 Apr 1999 00:55:45 -0400 (EDT)
From: Daniel Hagerty <hag@linnaean.org>
Reply-To: Daniel Hagerty <hag@linnaean.org>
To: gnats-bugs@gnats.netbsd.org
Subject: dual head PCs using CONSDEV_COM can be confusing to lusers
X-Send-Pr-Version: 3.95

>Number:         7418
>Category:       port-i386
>Synopsis:       dual head PCs using CONSDEV_COM can be confusing to lusers
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 18 22:05:01 +0000 1999
>Closed-Date:    
>Last-Modified:  Sun Sep 03 01:20:26 +0000 2006
>Originator:     Daniel Hagerty
>Release:        1.4_ALPHA
>Organization:
Maybe
>Environment:
System: NetBSD neuralgia.linnaean.org 1.4_ALPHA NetBSD 1.4_ALPHA (NEURALGIA.v6) #63: Fri Apr 16 23:22:26 EDT 1999 hag@neuralgia.linnaean.org:/fs/neuralgia/home/hag/src/ipv6/netbsd-1.4-sys/arch/i386/compile/NEURALGIA.v6 i386


>Description:
	x86 boxes that have a standard video console that have been
configured with CONSDEV_COM can confuse lusers.  Machines configured
this way give no indication of being functional on the video console
until they reach multiuser by default.

>How-To-Repeat:
	Configure box with CONSDEV_COM.  Boot.  Observe video
screen not changing from what BIOS did until multiuser.

>Fix:
	Attached patch adds yet another #ifdef option for the serial
bootloader.  If COMCONS_PCMSG is defined, a brief message will be
printed on the video console if a serial console is selected for boot.

Index: pcio.c
===================================================================
RCS file: /home/neuralgia/hag/work/hacking/os/netbsd/cvsroot/netbsd/sys/arch/i386/stand/lib/pcio.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 pcio.c
--- pcio.c	1999/04/15 11:08:20	1.1.1.2
+++ pcio.c	1999/04/19 04:45:21
@@ -70,6 +70,10 @@
 #define SERIAL_ARG (iodev - CONSDEV_COM0)
 #endif /* DIRECT_SERIAL */

+#ifdef COMCONS_PCMSG
+static inline void conputs __P((char *));
+#endif COMCONS_PCMSG
+
 static int getcomaddr __P((int));
 #endif /* SUPPORT_SERIAL */

@@ -190,8 +194,19 @@
 		iodev = CONSDEV_PC;
 		break;
 	}
+
 	conputc('\015');
 	conputc('\n');
+
+#ifdef COMCONS_PCMSG
+	if(iodev != CONSDEV_PC) {
+	  int sdev = iodev;
+	  iodev = CONSDEV_PC;
+	  conputs("\r\nBooting with serial console...\r\n\r\n");
+	  iodev = sdev;
+	}
+#endif
+
 	strncpy(btinfo_console.devname, iodev == CONSDEV_PC ? "pc" : "com", 16);
 #if defined(DIRECT_SERIAL) && defined(CONSPEED)
 	btinfo_console.speed = CONSPEED;
@@ -318,3 +333,14 @@

 	return(c);
 }
+
+#ifdef COMCONS_PCMSG
+static inline void
+conputs(char *msg) {
+  char c;
+
+  while((c = *msg++)) {
+    conputc(c);
+  }
+}
+#endif
>Release-Note:
>Audit-Trail:

From: Michael Graff <explorer@flame.org>
To: Daniel Hagerty <hag@linnaean.org>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-i386/7418: dual head PCs using CONSDEV_COM can be confusing to lusers
Date: 19 Apr 1999 01:37:23 -0700

 What happens if there is no video card installed?

 --Michael

From: woods@most.weird.com (Greg A. Woods)
To: Daniel Hagerty <hag@linnaean.org>
Cc: gnats-bugs@gnats.netbsd.org (NetBSD GNATS submissions and followups),
    netbsd-bugs@NetBSD.ORG (NetBSD Bugs and PR posting List) 
Subject: Re: port-i386/7418: dual head PCs using CONSDEV_COM can be confusing to lusers
Date: Mon, 19 Apr 1999 15:06:51 -0400 (EDT)

 [ On Monday, April 19, 1999 at 00:55:45 (-0400), Daniel Hagerty wrote: ]
 > Subject: port-i386/7418: dual head PCs using CONSDEV_COM can be confusing to lusers
 >
 > >Description:
 > 	x86 boxes that have a standard video console that have been
 > configured with CONSDEV_COM can confuse lusers.  Machines configured
 > this way give no indication of being functional on the video console
 > until they reach multiuser by default.

 Indeed, which is why I think CONSDEV_COM on most PCs is a mistake, even
 with the helpful message printed by your patch.

 Instead I created a patch some time ago which probes for the presence of
 a keyboard and "does the right thing" (including printing a slightly
 less verbose message too).  After -current becomes -current again I'll
 clean it up and re-submit it.  For now I'm using it happily on my own
 i386 servers with 1.3I and 1.3.3, as well as some for a client.  IMNSHO
 this should be the default for PC boot blocks -- a Unix machine should
 always default to the most appropriate console, and if there isn't a
 working keyboard plugged in then I'd say there's only one other obvious
 course of action (i.e. pick the first working COM port), and there
 should definitely not be a requirement to re-compile the boot blocks
 just to get a serial console working.  The only other "obvious" solution
 is to employ a run-time configuration scheme, perhaps like FreeBSD has.

 I've yet to encounter a real-life situation where a PC computer has both
 a real serial console and yet requires the keyboard (and video display)
 only for normal multi-user operation, but I did leave support for
 CONSDEV_COM in my patched boot blocks, just for this scenario, but I'm
 fairly certain that it's rare enough to justify requiring a custom
 compile.

 Anyone who wants my 1.3.3 patch is welcome to it -- just send me e-mail.

 -- 
 							Greg A. Woods

 +1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
 Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>

From: John Hawkinson <jhawk@MIT.EDU>
To: woods@most.weird.com (Greg A. Woods)
Cc: gnats-bugs@netbsd.org
Subject: Re: port-i386/7418: dual head PCs using CONSDEV_COM can be confusing to lusers
Date: Mon, 17 Apr 2000 16:56:07 -0400 (EDT)

 > Date: 19 Apr 1999 01:37:23 -0700

 Been a while...

 |  Instead I created a patch some time ago which probes for the presence of
 |  a keyboard and "does the right thing" (including printing a slightly
 |  less verbose message too).  After -current becomes -current again I'll
 |  clean it up and re-submit it.  For now I'm using it happily on my own

 | Anyone who wants my 1.3.3 patch is welcome to it -- just send me e-mail.

 For the record, could you include your patch in this PR?

 (I don't see a PR from you with a re-submission)

 Thanks.

 --jhawk
Responsible-Changed-From-To: port-i386-maintainer->mycroft 
Responsible-Changed-By: mycroft 
Responsible-Changed-When: Sat Jul 3 21:15:58 UTC 2004 
Responsible-Changed-Why:  
. 
Responsible-Changed-From-To: mycroft->port-i386-maintainer
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Sun, 03 Sep 2006 01:20:26 +0000
Responsible-Changed-Why:
Back to role account, mycroft doesn't have commit access any longer.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.