Re: kernel ignores kenv comconsole_speed?

2007-06-06 Thread Andrew Pantyukhin

On 10/25/06, Stefan Bethke [EMAIL PROTECTED] wrote:

Am 25.10.2006 um 10:57 schrieb Stefan Bethke:

 I'm not sure that would be so easy. However, CONSPEED is/was the
 setting to be used if the actual setting cannot be determined when
 sio initializes.

The code is there to determine the currently set speed (around line
2440 in sio.c in stable), but it seems it's not triggered on my
system.  Since you can't just printf some debug info there, I'm not
sure which condition is not met, or if something else has since reset
the sio to 9600.


This piece of loader.conf works for me on latest current.
Variations may or may not fail.

console=comconsole,vidconsole
boot_multicons=yes
boot_serial=yes
verbose_loading=yes
boot_verbose=yes
beastie_disable=yes
comconsole_speed=115200
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: kernel ignores kenv comconsole_speed?

2006-10-25 Thread Stefan Bethke

Am 24.10.2006 um 16:41 schrieb Jeremy Chadwick:


On Tue, Oct 24, 2006 at 09:41:57AM -0400, Vivek Khera wrote:

Am 23.10.2006 um 17:46 schrieb Vivek Khera:

On Oct 20, 2006, at 6:59 AM, Stefan Bethke wrote:

As I said, boot and loader are happily using 115200, but the kernel
uses the compiled-in default.  I'll file a PR the next few days,
hopefully with a patch.


As I said, works for me.  I wonder what it is you are going to
patch?  Did you try it with the separate -S option?  Did it work?


I think what Stefan refers to is the complex nature of how the
serial port is initialised/tinkered with in stages.


[ Very good, but very long explanation of the various users of the  
serial port omitted ]



What I'd like to propose is similar to Stefan's recommendation:
is there any way possible to:

* Not touch the serial port AT ALL, EVER [...]


I'm not sure that would be so easy. However, CONSPEED is/was the  
setting to be used if the actual setting cannot be determined when  
sio initializes.  I haven't researched if there ever was code that  
tried to determine the sio settings when (re-)initializing.  However,  
sioreg.h says:


/* default serial console speed if not set with sysctl or probed  
from boot */

#ifndef CONSPEED
#define CONSPEED 9600
#endif

For me, probing from boot could just mean to initialize the speed  
from kenv comconsole_speed if set, and fall back to CONSPEED  
otherwise.  I'll try to get around that on the weekend.


In current, imp re-enabled the commented-out tunable for  
machdep.conspeed.  Re-enabling that works without a problem, it seems  
(cf. 1.463 of sio.c).



Stefan

--
Stefan Bethke [EMAIL PROTECTED]   Fon +49 170 346 0140


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: kernel ignores kenv comconsole_speed?

2006-10-25 Thread Stefan Bethke

Am 25.10.2006 um 10:57 schrieb Stefan Bethke:

I'm not sure that would be so easy. However, CONSPEED is/was the  
setting to be used if the actual setting cannot be determined when  
sio initializes.


The code is there to determine the currently set speed (around line  
2440 in sio.c in stable), but it seems it's not triggered on my  
system.  Since you can't just printf some debug info there, I'm not  
sure which condition is not met, or if something else has since reset  
the sio to 9600.



Stefan

--
Stefan Bethke [EMAIL PROTECTED]   Fon +49 170 346 0140


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: kernel ignores kenv comconsole_speed?

2006-10-24 Thread Vivek Khera


On Oct 23, 2006, at 6:19 PM, Stefan Bethke wrote:


Am 23.10.2006 um 17:46 schrieb Vivek Khera:


On Oct 20, 2006, at 6:59 AM, Stefan Bethke wrote:

I have -DS115200 in /boot.config, and boot and loader are happily  
using this speed. However, the kernel appears to be hardwired to  
9600.


I've only ever gotten it to work when /boot.config looks like -D - 
S115200.  I don't think you can merge the -S flag with the  
others, at least according to my read of the man page.


As I said, boot and loader are happily using 115200, but the kernel  
uses the compiled-in default.  I'll file a PR the next few days,  
hopefully with a patch.


As I said, works for me.  I wonder what it is you are going to  
patch?  Did you try it with the separate -S option?  Did it work?





Re: kernel ignores kenv comconsole_speed?

2006-10-24 Thread Jeremy Chadwick
On Tue, Oct 24, 2006 at 09:41:57AM -0400, Vivek Khera wrote:
 Am 23.10.2006 um 17:46 schrieb Vivek Khera:
 On Oct 20, 2006, at 6:59 AM, Stefan Bethke wrote:
 I have -DS115200 in /boot.config, and boot and loader are happily  
 using this speed. However, the kernel appears to be hardwired to  
 9600.
 
 I've only ever gotten it to work when /boot.config looks like -D - 
 S115200.  I don't think you can merge the -S flag with the  
 others, at least according to my read of the man page.
 
 As I said, boot and loader are happily using 115200, but the kernel  
 uses the compiled-in default.  I'll file a PR the next few days,  
 hopefully with a patch.
 
 As I said, works for me.  I wonder what it is you are going to  
 patch?  Did you try it with the separate -S option?  Did it work?

I think what Stefan refers to is the complex nature of how the
serial port is initialised/tinkered with in stages.

boot0, boot2/loader, and the kernel all mess with the serial port,
depending upon numerous aspects (/boot.config for boot0, loader.conf
for boot2/loader, and CONSPEED in one's kernel config).

Based upon what I've seen (and this is somewhat historic; this may
have been changed within the past couple of years):

* If you're using -S115200 in boot.config, or set
  BOOT_COMCONSOLE_SPEED=115200 in make.conf, boot0 will initialise
  the serial port to 115200.  Otherwise, 9600.

* Using comconsole in loader.conf for boot2/loader doesn't
  change speed of the serial port (AFAIK), but it does do some
  internal setup/configuration prior to the kernel loading.  Just
  making note of that here.

* If you've set CONSPEED=115200 in your kernel config, once the
  kernel loads, it'll initialise the serial port and use 115200.
  Otherwise, 9600.

  (This also appears to have the side-effect of limiting the
  maximum serial port speed possible on that serial port to
  whatever CONSPEED is.  This may have been changed recently,
  as I've seen proof of CONSPEED defaulting to 9600 and being
  able to do things like tip -115200 or edit /etc/ttys and use
  std.115200 without any issues)

What I'd like to propose is similar to Stefan's recommendation:
is there any way possible to:

* Not touch the serial port AT ALL, EVER (in boot0, boot2/loader,
  or the kernel) -- so that systems which have BIOS-level
  serial console/serial redirection will work?  On all of our
  Supermicro boxes, the BIOS serial redirection works fine until
  some code touches the serial port.  Once that happens, the
  interrupt the BIOS has tied itself to gets munged in some bad
  way, which results in the serial port no longer working.

  (Using hint.sio.0.disabled=1 and hint.sio.1.disabled=1 does
  not address my above request.  The kernel still does something
  with the serial ports)

-- 
| Jeremy Chadwick jdc at parodius.com |
| Parodius Networkinghttp://www.parodius.com/ |
| UNIX Systems Administrator   Mountain View, CA, USA |
| Making life hard for others since 1977.   PGP: 4BD6C0CB |

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: kernel ignores kenv comconsole_speed?

2006-10-23 Thread Vivek Khera


On Oct 20, 2006, at 6:59 AM, Stefan Bethke wrote:

I have -DS115200 in /boot.config, and boot and loader are happily  
using this speed. However, the kernel appears to be hardwired to 9600.


I've only ever gotten it to work when /boot.config looks like -D - 
S115200.  I don't think you can merge the -S flag with the others,  
at least according to my read of the man page.


Also make sure the boot loader is at least as new as that installed  
by 6.0-REL. Older ones (ie from 5.x didn't work at all with -S for me.)


You will probably want to run fdisk -B to update that.



Re: kernel ignores kenv comconsole_speed?

2006-10-23 Thread Stefan Bethke

Am 23.10.2006 um 17:46 schrieb Vivek Khera:


On Oct 20, 2006, at 6:59 AM, Stefan Bethke wrote:

I have -DS115200 in /boot.config, and boot and loader are happily  
using this speed. However, the kernel appears to be hardwired to  
9600.


I've only ever gotten it to work when /boot.config looks like -D - 
S115200.  I don't think you can merge the -S flag with the others,  
at least according to my read of the man page.


As I said, boot and loader are happily using 115200, but the kernel  
uses the compiled-in default.  I'll file a PR the next few days,  
hopefully with a patch.



Stefan

--
Stefan Bethke [EMAIL PROTECTED]   Fon +49 170 346 0140


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]