C H A P T E R 1


This chapter introduces the OpenBoot firmware, the standard firmware for Sun systems.

The OpenBoot Version 1 firmware was introduced on the Sun SPARCstation 1. It also was the firmware for the SPARCstation 1+, SPARCstation IPC, and SPARCstation SLC systems. This manual describes Version 2 of the firmware, which first appeared on the SPARCstation 2 system.

The OpenBoot firmware is stored in the boot PROM (programmable read-only memory) of a system so that it is executed immediately after you turn on your system. The primary task of the OpenBoot firmware is to boot the operating system from either a mass storage device or from a network. The firmware also provides extensive features for testing hardware and software interactively.

OpenBoot Features

The OpenBoot architecture provides a significant increase in functionality over the boot PROMs in earlier Sun systems. Although this architecture was first implemented on SPARC systems, its design is processor-independent. Some notable features of the OpenBoot firmware include:

The User Interface

You can enter the OpenBoot environment in the following ways:

The OpenBoot firmware provides three external interfaces: an interface for the operating system or other standalone programs, an interface for expansion bus plug-in boards (for example, SBus), and a command line interface for the user at the system console. This manual describes the third of these interfaces: the system console command line interface.

The command line interface has two modes:

The Restricted Monitor

The Restricted Monitor provides a simple set of commands to initiate booting of the system, resume system execution, or enter the Forth Monitor. The Restricted Monitor is also used to implement system security. (See Chapter 3 , for information on system security.)

The Restricted Monitor prompt is > . When you enter the Restricted Monitor, the following screen is displayed:

Type b (boot), c (continue), or n (new command mode)

The Restricted Monitor commands are summarized in the following table.

TABLE 1-1 Restricted Monitor Commands



b [ specifiers ]

Boot the operating system.


Resume the execution of a halted program.


Enter the Forth Monitor.

The Forth Monitor

The Restricted Monitor functions b (for booting the system) and c (for resuming execution of a halted program) are available as the boot (see Chapter 2 ) and go (see Chapter 5 ) commands, respectively, in the Forth Monitor.

The Forth Monitor is an interactive command interpreter that gives you access to an extensive set of functions for hardware and software development, fault isolation, and debugging. A variety of system users, from end-users to system administrators to system developers, can use these functions.

The Forth Monitor prompt is ok . When you enter the Forth Monitor, the following screen is displayed:

Type help for more information

The Default Mode

The default mode in early OpenBoot systems is the Restricted Monitor. This was done mainly to provide a default look and feel similar to pre-OpenBoot systems.

The SPARCserver 690 system was the first to have the Forth Monitor as the default mode. All systems introduced thereafter also default to this mode. For such systems, the Restricted Monitor's only real function is to support system security. ( Chapter 3 , discusses system security.)

If you want to leave the Forth Monitor and get into the Restricted Monitor, type:

ok old-mode 

The Device Tree

Devices are attached to a SPARC-based system on a set of interconnected buses. The OpenBoot firmware represents the interconnected buses and their attached devices as a tree of nodes. Such a tree is called the device tree. A node representing the whole machine forms the tree's root node.

Each device node can have:

Nodes with children usually represent buses and their associated controllers, if any. Each such node defines a physical address space that distinguishes the devices connected to the node from one another. Each child of that node is assigned a physical address within the parent's address space.

The physical address generally represents a physical characteristic unique to the device (such as the bus address or the slot number where the device is installed). This prevents device addresses from changing when another device is installed in the system.

Device Path Names, Addresses, and Arguments

The firmware deals directly with hardware devices in the system. Each device has a unique name representing the type of device and where that device is located within the system addressing structure. The following example shows a full device path name:


A full device path name is a series of node names separated by slashes ( / ). The root of the tree is the machine node, which is not named explicitly but is indicated by a leading slash ( / ). Each node name has the form:

name@address : arguments

The following table describes each of these parameters.

TABLE 1-2 Device Path Name Parameters

Path Name Parameter



A text string that, ideally, has some mnemonic value. (For example, sd represents "SCSI disk".) Many names, especially names of plug-in modules, include the name or stock symbol of the device's manufacturer (for example, SUNW,esp ).


Must precede the address parameter.


A text string representing an address, usually of the form hex_number , hex_number . (Numbers are given in hexadecimal format.)


Must precede the arguments parameter.


A text string, whose format depends on the particular device. It can be used to pass additional information to the device's software.

The full device path name mimics the hardware addressing used by the system to distinguish between different devices. Thus, you can specify a particular device without ambiguity.

In general, the address part of a node name represents an address in the address space of its parent. The exact meaning of a particular address depends on the bus to which the device is attached. Consider the same example:


When specifying a path name, either the @address or name part of a node name is optional, in which case the firmware tries to pick the device that best matches the given name. If more than one equally-good selection exists, the firmware makes a selection (but it may not be the one you want).

For example, using /sbus/esp@0,40000/sd@3,0 assumes that the system in question has exactly one SBus interface on the main system bus, making sbus as unambiguous an address as sbus@1,f8000000 . On the same system, however, /sbus/esp/sd@3,0 might or might not be ambiguous. Since SBus accepts plug-in cards, there could be more than one esp device on the same SBus. If there were more than one on the system, using esp alone would not specify which one, and the firmware might not select the one you intended.

As another example, /sbus/@0,40000/sd@3,0 would normally be acceptable while /sbus/esp@0,40000/@3,0 usually would not, since both a SCSI disk device driver ( sd ) and a SCSI tape device driver ( st ) can use the SCSI target,logical unit address 3,0 .

The :arguments part of the node name is also optional. Once again, in the example:


the argument for the sd device is the string a . The software driver for sd interprets its argument as a disk partition, so the device path name refers to partition a on that disk.

Device Aliases

There are two kinds of device names:

A device alias, or simply, alias, is a way of representing a device path name. An alias represents an entire device path name, not a component of it . For example, the alias disk may represent the device path name:


Systems have predefined device aliases for most commonly-used devices, so you rarely need to type a full device path name.

The following table describes the devalias command, which is used to examine, create, and change aliases.

TABLE 1-3 Examining and Creating Device Aliases




Display all current device aliases.

devalias alias

Display the device path name corresponding to alias .

devalias alias device-path

Define an alias representing device path .
If an alias with the same name already exists, the new value supersedes the old.

User-defined aliases are lost after a system reset or power cycle. If you want to create permanent aliases, you can either manually store the output of the devalias command in a portion of non-volatile RAM (NVRAM) called NVRAMRC, or use the nvalias and nvunalias commands. (See Chapter 3 , for more details.)

Displaying the Device Tree

You can browse the device tree to examine and modify individual device tree nodes. The device tree browsing commands are similar to the UNIX® commands for changing the working directory within the UNIX directory tree. Selecting a device node makes it the current node.

Examine the device tree with the commands shown in the following table.

TABLE 1-4 Commands for Browsing the Device Tree




Display the names and values of the current node's properties.

cd device-path

Select the indicated device node, making it the current node.

cd node-name

Search for a node with the given name in the subtree below the current node, and select the first such node found.

cd ..

Select the device node that is the parent of the current node.

cd /

Select the root machine node.


De-select the current device node, leaving no node selected.


Display the names of the current node's children.


Display the device path name that names the current node.

show-devs [ device-path ]

Display all the devices known to the system directly beneath a given level in the device hierarchy. show-devs used by itself shows the entire device tree.


Display the names of the current node's methods.

If you have been browsing the device tree, and want to reset the system, type:

ok device-end 
ok reset 

The following example shows the use of .attributes :

ok cd /zs@1,f0000000 
ok .attributes 
address               ffee9000 
device_type           serial 
slave                 00000001 
intr                  0000000c  00000000 
interrupts            0000000c 
reg                   00000001  f0000000  00000008 
name                  zs

show-devs lists all the devices in the OpenBoot device tree, as shown in the following example:

ok show-devs 

The following is an example of the use of words :

ok cd /zs 
ok words 
selftest        ring-bell      read           remove-abort?  
install-abort   close          open           abort?         restore 
clear           reset          initkbdmouse   keyboard-addr  mouse 
1200baud        setbaud        initport       port-addr 

Getting Help

Whenever you see the ok prompt on the display, you can ask the system for help by typing one of the help commands shown in the following table.

TABLE 1-5 Help Commands




List main help categories.

help category

Show help for all commands in the category. Use only the first word of the category description.

help command

Show help for individual command (where available).

help , without any specifier, displays instructions about using the help system and lists the available help categories. Because of the large number of commands, help is available only for commands that are used frequently.

If you want to see the help messages for all the commands in a selected category, or, possibly, a list of sub-categories, type:

ok help category 

If you want help for a specific command, type:

ok help command 

For example, when you ask for information on the dump command, you see the following message:

ok help dump
Category: Memory access
dump ( addr length -- ) display memory at addr for length bytes

The above help message first shows that dump is a command from the Memory access category. The message also shows the format of the command.

Note - In some newer systems, descriptions of additional machine-specific commands are available with the help command.

A Caution About Using Some OpenBoot Commands

If you boot the operating system, exit it with either the Stop-A or halt commands, and then use some OpenBoot commands, the commands might not work as expected.

For example, suppose you boot the operating system, exit it with Stop-A , then execute the probe-scsi command. You may find that probe-scsi fails, and you may not be able to resume the operating system. When this happens, type the following commands:

ok sync 
ok boot 

To re-execute an OpenBoot command which fails because the operating system has halted, reset the system, then invoke the command, as shown:

ok reset 
ok probe-scsi 

Copyright © 2001, Sun Microsystems, Inc. All rights reserved.