Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI
This information is Copyright 2009 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
         Serial Port Console Redirection
    1.2. Name of Document Author/Supplier:
         Author:  Daniel Mick
    1.3  Date of This Document:
        21 December, 2009
4. Technical Description

PROBLEM:

x86 platforms have been able for some time to redirect BIOS and early
boot output to a serial port, as has the Solaris kernel; however,
configuration of both is separate, and error-prone.  This has been
unavoidable, because, until recently, there's been no interface to
query the BIOS settings for serial console.

Further, OpenSolaris now tries to enter graphics mode immediately in
Grub, and stay there during kernel boot until Xorg takes over
(so-called "happy face" boot).  This works well on workstations with
VGAs and displays, and not so well on remote servers with serial
consoles (the graphics output is at least garbage to the serial
console, and in worse cases, can wedge the console). 

SOLUTION:

Microsoft has defined an ACPI table to transmit this information called
SPCR (Serial Port Console Redirection).  Many machines support this
table, and its contents are sufficient to allow Grub and the kernel to
match their configuration to the BIOS configuration.  Using this
information, Grub can automatically avoid graphics mode when serial
console is configured, and we can remove the requirement for manual
configuration of serial parameters for the kernel in Grub's menu.lst.

IMPLEMENTATION

Grub has been modified to read and use the information in SPCR.  A new
keyword $CONSOLE is added for use on the kernel$ boot line in menu.lst;
it will expand to properties which select either the appropriate serial
port and mode (for example,
"console=ttya,ttya-mode=19200,8,n,1,-,ttya-ignore-cd=true") or the
normal text or graphics console ("console=text" or "console=graphics")
as the Solaris release requires.  (Currently Nevada uses text,
OpenSolaris uses graphics.)  A typical use in menu.lst would look
like:

kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,$CONSOLE

In addition, a new "spcr" command has been defined, to display the
settings in the SPCR table (if it exists).  This command is useful for
diagnostic purposes.

This requires no change in the kernel to use; however, one file is also
changed in the Solaris system image: /etc/ttydefs, which currently
configures ttymon(1) to force the console to 9600 baud.  It turns out
that if the baud rate setting is removed, ttymon simply uses the
preexisting baud rate without change.  This is exactly what we'd like
for the x86 case, as it means that baud rate choice is done in exactly
one place: the BIOS.  It also allows one fewer configuration step on
SPARC systems, where the ttya-mode variable can be set in OBP, and then
ttydefs will not need change.  (Unfortunately, the SPARC serial drivers
take it upon themselves to initialize the baud rate from settings in
/kernel/drv/options.conf, ignoring ttya-mode, so on SPARC we haven't
yet made it a one-step process...but this does at least remove one step
on SPARC).

SUMMARY OF CHANGE

1) new keyword for use on Grub menu lines '$CONSOLE'
2) new Grub command 'spcr'
3) removal of baud rate from console: line in /etc/ttydefs




6. Resources and Schedule
    6.4. Steering Committee requested information
        6.4.1. Consolidation C-team Name:
                ON
    6.5. ARC review type: FastTrack
    6.6. ARC Exposure: open

Reply via email to