Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Nov 1996 23:35:45 -0800
From:      Paul Traina <pst@shockwave.com>
To:        Bruce Evans <bde@zeta.org.au>
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 
Message-ID:  <199612010735.XAA01092@precipice.shockwave.com>
In-Reply-To: Your message of "Sun, 01 Dec 1996 13:49:19 %2B1100." <199612010249.NAA06493@godzilla.zeta.org.au> 

next in thread | previous in thread | raw e-mail | index | archive | help


  From: Bruce Evans <bde@zeta.org.au>
  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?"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612010735.XAA01092>