fixes and cleanup, submitted by Greg A. Woods per PR port-i386/6695
(minimally edited)
This commit is contained in:
parent
918dfd95e1
commit
b968de922b
@ -1,98 +1,127 @@
|
||||
.\" $NetBSD: boot_console.8,v 1.3 1998/02/25 12:30:13 drochner Exp $
|
||||
.\" $NetBSD: boot_console.8,v 1.4 1999/02/21 15:59:18 drochner Exp $
|
||||
.\"
|
||||
.Dd September 30, 1997
|
||||
.Dd December 31, 1998
|
||||
.Os
|
||||
.Dt BOOT_CONSOLE 8 i386
|
||||
.Sh NAME
|
||||
.Nm boot_console
|
||||
.Nd selection of a console device in the i386 bootloader
|
||||
|
||||
.\"
|
||||
.Sh DESCRIPTION
|
||||
The i386 bootloader selects a console device for its user interaction
|
||||
and passes information about it to the
|
||||
The
|
||||
.Nx
|
||||
kernel. The selection process is controlled by bootloader compile-time
|
||||
i386 bootloader selects a console device for its user interaction and
|
||||
passes information about it to the
|
||||
.Nx
|
||||
kernel. The selection process is controlled by bootloader compile-time
|
||||
options and system setup at the bootloader startup time.
|
||||
|
||||
.Pp
|
||||
The compile-time options (to set in the bootloader's
|
||||
.Dq Makefile
|
||||
) are:
|
||||
.\"
|
||||
.Ss Serial Console Options
|
||||
The compile-time options (to be set in the booter's
|
||||
.Dq Makefile )
|
||||
are:
|
||||
.Bl -ohang
|
||||
.It Cd SUPPORT_SERIAL
|
||||
enables support for serial input / output. If not set, the standard PC
|
||||
keyboard / display is always used as console device and the following
|
||||
options are meaningless.
|
||||
.It Cd DIRECT_SERIAL
|
||||
.It Dv Sy SUPPORT_SERIAL= Ns Fa policy
|
||||
enables support for serial input / output. By default this option is
|
||||
not set and the standard PC keyboard and display are always used as the
|
||||
console device. See
|
||||
.Dq Em "Console selection Policy"
|
||||
below for valid values of
|
||||
.Fa policy .
|
||||
.It Dv Sy DIRECT_SERIAL
|
||||
causes direct hardware access to be used for serial input / output.
|
||||
With this option, software handshake (XON/XOFF) is used for
|
||||
flow control. Without this option, BIOS functions are employed for
|
||||
serial port handling, which require hardware handshake lines to
|
||||
be completely wired.
|
||||
.It Cd CONSPEED=integer
|
||||
sets the baudrate for the serial console. This option has only an
|
||||
effect together with the
|
||||
.Dq Cd DIRECT_SERIAL
|
||||
option above. Otherwise, the default setting of 9600 baud is used.
|
||||
.It Cd COMCONS_KEYPRESS
|
||||
If console autoselection is used (see below), require a character
|
||||
input within 1 second after a space character is sent to the serial
|
||||
line for a serial console device to be selected. If not set, only a simple
|
||||
function check is done (and the hardware handshake is checked
|
||||
if
|
||||
.Dq Cd DIRECT_SERIAL
|
||||
is not defined).
|
||||
With this option, software handshake (XON/XOFF) is used for flow
|
||||
control. Without this option, BIOS functions are employed for serial
|
||||
port handling, which require hardware handshake lines to be completely
|
||||
wired.
|
||||
.It Dv Sy CONSPEED= Ns Fa integer
|
||||
sets the baud-rate for the serial console. This option has only an
|
||||
effect when used in combination with the
|
||||
.Dq Dv DIRECT_SERIAL
|
||||
option above, otherwise, the default setting of 9600 baud is used. The
|
||||
value of
|
||||
.Fa integer
|
||||
must be something that makes sense as a serial port baud rate.
|
||||
.It Dv Sy COMCONS_KEYPRESS
|
||||
Require a character input within seven(7) seconds from serial console
|
||||
device to be selected.
|
||||
.El
|
||||
|
||||
The actual policy for the console selection is determined by the
|
||||
argument to the console initialization function
|
||||
.Fn initio int
|
||||
which is called early in the bootloader's
|
||||
.Fn main
|
||||
function. The following are available:
|
||||
.\"
|
||||
.Ss Console Selection Policy
|
||||
The actual policy for the console selection is determined by the value
|
||||
of
|
||||
.Dv Dq SUPPORT_SERIAL
|
||||
The following options are available:
|
||||
.Bl -ohang
|
||||
.It Fa CONSDEV_PC
|
||||
Use the standard PC keyboard / display as console.
|
||||
.It Fa CONSDEV_COM0 Li ... Fa CONSDEV_COM3
|
||||
Use the serial port with the corresponding BIOS number as
|
||||
console. If the port is not known to the BIOS, it falls back to
|
||||
.Dq Fa CONSDEV_PC
|
||||
\& .
|
||||
(Note1: This feature can be deliberately used for console
|
||||
selection if the BIOS allows to disable serial ports.)
|
||||
(Note2: This works with the
|
||||
.Dq Cd DIRECT_SERIAL
|
||||
option too.)
|
||||
.It Fa CONSDEV_AUTO
|
||||
Auto-select the console. First the serial ports known to the BIOS
|
||||
are probed. If output of a (space) character to the port succeeds,
|
||||
and the conditions described under
|
||||
.Dq Cd COMCONS_KEYPRESS
|
||||
above are fulfilled, the port is used as console. If no serial port
|
||||
.It Dv Em CONSDEV_PC
|
||||
Force use of the standard PC keyboard and display as the console.
|
||||
.It Dv Em CONSDEV_COM0 Li ... Dv Em CONSDEV_COM3
|
||||
Use the serial port with the corresponding BIOS number as the console.
|
||||
No output is attempted to the selected serial port. If the port is not
|
||||
known to the BIOS, it falls back to
|
||||
.Dq Dv CONSDEV_PC .
|
||||
(Note: This feature can be deliberately used for console selection if
|
||||
the serial ports have been disabled in the BIOS.)
|
||||
.It Dv Em CONSDEV_COM0KBD Li ... Dv Em CONSDEV_COM3KBD
|
||||
If the port is known to the BIOS, and output of a character to the port
|
||||
succeeds (and if
|
||||
.Dq Dv DIRECT_SERIAL
|
||||
is defined the RS-232
|
||||
.Dq "modem ready"
|
||||
status is on after the character is output), and the conditions
|
||||
described under
|
||||
.Dq Dv COMCONS_KEYPRESS
|
||||
above are fulfilled, the port is used as console. If the port is not
|
||||
known to the BIOS, it falls back to
|
||||
.Dq Dv CONSDEV_PC .
|
||||
.It Dv Em CONSDEV_AUTO
|
||||
Auto-select the console. All serial ports known to the BIOS are probed
|
||||
in sequence. If output of a character to the port succeeds (and if
|
||||
.Dq Dv DIRECT_SERIAL
|
||||
is defined the RS-232
|
||||
.Dq "modem ready"
|
||||
status is on after the character is output), and the conditions
|
||||
described under
|
||||
.Dq Dv COMCONS_KEYPRESS
|
||||
above are fulfilled, the port is used as console. If no serial port
|
||||
passes the check,
|
||||
.Dq Fa CONSDEV_PC
|
||||
is used. The progress of the selection process is shown at the PC display
|
||||
as digits corresponding to the serial port number currently probed.
|
||||
.Dq Dv CONSDEV_PC
|
||||
is used. The progress of the selection process is shown at the PC
|
||||
display as digits corresponding to the serial port number currently
|
||||
probed.
|
||||
.El
|
||||
|
||||
.\"
|
||||
.Sh FILES
|
||||
.Bl -tag -width xxx
|
||||
.It Pa /src/sys/arch/i386/stand/{bios,dos,net}boot/Makefile
|
||||
.It Pa /src/sys/arch/i386/stand/{bios,dos,net}boot/main.c
|
||||
.Bl -tag -width /sys/arch/i386/stand/{bios,dos,net}boot/Makefile
|
||||
.It Pa /sys/arch/i386/stand/{bios,dos,net}boot/Makefile
|
||||
compile time options for the boot programs.
|
||||
.El
|
||||
|
||||
.\"
|
||||
.Sh SEE ALSO
|
||||
.Xr console 4 ,
|
||||
.Xr boot 8
|
||||
|
||||
.\"
|
||||
.Sh BUGS
|
||||
There is generally no non-volatile storage available on the
|
||||
PC platform. This requires autoselection methods which can
|
||||
be inconvinient and / or unstable in some situations. The selection
|
||||
policy should be adapted to the local hardware configuration, which
|
||||
might require code changes.
|
||||
The value of
|
||||
.Dv SERIAL_POLICY
|
||||
should be settable through a boot configuration option. However
|
||||
traditionally there was no non-volatile storage available on the PC
|
||||
platform. This requires console auto-selection methods which can be
|
||||
inconvenient and / or unstable in some situations. The selection policy
|
||||
should be adapted to the local hardware configuration, which might
|
||||
require code changes. (Some BIOS versions, particularly those used on
|
||||
large servers and in embedded and single-board industrial computers,
|
||||
have integrated support for serial consoles. The boot loader should
|
||||
query for these settings if possible.)
|
||||
.Pp
|
||||
The serial communication parameters (bytesize, parity, stopbits)
|
||||
are not setable. In any case,
|
||||
.Dq 8N1
|
||||
is used.
|
||||
The serial communication parameters (byte-size, parity, stop-bits) are
|
||||
not settable (either at compile time or run time). The default
|
||||
parameters are
|
||||
.Dq "8 N 1" .
|
||||
.Pp
|
||||
The baud rate is not settable when using BIOS I/O. It should be
|
||||
settable at compile time with
|
||||
.Dv Dq CONSPEED
|
||||
just as it is when using
|
||||
.Dv Dq DIRECT_SERIAL .
|
||||
The default speed is 9600 baud (the maximum for BIOS I/O).
|
||||
|
Loading…
Reference in New Issue
Block a user