From owner-cvs-sys Sat Nov 30 23:36:05 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA05025 for cvs-sys-outgoing; Sat, 30 Nov 1996 23:36:05 -0800 (PST) Received: from precipice.shockwave.com (ppp-206-170-6-83.rdcy01.pacbell.net [206.170.6.83]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id XAA05020; Sat, 30 Nov 1996 23:36:01 -0800 (PST) Received: from shockwave.com (localhost.shockwave.com [127.0.0.1]) by precipice.shockwave.com (8.8.3/8.7.3) with ESMTP id XAA01092; Sat, 30 Nov 1996 23:35:45 -0800 (PST) Message-Id: <199612010735.XAA01092@precipice.shockwave.com> To: Bruce Evans cc: bde@freefall.freebsd.org, cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/isa sio.c In-reply-to: Your message of "Sun, 01 Dec 1996 13:49:19 +1100." <199612010249.NAA06493@godzilla.zeta.org.au> Date: Sat, 30 Nov 1996 23:35:45 -0800 From: Paul Traina Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk From: Bruce Evans Subject: Re: cvs commit: src/sys/i386/isa sio.c >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. OK, we're in perfect agreement there. So now, the $24 question is: "If I set comdefaultrate to 115200 and don't open /dev/ttyd0, exactly what is going to happen every time we output a character?"