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