Date: Sun, 1 Dec 1996 13:49:19 +1100 From: Bruce Evans <bde@zeta.org.au> To: bde@freefall.freebsd.org, pst@shockwave.com Cc: 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 Message-ID: <199612010249.NAA06493@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612010249.NAA06493>
