From owner-cvs-sys Sat Nov 30 18:51:20 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA27188 for cvs-sys-outgoing; Sat, 30 Nov 1996 18:51:20 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA27183; Sat, 30 Nov 1996 18:51:12 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id NAA06493; Sun, 1 Dec 1996 13:49:19 +1100 Date: Sun, 1 Dec 1996 13:49:19 +1100 From: Bruce Evans Message-Id: <199612010249.NAA06493@godzilla.zeta.org.au> To: bde@freefall.freebsd.org, pst@shockwave.com Subject: Re: cvs commit: src/sys/i386/isa sio.c Cc: cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Excuse me, but in the SIO code, "comdefaultrate" certainly did give >the default for ALL serial ports on system boot. That was a major That was a space optimization. Since comdefaultrate was initialized to TTYDEF_SPEED and is static nonvolatile, these values were interchangeable. The main use for the variable was to change with a debugger after initializing all the serial ports. Only changing it before initializing them wouldn't have worked right. Since comdefaultrate is nonvolatile, I'm surprised that the compiler doesn't perform this optimization automatically, breaking the debugging hack :-]. >crock, because if you never set the baud rate on tty structure for >the serial port that was acting as the console, you'd reprogram the >SIO on every output to the serial port if you ran the serial console >at anything other than TTYSPEED_DEFRATE or whatever the 9600bps define >was. This should be harmless anyway, since the speed after open() is implementation defined. It was defined as TTYDEF_SPEED unless someone changed comdefaultrate or reprogrammed the initial state. Applications shouldn't assume that the default is TTYDEF_SPEED. Bruce