|C H A P T E R 1|
This chapter introduces OpenBoot as defined by IEEE Standard 1275-1994., Standard for Boot Firmware. OpenBoot firmware is executed immediately after you turn on your system. The primary tasks of OpenBoot firmware are to:
The OpenBoot architecture provides a significant increase in functionality and portability when compared to proprietary systems of the past. Although this architecture was first implemented by Sun Microsystems as OpenBoot on SPARC systems, its design is processor-independent. The following paragraphs describe some notable features of OpenBoot firmware.
A plug-in device driver is usually loaded from a plug-in device such as an SBus card. The plug-in device driver can be used to boot the operating system from that device or to display text on the device before the operating system has activated its own drivers. This feature enables the input and output devices supported by a particular system to evolve without changing the system PROM.
Plug-in drivers are written in a machine-independent interpreted language called FCode . Each OpenBoot system PROM contains an FCode interpreter. Thus, the same device and driver can be used on machines with different CPU instruction sets.
The device tree is a data structure describing the devices (permanently installed and plug-in) attached to a system. Both the user and the operating system can determine the hardware configuration of the system by inspecting the device tree.
The OpenBoot User Interface is based on the interactive programming language Forth . Sequences of user commands can be combined to form complete programs, and this provides a powerful capability for debugging hardware and software.
The user interface is based on an interactive command interpreter that gives you access to an extensive set of functions for hardware and software development, fault isolation, and debugging. Any level of users can use these functions.
If automatic booting is configured, you can make the system stop at the user interface by pressing the Stop-A keys from the keyboard after the display console banner is displayedbut before the system starts booting the operating system.
When the system hardware detects an error from which it cannot recover (This is known as a Watchdog Reset.)
See A Caution About Using Some OpenBoot Commands for information on using commands after entering OpenBoot from the operating system.
Devices are attached to a host computer through a hierarchy of interconnected buses. OpenBoot 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 host computer's main physical address bus forms the tree's root node.
Children, which are other device nodes "attached" to a given node and that lie directly below it in the device tree
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 in 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). The use of physical addresses to identify devices prevents device addresses from changing when other devices are installed or removed.
OpenBoot 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 in 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:
A human-readable string consisting of one to 31 letters, digits and punctuation characters from the set " , . _ + - " that, ideally, has some mnemonic value. Uppercase and lowercase characters are distinct. In some cases, this name includes the name of the device's manufacturer and the device's model name, separated by a comma. Typically, the manufacturer's upper-case, publicly-listed stock symbol is used as the manufacturer's name (e.g. SUNW,sd ). For built-in devices, the manufacturer's name is usually omitted (e.g. sbus ).
In general, the unit-address part of a node name represents an address in the physical address space of its parent. The exact meaning of a particular address depends on the bus to which the device is attached. Consider this example:
1f,0 represents an address on the main system bus, because the SBus is directly attached to the main system bus in this example.
0,40000 is an SBus slot number (in other words, 0 ) and an offset (in other words, 40000 ), because the esp device is at offset 40000 on the card in SBus slot 0.
3,0 is a SCSI target and logical unit number, because the disk device is attached to a SCSI bus at target 3, logical unit 0.
When specifying a path name, either the @ unit-address or driver-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 there are several matching nodes, the firmware chooses one (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 on the main system bus, making sbus as unambiguous an address as sbus@1f,0 . 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 bus. If there were more than one on the system, using esp alone would not specify which one, and the firmware might not choose the one you intended.
As another example, /sbus/@2,1/sd@3,0 would normally be unambiguous, while /sbus/scsi@2,1/@3,0 usually would not, since both a SCSI disk device driver and a SCSI tape device driver can use the SCSI target, logical unit address 3,0 .
Some implementations also enable you to omit path name components. So long as the omission does not create any ambiguity, those implementations will select the device that you intended. For example, if our example system had only one sd device, /sd:a would identify the same device as the much longer preceding expression.
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 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.)
You can browse the device tree to examine and modify individual device tree nodes. The device tree browsing commands are similar to the Solaris TM commands for changing, displaying and listing the current directory in the Solaris directory tree. Selecting a device node makes it the current node.
|Note - After choosing a device node with dev or find-device, you can't execute that node's methods because dev does not establish the current instance. For a detailed explanation of this issue, refer toWriting FCode 3.x Programs.|
help , without any specifier, displays instructions on how to use 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.
|Note - In some newer systems, descriptions of additional machine-specific commands are available with the help command. Help as described may not be available on all systems.|
OpenBoot may not operate correctly after the operating system has begun execution. (For example, after Stop-a or halt.) This occurs when the operating system can modify the system state in ways that are inconsistent with continued OpenBoot operation. In this case, you may have to power cycle the system to restore normal operation.
For example, suppose you boot the operating system, exit to OpenBoot, then execute the probe-scsi command (described in "Booting and Testing Your System"). You may find that probe-scsi fails, and you may not be able to resume the operating system, or you may have to power cycle the systems.