1*9fa9487eSwiz.\" $NetBSD: console.4,v 1.1 2021/06/03 07:41:26 wiz Exp $ 2*9fa9487eSwiz.\" 3*9fa9487eSwiz.Dd September 6, 2006 4*9fa9487eSwiz.Dt CONS 4 x86 5*9fa9487eSwiz.Os 6*9fa9487eSwiz.Sh NAME 7*9fa9487eSwiz.Nm console 8*9fa9487eSwiz.Nd x86 console interface 9*9fa9487eSwiz.Sh SYNOPSIS 10*9fa9487eSwiz.Cd options CONSDEVNAME=string 11*9fa9487eSwiz.Cd options CONADDR=integer 12*9fa9487eSwiz.Cd options CONSPEED=integer 13*9fa9487eSwiz.Cd options CONS_OVERRIDE 14*9fa9487eSwiz.Cd options CONMODE=integer 15*9fa9487eSwiz.Sh DESCRIPTION 16*9fa9487eSwizThe 17*9fa9487eSwiz.Dq console 18*9fa9487eSwizdevice is used for 19*9fa9487eSwiz.Em kernel printf 20*9fa9487eSwizmessages and accesses to the 21*9fa9487eSwiz.Pa /dev/console 22*9fa9487eSwizcharacter special device in user mode. 23*9fa9487eSwizIt is attached to a hardware interface at boot time controlled by options 24*9fa9487eSwizin the kernel configuration file, or information passed by the boot loader. 25*9fa9487eSwiz.Pp 26*9fa9487eSwizBootblocks from 27*9fa9487eSwiz.Nx 1.4 28*9fa9487eSwizor newer select their console device from a compiled-in list, 29*9fa9487eSwizand then pass their choice of console device and console parameters to 30*9fa9487eSwizthe kernel. 31*9fa9487eSwiz.Pp 32*9fa9487eSwizAs of 33*9fa9487eSwiz.Nx 1.5 , 34*9fa9487eSwizthe 35*9fa9487eSwiz.Ic consdev 36*9fa9487eSwizbootblock command allows changing the console device on-the-fly. 37*9fa9487eSwiz.Pp 38*9fa9487eSwizThe kernel will use the same console device as the 39*9fa9487eSwizbootblock; no special kernel configuration is required. 40*9fa9487eSwiz.Pp 41*9fa9487eSwizTo override 42*9fa9487eSwizthe bootblock's choice of console, or to use a serial kernel console 43*9fa9487eSwizwith older bootblocks, you must specify kernel config-file options to 44*9fa9487eSwizoverride the information passed by the bootblock. 45*9fa9487eSwizThe current option choices are: 46*9fa9487eSwiz.Bl -tag -width aaa 47*9fa9487eSwiz.It - the standard PC keyboard and display 48*9fa9487eSwiz(with either the 49*9fa9487eSwiz.Dq pc 50*9fa9487eSwizor the 51*9fa9487eSwiz.Xr wscons 4 52*9fa9487eSwizdriver) 53*9fa9487eSwiz.It - standard PC serial ports 54*9fa9487eSwiz(with 55*9fa9487eSwiz.Xr com 4 56*9fa9487eSwizdriver) 57*9fa9487eSwiz.El 58*9fa9487eSwiz.Pp 59*9fa9487eSwizThe available 60*9fa9487eSwiz.Em kernel configuration 61*9fa9487eSwizoptions are: 62*9fa9487eSwiz.Bl -ohang 63*9fa9487eSwiz.It Cd options CONSDEVNAME=string 64*9fa9487eSwizspecifies the name of the console device. 65*9fa9487eSwizValid values are 66*9fa9487eSwiz.Dq pc 67*9fa9487eSwizfor the pc keyboard / display (default) 68*9fa9487eSwizand 69*9fa9487eSwiz.Dq com 70*9fa9487eSwizfor a serial port. 71*9fa9487eSwiz.It Cd options CONADDR=integer 72*9fa9487eSwizsets the base address for the serial console port (default: 0x3f8). 73*9fa9487eSwiz.It Cd options CONSPEED=integer 74*9fa9487eSwizsets the baudrate for the serial console (default: 9600). 75*9fa9487eSwiz.It Cd options CONS_OVERRIDE 76*9fa9487eSwizcauses console information passed by the bootloader to be ignored and 77*9fa9487eSwizthe settings specified by the three options above (or the defaults) to be 78*9fa9487eSwizused. 79*9fa9487eSwizDefault behaviour is to use the settings from the bootloader if 80*9fa9487eSwizpresent, and to use option / default values only if no information was 81*9fa9487eSwizpassed. 82*9fa9487eSwiz.It Cd options CONMODE=integer 83*9fa9487eSwizallows to specify terminal control flags. 84*9fa9487eSwizThe argument is a 85*9fa9487eSwiz.Dq cflag 86*9fa9487eSwizvalue, see 87*9fa9487eSwiz.Xr termios 4 88*9fa9487eSwizfor details. 89*9fa9487eSwizDefault is 90*9fa9487eSwiz.Li ( CREAD | CS8 | HUPCL ) 91*9fa9487eSwiz(8N1). 92*9fa9487eSwizThis option takes always effect, because mode settings are not passed 93*9fa9487eSwizby the bootloader. 94*9fa9487eSwiz.El 95*9fa9487eSwiz.Sh FILES 96*9fa9487eSwiz.Bl -tag -width /dev/console 97*9fa9487eSwiz.It Pa /dev/console 98*9fa9487eSwiz.El 99*9fa9487eSwiz.Sh EXAMPLES 100*9fa9487eSwiz.Cd options CONSDEVNAME=\&"\e"com\e"\&",CONADDR=0x2f8,CONSPEED=57600 101*9fa9487eSwiz.Sh SEE ALSO 102*9fa9487eSwiz.Xr config 1 , 103*9fa9487eSwiz.Xr tty 4 , 104*9fa9487eSwiz.Xr boot 8 105*9fa9487eSwiz.Sh BUGS 106*9fa9487eSwizThe console device is chosen early in system startup regardless 107*9fa9487eSwizif the specified driver / device is present in the system configuration file. 108*9fa9487eSwizIf the driver asked for by the bootloader or 109*9fa9487eSwiz.Dq Cd options CONSDEVNAME 110*9fa9487eSwizis not configured into the system, a panic is caused. 111*9fa9487eSwizBecause there is 112*9fa9487eSwizno console device, no explaining message will be printed. 113*9fa9487eSwizIf the driver is present, but the specific device instance not, kernel 114*9fa9487eSwizprintf will work, but 115*9fa9487eSwiz.Pa /dev/console 116*9fa9487eSwizbecomes a dummy. 117