I am interested in using uart(4) instead of sio(4) on stable/7, to ease our eventual transition to stable/8 or CURRENT. I added device uart and changed up /boot/device.hints (there were no entries in /etc/ttys that mentioned sio), and I get something that boots and has messages on the console, up to the login prompt. There's no login prompt, though. I can ssh to my box, echo to /dev/console appears on the console; messages on reboot appear on the console, just not the login prompt. Does anyone know what else I may be missing to use uart(4)? Also, we have some boot scripts locally that will try to set machdep.conspeed based on hardware type; uart(4) doesn't seem to expose a sysctl by that name. How does the uart driver for stable/7 deal with differing console speeds? The hints in /boot/device.hints, obtained by s/sio/uart: hint.uart.0.at="isa" hint.uart.0.port="0x3F8" hint.uart.0.flags="0x90" hint.uart.0.irq="4" hint.uart.1.at="isa" hint.uart.1.port="0x2F8" hint.uart.1.irq="3" hint.uart.2.at="isa" hint.uart.2.disabled="1" hint.uart.2.port="0x3E8" hint.uart.2.irq="5" hint.uart.3.at="isa" hint.uart.3.disabled="1" hint.uart.3.port="0x2E8" hint.uart.3.irq="9" Thanks, matthew
On Mon, Oct 26, 2009 at 02:57:42PM -0700, Matthew Fleming wrote:> I am interested in using uart(4) instead of sio(4) on stable/7, to ease > our eventual transition to stable/8 or CURRENT. I added device uart and > changed up /boot/device.hints (there were no entries in /etc/ttys that > mentioned sio)... It doesnt mention sio but you do need to change ttyd* to ttyu*, which are the sio and uart tty devices respectively. Andrew
On Oct 26, 2009, at 2:57 PM, Matthew Fleming wrote:> I can ssh to my box, echo to /dev/console appears on the console; > messages on reboot appear on the console, just not the login prompt. > Does anyone know what else I may be missing to use uart(4)?As Andrew pointed put, you need to update /etc/ttys as well.> Also, we have some boot scripts locally that will try to set > machdep.conspeed based on hardware type; uart(4) doesn't seem to > expose > a sysctl by that name. How does the uart driver for stable/7 deal > with > differing console speeds?uart(4) has 2 approaches for this: 1) you don't specify a speed -- in this case uart(4) will simply re-use the speed that hardware is programmed for. 2) You do specify a speed - uart(4) will reprogram the the console speed based on the hw.uart.console tunable. Note that for compatibility with sio(4) hints can be used as well. Use hint.uart.0.baud=9600 to set the console speed to 9600 baud. There's no compiled-in console speed. The compiled-in default (in a way) is to use the speed the hardware is programmed for. -- Marcel Moolenaar xcllnt@mac.com