BigAdmin System Administration Portal
Feature Article
Print-friendly VersionPrint-friendly Version

Console Operations for the Solaris OS and OpenBoot Firmware on Sun CMT SPARC Platforms

Hitendra Zhangada, January 2009

Contents:

Introduction

The console operations in this article refer to the traditional system console device in a domain. For the purpose of this article, the domain console is referred to as the host console. System controller (SC) console operations are not covered here and are considered out of scope for this article. Furthermore, the operations defined by this article are what are supported on chip multithreading (CMT) SPARC platforms until further notice.

The console comprises a pair of input and output devices that communicate with the user, for example, a keyboard and a display.

The input and output console devices for any host are set using the following variables. You can set these variables from OpenBoot firmware using the setenv command or from the Solaris OS using the eeprom command.

input-device: Use this variable to set the host console input device.

output-device: Use this variable to set the host console output device.

Note: A soft reset of the domain is necessary for these variable settings to be effective. This can be achieved by either of these commands: reset-all from OpenBoot firmware or reboot from the Solaris OS.

Supported host console devices on most systems are the following:

virtual-console: Accessed using the SC console command. Can be used as both an input device or an output device.

graphics: Graphic interface, accessed using a graphics monitor. Can be used only as an output device.

keyboard: USB keyboard input device, accessed through a USB keyboard. Can be used only as an input device.

Note: OpenBoot firmware does not support USB keyboard hot-plugging. Therefore, the USB keyboard needs to stay connected continuously once it is chosen as the console input device. If the USB keyboard is disconnected for any reason, there is no console input device until the host domain is rebooted.

TTY: Serial port, accessed through a dumb terminal connected to a serial port. Can be used as both an input device and an output device.

After the OpenBoot firmware has finished probing devices, all host console input and output is expected to go through and from the devices set in the previously mentioned variables. The console output through the selected console output device includes the OpenBoot firmware banner, Solaris OS boot messages, Solaris OS panic messages, and debugger output from kernel modular debugger (KMDB).

The OpenBoot firmware device probe ends just prior to the display of the OpenBoot firmware banner. All host console output messages prior to the end of the device probe always go to the virtual-console device.

Graphics output or the USB keyboard might not work as a host console until these devices are probed by the OpenBoot firmware.

The virtual-console device is a virtual device. Hypervisor APIs provide all input and output for the virtual-console device. You access this console device by using the console command on the SC.

Note: Fully virtualized guest domains can use only a virtual console as a console device. See the following sections for details.

Control Domain Console Behavior

On a control or primary domain, you can choose any available host console device as the default input or output device by changing the variables input-device and output-device, respectively, at an OpenBoot firmware ok prompt. You must reset the domain for the changes to become effective for these two variables.

Guest Domain Console Behavior

You cannot use graphics devices as console output or USB keyboards as console input for fully virtualized guest domains. At the time of this writing, Sun does not support virtualization of USB keyboard or graphic devices. But if a guest domain, such as an I/O domain, has physical console devices, you can use those as console input or output devices.

Console Use Cases While in OpenBoot Firmware

1) Prior to Probing Devices

All console messages prior to device probing are displayed in the virtual console.

2) Fallback Device

If the selected input or output device is not available, the OpenBoot firmware falls back to the virtual console as a console for both input and output. In this case, the Solaris OS also uses the same console device that the OpenBoot firmware selected.

3) Solaris OS Boot Messages

The selected console output device displays all Solaris OS boot messages and the login prompt.

4) OpenBoot Firmware reset-all Command

All messages prior to the domain reset are displayed in the selected console output device. All messages after the reset, but prior to the device probe, are displayed on the virtual console. All messages after the device probe are displayed on the selected console output device, if available.

If the selected console output device is not available, all messages are displayed on the virtual console.

Console Use Cases for the Solaris Operating System

When domaining is enabled, OpenBoot firmware services are retired upon starting the Solaris OS. Therefore, when domaining is enabled, you cannot return to the OpenBoot firmware from the Solaris OS without a soft reset.

Domaining is enabled always for all platforms that use Sun UltraSPARC T2 and T2 Plus processors. You cannot disable domaining on these platforms. Therefore, there is no way to go back to the OpenBoot firmware once the domain has booted to the Solaris OS.

For UltraSPARC T1 systems, domaining is disabled only when running in the factory-default configuration; otherwise, it is enabled. All references to domaining being disabled below are applicable only to Sun UltraSPARC T1 platforms and only when they are configured in the factory-default configuration.

Note: There are differences in behavior between the Solaris 10 10/08 OS and releases prior to Solaris 10 10/08 OS. These differences are identified in the following sections. If a difference is not identified, the behavior is the same for all Solaris releases.

1) halt(1M) Command or Equivalent

Control Domain With a Release Prior to the Solaris 10 10/08 OS:

If domaining is enabled, the control domain halts to the following prompt in the Solaris OS:

r)eboot, o)k prompt, h)alt?

Where:

  • r reboots to the Solaris OS.
  • o goes to the OpenBoot firmware ok prompt after a soft reset.
  • h halts the domain. If this is the only domain configured, powers off the domain.

If domaining is disabled, the domain halts to the OpenBoot firmware ok prompt without a soft reset.

Guest Domain With a Release Prior to the Solaris 10 10/08 OS:

The guest domain halts to the OpenBoot firmware ok prompt after the guest domain reset.

Control Domain With Solaris 10 10/08 OS at a Minimum:

If domaining is enabled, the control domain halts to the OpenBoot firmware ok prompt after a soft reset.

If domaining is disabled, the control domain halts to the OpenBoot firmware ok prompt without a soft reset.

Guest Domain With Solaris 10 10/08 OS at a Minimum:

The guest domain halts to the OpenBoot firmware ok prompt after the guest domain reset.

2) The reboot(1M) Command or Equivalent

On the control and guest domains, all messages are displayed in the selected console output device. The domain reboots to the Solaris OS.

3) The poweroff(1M) Command or Equivalent

Control Domain:

All messages are displayed on the selected console output device. The system might power off or reset. The behavior is system and configuration dependent.

Guest Domain:

All messages are displayed on the selected console output device. The guest domain stops.

4) Sending Break (send brk or L1-A)

Debugger Present With a Release Prior to the Solaris 10 10/08 OS:

The domain breaks to debugger prompt. The only supported debugger is KMDB.

Debugger Not Present With a Release Prior to the Solaris 10 10/08 OS:

If domaining is disabled, the domain drops to the OpenBoot firmware ok prompt.

If domaining is enabled, the following prompt is displayed:

c)ontinue, s)ync, r)eboot, h)alt?

Where:

  • c continues back to the Solaris OS.
  • s forces a synchronization, which results in a core dump.
  • r reboots the domain.
  • h halts the domain.

Debugger Present With Solaris 10 10/08 OS at a Minimum:

The domain breaks to the debugger prompt. The only supported debugger is KMDB. For more information, see the Kernel Module Debugger section.

Debugger Not Present With Solaris 10 10/08 OS at a Minimum:

If domaining is disabled, the domain drops to the OpenBoot firmware ok prompt.

If domaining is enabled, the following prompt is displayed:

c)ontinue, s)ync, r)eset?

Where:

  • c continues back to the Solaris OS.
  • s forces a synchronization, which results in a core dump.
  • r resets the domain.

5) Solaris Panic

All panic messages are displayed on the selected console output device. The domain reboots back to the Solaris OS after panic messages are displayed and the core is dumped. This is a normal behavior that is visible to users. (Customers are not expected to set any of the debugging-related variables.) Following are a few exceptions.

Debugger Present:

The domain stops in the debugger. The only supported debugger is KMDB. For more information, see the Kernel Module Debugger section.

Debugger Not Present:

If domaining is disabled and if the /etc/systems variable nopanicdebug equals 0 or forthdebug equals 1, the domain enters OpenBoot firmware without going through soft reset and waits at the ok prompt.

If domaining is enabled and if the /etc/systems variable nopanicdebug equals 0 or forthdebug equals 1, the domain displays one of the following prompts.

With a Release Prior to the Solaris 10 10/08 OS:

c)ontinue, s)ync, r)eboot, h)alt?

Where:

  • c continues back to the Solaris OS.
  • s forces a synchronization, which results in a core dump.
  • r reboots the domain.
  • h halts the domain.

With the Solaris 10 10/08 OS at a Minimum:

c)ontinue, s)ync, r)eset?

Where:

  • c continues back to the Solaris OS.
  • s forces a synchronization, which results in a core dump.
  • r resets the domain.

6) Installation Screens

The selected console device displays the Solaris OS installation messages.

Kernel Module Debugger

You see a change when the $q or ::quit commands are issued. These commands are intended to drop control from KMDB to the OpenBoot firmware. This is true only when domaining is disabled.

For platforms in which domaining always is enabled, returning back to the OpenBoot firmware is not possible, and the $q or ::quit commands do not bring the domain down to the OpenBoot firmware. In these situations, you see one of the following user prompts.

With a Release Prior to the Solaris 10 10/08 OS:

c)ontinue, s)ync, r)eboot, h)alt?

Where:

  • c continues back to the Solaris OS.
  • s forces a synchronization, which results in a core dump.
  • r reboots the domain.
  • h halts the domain.

With the Solaris 10 10/08 OS at a Minimum:

c)ontinue, s)ync, r)eset?

Where:

  • c continues back to the Solaris OS.
  • s forces a synchronization, which results in a core dump.
  • r resets the domain.

Out-of-the-Box Experience

The default console input and output device for all SPARC CMT systems out of the box is the virtual console. For systems using UltraSPARC T2 and T2 Plus processors, domaining is always enabled.

Note: On UltraSPARC T1 systems, domaining is disabled when running in factory-default configuration; otherwise it is enabled. When domaining is disabled and if KMDB is not loaded, the OpenBoot firmware is the debugger. All operations intended to go to debugger go to the OpenBoot firmware unless KMDB is installed. When domaining is enabled, which is always the case for all SPARC CMT platforms starting with UltraSPARC T2 systems, OpenBoot firmware services are retired, and the domain cannot drop down to the OpenBoot firmware prompt.

For More Information

Here are additional resources:


Comments (latest comments first)

Discuss and comment on this resource in the BigAdmin Wiki

Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.


BigAdmin
  
 
BigAdmin Upgrade Hub