xref: /netbsd-src/share/man/man8/man8.x86/boot_console.8 (revision 99f13c162d27669b6dc9ebb1777726d2c5a5730f)
1.\"	$NetBSD: boot_console.8,v 1.4 2017/02/18 21:39:53 wiz Exp $
2.\"
3.\" Copyright (c) 1997
4.\" 	Matthias Drochner.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.Dd February 17, 2017
28.Dt BOOT_CONSOLE 8 x86
29.Os
30.Sh NAME
31.Nm boot_console
32.Nd selection of a console device in the x86 bootloader
33.\"
34.Sh DESCRIPTION
35The
36.Nx
37x86 bootloader selects a console device for its user interaction and
38passes information about it to the
39.Nx
40kernel.
41When booting from the system BIOS, the console device and properties
42are saved in the primary bootstrap by
43.Xr installboot 8 .
44For other boot procedures (such as
45.Xr x86/dosboot 8 )
46the selection process is controlled by bootloader compile-time
47options and system setup at the bootloader startup time.
48The selection may be changed on-the-fly from within the bootloader.
49.\"
50.Ss Serial Console Options
51The compile-time options (to be set in the booter's
52.Dq Makefile )
53are:
54.Bl -ohang
55.It Sy SUPPORT_SERIAL= Ns Fa policy
56enables support for serial input/output.
57By default this option is
58not set and the standard PC keyboard and display are always used as the
59console device.
60See
61.Sx Console Selection Policy
62below for valid values of
63.Fa policy .
64.It Sy DIRECT_SERIAL
65causes direct hardware access to be used for serial input / output.
66With this option, software handshake (XON/XOFF) is used for flow
67control.
68Without this option, BIOS functions are employed for serial
69port handling, which require hardware handshake lines to be completely
70wired.
71.It Sy CONSPEED= Ns Fa integer
72sets the baud-rate for the serial console.
73This option has only an effect when used in combination with the
74.Dq Dv DIRECT_SERIAL
75option above, otherwise, the default setting of 9600 baud is used.
76The value of
77.Fa integer
78must be something that makes sense as a serial port baud rate.
79.It Sy COMCONS_KEYPRESS
80Require a character input within seven (7) seconds from serial console
81device to be selected.
82.El
83.\"
84.Ss Console Selection Policy
85The actual policy for the console selection is determined by the value
86of
87.Dq Dv SUPPORT_SERIAL
88The following options are available:
89.Bl -ohang
90.It Em CONSDEV_PC
91Force use of the standard PC keyboard and display as the console.
92.It Em CONSDEV_COM0 Li ... Em CONSDEV_COM3
93Use the serial port with the corresponding BIOS number as the console.
94No attempt is made to verify connectivity on the selected port.
95If the port is not known to the BIOS, it falls back to
96.Dq Dv CONSDEV_PC .
97(Note: This feature can be deliberately used for console selection if
98the serial ports have been disabled in the BIOS.)
99.It Em CONSDEV_COM0KBD Li ... Em CONSDEV_COM3KBD
100If the port is known to the BIOS, and output of a character to the port
101succeeds (and if
102.Dq Dv DIRECT_SERIAL
103is defined the RS-232
104.Dq "modem ready"
105status is on after the character is output), the port is used as
106console.
107If the port is not known to the BIOS, or the test output fails, it falls back
108to
109.Dq Dv CONSDEV_PC .
110.It Em CONSDEV_AUTO
111Auto-select the console.
112All serial ports known to the BIOS are probed in sequence.
113If output of a character to the port succeeds (and if
114.Dq Dv DIRECT_SERIAL
115is defined the RS-232
116.Dq "modem ready"
117status is on after the character is output), the port is used as console.
118If no serial port passes the check,
119.Dq Dv CONSDEV_PC
120is used.
121The progress of the selection process is shown at the PC display as
122digits corresponding to the serial port number currently probed.
123.El
124.\"
125.Sh FILES
126.Bl -tag -width src/sys/arch/i386/stand/{boot,pxeboot}/Makefile
127.It Pa src/sys/arch/i386/stand/{boot,pxeboot}/Makefile
128compile time options for the boot programs.
129.El
130.\"
131.Sh SEE ALSO
132.Xr console 4 ,
133.Xr installboot 8 ,
134.Xr x86/boot 8
135.\"
136.Sh BUGS
137The serial communication parameters (byte-size, parity, stop-bits) are
138not settable (either at compile time or run time).
139The default parameters are
140.Dq "8 N 1" .
141.Pp
142The baud rate is not settable when using BIOS I/O.
143It should be settable at compile time with
144.Dq Dv CONSPEED
145just as it is when using
146.Dq Dv DIRECT_SERIAL .
147The default speed is 9600 baud (the maximum for BIOS I/O).
148