C H A P T E R  4

 


Firmware

The Netra CP2160 board platform comprises a modular firmware architecture that gives the user latitude in controlling boot initialization. The user can customize initialization and test firmware, even enabling installation of a custom operating system.

This platform also employs the System Management Controller (SMC)--described in Section 5.6, System Management Controller--which controls the CompactPCI interface, System Management and Hot Swap control, and some board hardware. The SMC configuration is controlled by separate firmware.

This chapter contains the following sections:


4.1 Initialization Firmware

Control flow at board startup is shown in FIGURE 4-1. Execution begins in Firmware Common Operations andReset Environment (CORE)--which includes Basic POST (BPOST). It passes to Comprehensive POST (CPOST) and Extended POST (EPOST), if these are present, before returning to firmware CORE and on to OpenBoot PROM.


FIGURE 4-1 Control Flow from Power On for Firmware CORE and Client Modules--Solaris Case

This illustration is a flow diagram that shows the control flow from power on for firmware CORE and client modules in a Solaris case.


4.1.1 Firmware CORE and BPOST

Firmware CORE:

BPOST is integrated into Firmware CORE. BPOST tests are interleaved with the initialization activities of Firmware CORE to present a foundation of validated and initialized hardware to run subsequent code such as that in CPOST or OpenBoot PROM. The tests listed in TABLE 4-1 are examples of CORE and BPOST flow of execution.



Note - Not all of the hardware listed in this table is present on this platform. When a hardware item is not detected by the firmware, this firmware makes no attempt to test or initialize it.



Because BPOST runs from PROM, its extent of testing is limited to that needed by modules that are loaded later. Such a module, for example CPOST, can perform comprehensive testing more quickly because it executes from DRAM.

 

 

TABLE 4-1 Firmware CORE and BPOST Flow of Execution

Firmware CORE Service

Detail

Initialize Processor

Sets processor in stable state

Initialize NVRAM

Sets up state variables

Initialize EBus and bridges

Initializes EBus and UPA/PCI and PCI/PCI bridges in path between CPU and EBus devices

InitializeTTY

For message display

Set memory timings

 

Verify NVRAM

Check magic number. Set defaults if bad

Check keyboard

Probe & initialize keyboard, set TTYA otherwise

Check I/P device for key pressed

Set state variables in NVRAM accordingly

Cache, MMU test

Perform basic diagnostics on caches & MMUs[1]

Initialize caches, MMUs

Setup I and D caches and MMUs

Memory test

Perform partial memory test[2]

Memory probe

Probe memory and clear top memory region

MMU and cache setup

Setup I/D MMUs with valid mappings; enable MMUs and I/D caches

Copy Firmware CORE

Copy Firmware CORE into memory and transfer control to the RAM copy

Setup trap table

Set up trap table in memory

Initialize interrupts

Set up hardware interrupts

Initialize TOD

 

Set up CPU counter

Calibrate CPU counter to determine module speed

Probe PCI bus

Probe for Primary PCI system bus

Execute POST dropin|

 

Locate the client

Locate the client in PROM. If found, copy into memory and transfer control to it

Enter user interface

OpenBoot PROM for Solaris software, else RTOS or custom OS


4.1.2 CPOST and EPOST

CPOST contains tests for higher-level board functions. By placing these tests in a separate module, the user has the option of performing them and the developer can substitute them with other tests. Examples of CPOST tests are:

4.1.3 EPOST

EPOST is used for additional POST code dropins that are provided by the user.

4.1.4 OpenBoot PROM

Rather than executing the initialization code that formerly existed in OpenBoot PROM for prior Sun board platforms, OpenBoot PROM now makes calls to the traps laid down by Firmware CORE. OpenBoot PROM exists in the form of a dropin in the System Flash memory area.

OpenBoot PROM probes for devices and builds the device tree, which is a table that contains entries for how drivers communicate with connected hardware. Each line, or entry, of the device tree is a reference for the node entry for the peripheral in the /dev directory. The device tree is inherited by Solaris software as it is booted. An example of a device tree is shown below. The device tree can be seen by directory in the / directory. The device tree is inherited by Solaris software as it is booted. An example of a device tree is shown below. The device tree can be seen by typing show-devs at the ok prompt. An example of a device tree appears below.

 

 


CODE EXAMPLE 4-1 Example of a show-devs Device Tree
ok show-devs
/SUNW,UltraSPARC-IIe@0,0
/pci@1f,0
/virtual-memory
/memory@0,0
/aliases
/options
/openprom
/chosen
/packages
/pci@1f,0/pci@1
/pci@1f,0/pci@1,1
/pci@1f,0/pci@1/pci@1
/pci@1f,0/pci@1,1/usb@3,3
/pci@1f,0/pci@1,1/network@3,1
/pci@1f,0/pci@1,1/usb@1,3
/pci@1f,0/pci@1,1/network@1,1
/pci@1f,0/pci@1,1/ebus@3
/pci@1f,0/pci@1,1/ebus@1
/pci@1f,0/pci@1,1/usb@3,3/device@3
/pci@1f,0/pci@1,1/ebus@3/sysmgmt@14,600000
/pci@1f,0/pci@1,1/ebus@1/flashprom@10,400000
/pci@1f,0/pci@1,1/ebus@1/su@14,300000
/pci@1f,0/pci@1,1/ebus@1/su@14,320010
/pci@1f,0/pci@1,1/ebus@1/idprom
/pci@1f,0/pci@1,1/ebus@1/eeprom@14,0
/pci@1f,0/pci@1,1/ebus@1/flashprom@10,0
/openprom/client-services
/packages/kbd-translator
/packages/dropins
/packages/SUNW,builtin-drivers
/packages/disk-label
/packages/obp-tftp
/packages/deblocker
/packages/terminal-emulator
ok 

 

OpenBoot PROM also contains aliases for some of the devices shown in the device tree, These aliases can simplify hardware access at the ok prompt, for example:


CODE EXAMPLE 4-2 Aliases for Devices in the Device Tree

ok boot disk1
ok devalias
 
userprom1 
/pci@1f,0/pci@1,1/ebus@1/flashprom@10,400000
hsc                      /pci@1f,0/pci@1,1/ebus@3/sysmgmt@14,600000
dload                    /pci@1f,0/pci@1,1/network@1,1:,
systemprom               /pci@1f,0/pci@1,1/ebus@1/flashprom@10,0
pcic                     /pci@1f,0/pci@1/pci@1
pcib                     /pci@1f,0/pci@1,1
pcia                     /pci@1f,0/pci@1
ebus2                    /pci@1f,0/pci@1,1/ebus@3
ebus                     /pci@1f,0/pci@1,1/ebus@1
net2                     /pci@1f,0/pci@1,1/network@3,1
net                      /pci@1f,0/pci@1,1/network@1,1
ttya                     /pci@1f,0/pci@1,1/ebus@1/su@14,320010
ttyb                     /pci@1f,0/pci@1,1/ebus@1/su@14,300000
ok 
 
hsc                      /pci@1f,0/pci@1,1/ebus@3/sysmgmt@14,600000
dload                    /pci@1f,0/pci@1,1/network@1,1:,
userprom1 
/pci@1f,0/pci@1,1/ebus@1/flashprom@10,400000
systemprom               /pci@1f,0/pci@1,1/ebus@1/flashprom@10,0
pcic                     /pci@1f,0/pci@1/pci@1
pcib                     /pci@1f,0/pci@1,1
pcia                     /pci@1f,0/pci@1
ebus2                    /pci@1f,0/pci@1,1/ebus@3
ebus                     /pci@1f,0/pci@1,1/ebus@1
net2                     /pci@1f,0/pci@1,1/network@3,1
net                      /pci@1f,0/pci@1,1/network@1,1
ttya                     /pci@1f,0/pci@1,1/ebus@1/su@14,320010
ttyb                     /pci@1f,0/pci@1,1/ebus@1/su@14,300000
name                     aliases

 


4.2 Firmware Configuration Variables

This section provides some information on the CORE SRAM variables and the configuration variables. For a battery-less system, such as the Netra CP2160 board, the NVRAM functions as an SRAM. That is, the SRAM stores configuration variables while the system is powered-on, but when the system goes through a power cycle, the system flash retains the variable information and reloads the SRAM at boot-up.

4.2.1 Firmware CORE SRAM Variables

At start up, Firmware CORE defines a set of variables in the SRAM. These provide for controlling initialization and selecting the amount of testing required. These variables determine the following functions. At the CORE interface, type
print-nvram and the fixed offset SRAM variables similar to the following will be displayed on the screen (see TABLE 4-3):



user-interface = 0
run-post       = ff
post-level     = 40
kernel         = FVM
trap-state     = 60
msg-verbosity  = 3 
 

4.2.2 Firmware CORE Execution Control

The key combinations listed in TABLE 4-2 can be used to control the flow of execution at system boot. These key combinations must be pressed at Power-on.

 

TABLE 4-2 Key Sequences

Key combination

Result

Control-P

Skip POST

Control-U

Enter CORE user interface

Control-N

Set default SRAM configuration variables

Control-M

Turn on power on messages


The Netra CP2160 board supports the USB keyboard.

4.2.3 OpenBoot PROM Configuration Variables

Configuration variables are used by the OpenBoot PROM code and are stored in the system flash. The following is a sample of the output when the printenv command is entered at the ok prompt. The setenv command is used to modify the environment variables. The boot process is controlled by several variables. See TABLE 4-4. For values of each variable, refer to the OpenBoot 4.x Command Reference Manual (see Appendix D).


TABLE 4-3 SRAM Configuration Variables

Parameter

Value

Default Value

Description

env-monitor

disabled

disabled

Environment monitoring at OpenBoot PROM (enabled or disabled).

warning-temperature

70

70

Sets the CPU warning temperature

shutdown-temperature

80

80

Sets the CPU shutdown temperature

critical-temperature

75

75

Sets the CPU critical temperature

diag-passes

1

1

 

diag-continue?

0

0

 

diag-targets

4

0

 

diag-verbosity

3

0

 

keyboard-click?

false

false

If true, enable keyboard click

keymap

 

 

Key map for custom keyboard

scsi-initiator-id

7

7

 

#power-cycles

1431655901

no default

Initialized in manufacture

system-board-serial#

 

no default

Initialized in manufacture

system-board-date

 

no default

Initialized in manufacture

ttyb-rts-dtr-off

false

false

If true, OS does not assert DTR and runs on TTYB

ttyb-ignore-cd

true

true

If true, OS ignores TTYB carrier-detect

ttya-rts-dtr-off

false

false

If true, OS does not assert DTR and runs on TTYA

ttya-ignore-cd

true

true

If true, OS ignores TTYA carrier-detect

ttyb-mode

9600,8,n,1,-

9600,8,n,1,-

TTYB (baud, #bits, parity, #stop, handshake)

ttya-mode

9600,8,n,1,-

9600,8,n,1,-

TTYA (baud, #bits, parity, #stop, handshake)

cpci-probe-list

0,1,2,3,4,5,6,7,8,9,a,b,..

0,1,2,3,4,5,6,7,8,9,a,b,..

Probe list for devices present on cPCI bus

pcia-probe-list

1

1

Probe list for devices present on internal PCI bus A

pcib-probe-list

1,2,3,4

1,2,3,4

Probe list for devices present on internal PCI bus B

mfg-mode

off

off

manufacturing test mode (leave off)

diag-level

max

max

Level of diagnostics to run (min or max)

watchdog-timeout

65535

65535

 

watchdog-enable?

false

false

 

fcode-debug?

false

false

 

output-device

screen

screen

Console output device (usually screen, ttya or ttyb)

input-device

keyboard

keyboard

Console input device (usually screen, ttya or ttyb)

load-base

16384

16384

Base address where client image is loaded by OpenBoot PROM

auto-boot-retry?

false

false

 

boot-command

boot

boot

Command that is executed if auto-boot? is true

auto-boot?

false

true

If true, boot automatically after power-on reset

watchdog-reboot?

false

false

If true, reboot after watchdog reset

diag-file

 

 

File from which to boot in diagnostic mode

diag-device

net

net

Device from which to boot

boot-file

 

 

File to boot (an empty string lets secondary boot choose default)

boot-device

disk net

disk net

Device from which to boot

local-mac-address?

false

false

If true, local-mac-address is used; else, whwtem-wide mac-address is used when booting over any network interface in this system

net-timeout

0

0

 

ansi-terminal?

true

true

Not applicable

screen-#columns

80

80

Screen width in columns

screen-#rows

34

34

Screen height in rows

silent-mode?

false

false

If true, suppress messages related to clearing memory

use-nvramrc?

false

false

If true, execute commands in NVRAMRC during system start-up

nvramrc

"ebus2" select-dev 000...

 

Contents of NVRAMRC

security-mode

none

no default

Firmware security level (none, command or full)

none: no password required (default) command: all commands except for boot and go require password

full: all commands except for go require password

security-password

 

no default

Firmware security password (never displayed)

security-#badlogins

0

no default

OpenBoot PROM internal use

oem-logo

 

no default

Byte array custom OEM logo (enabled by oem logo? true); displayed in hex

oem-logo?

false

false

If true, use custom OEM logo, else use Sun logo

oem-banner

 

no default

Custom OEM banner (enabled by oem-logo? true)

oem-banner?

false

false

If true, use custom OEM banner

hardware-revision

UUUUUUUU...

no default

Initialized in manufacture

last-hardware-update

UUUUUUUU...

no default

Initialized in manufacture

diag-switch?

true

false

If true, POST is executed when system is next powered

auto-config-save?

true

true

If true, NVRAM configuration variables are saved in flash

post-on-sir?

false

false

If true, execute post on softreset

probe-delay?

30

30

Defines number of seconds for which the host board waits before probing CPCI bus

front-phy?

true

true

If true, the board is recognized as a front-access system. If false, the board is recognized as a rear access system.




Note - All numbers are HEX numbers.



The diag-switch? and diag-level variables listed in TABLE 4-3 affect the path through the various embedded tests. TABLE 4-4 shows the effect of setting these variables.

BPOST is embedded within Firmware CORE and is executed when the OpenBoot PROM environment variable, diag-switch? is set to true and diag-level set to min. Similarly CPOST (and EPOST if it is present) is executed when diag-level is set to max. The permutations are shown in TABLE 4-4.

 

TABLE 4-4 OpenBoot PROM Environment Variable Settings for Executing the POST Modules

Module

diag-switch?[3] set:

diag-level* set:

Description

BPOST

false

X

NO messages are output to TTY

true

min (0x20)

 

true

off (0x0)

Messages are output to TTY

CPOST

false

X

No messages are output to TTY

true

max (0x40)

Runs after BPOST

true

off (0x0)

Messages are output to TTY

EPOST

false

X

No messages are output to TTY

true

max (0x40)

Runs automatically after CPOST (if EPOST module is present)

true

off (0x0)

Messages are output to TTY



4.3 Firmware Memory Map

The satellite host board boots from the 1MB system flash PROM device which contains the Firmware CORE, Basic POST code, Comprehensive POST, and OpenBoot PROM. The contents map of this PROM is shown in FIGURE 4-2. User-developed code can also be programmed into the user flash memory space in the form of dropins. The system flash may be upgraded by running a program out of OpenBoot PROM--see Section 4.7, SMC Firmware. It is not otherwise accessible by the user.


FIGURE 4-2 System Flash PROM Map

This is a diagram of a system flash PROM map.



4.4 Firmware CORE Features

TABLE 4-5 lists the firmware CORE Commands that are run from the monitor. At the key sequence Control-U mode (see TABLE 4-2), you may type help to get all the supported commands such as in the example shown below.

 


TABLE 4-5 Monitor Commands CORE

Description of Task

CORE Monitor Command

To get this help

help

To allocate memory buffer

malloc <size>

To free memory buffer

free <addr>

To block copy memory

bcopy <src> <dest> <#bytes>

To dump memory

dump <addr> <#bytes> [asi]

To read an address

[safe-]peek <addr> <1|2|4|8> [asi]

To write to an address

poke <addr> <1|2|4|8> <data> [asi]

To update Flash PROM

flash-update <dev> <file-path>

To load a file

load <device> <file-path> <addr>

Jump to an address

go <addr>

Execute client

execute [client-name]

Print NVRAM data

print-nvram

Write to NVRAM variable

set-nvram <variable-name|ID> <data>

Read an NVRAM variable

get-nvram <variable-name|ID>

Delete an NVRAM variable

delete-nvram <ID>

Set NVRAM vars to default

set-defaults

Call a trap function

trap <trap#> <par0> ... <par5>

Soft Reset

reset

To change input device

input-device <tty|kbd>

To initialize PCI

init-pci

To show all pci devices

show-pci-devs

To show pci config space

show-pci-space <bus#> <device#> <function#> <offset>

To show pci nexus nodes

show-nexus-nodes

To remove a pci device

rm-pci-dev <device#>

To add a pci device

add-pci-dev <device#>

To remove all pci devices

rm-pci-devs

To add all pci devices

add-pci-devs

To execute UI cmd in loop

loop <count> <command>




Note - All numbers are HEX numbers




4.5 USB Keyboard Support

The Netra CP2160 board supports USB keyboard only.


4.6 ASM Support at OpenBoot PROM

Advanced System Monitoring (ASM) is an intelligent fault detection system to increase uptime and manageability at OpenBoot PROM. The SMC module on the Netra CP2160 board, supports the temperature monitoring functions of ASM. ASM monitors the following at regular intervals at the ok prompt:

4.6.1 CPU Heat Sink Thermal Sensor

At the OpenBoot PROM level, when an over-temperature condition occurs, corresponding messages are displayed on the console. OpenBoot PROM displays the warning messages as soon as the board temperature reaches the warning temperature and is still below the shutdown temperature. The shutdown messages are displayed as soon as the board temperature reaches the shutdown temperature. The warning-temperature and shutdown-temperature are maintained in the SRAM for the Netra CP2160 board (for warning and shutdown temperature values, see TABLE 4-3). Also, the show-sensor command at OpenBoot PROM displays the readings of all the temperature sensors on the board.

When the CPU temperature reaches the set warning temperature limit, the following message is displayed at the ok prompt at regular intervals


<<< !!! ALERT!!! Upper Non-critical - going high >>> 
     The current threshold setting is:  < >
     The current temperature is      : < >

When the CPU temperature reaches the set shutdown temperature limit, the following message is displayed at the ok prompt at regular intervals::


<<< !!! ALERT!!! Upper Critical - going high >>> 
     The current threshold setting is:  < >
     The current temperature is      : < >

The warning and shutdown temperature values provided are the OpenBoot PROM default values. A user can change these values by changing the corresponding SRAM variable values and resetting the system hardware or software.


ok setenv warning-temperature  <new_value>
ok setenv shutdown-temperature <new_value>
ok setenv critical-temperature <new_value>
ok reset-all

The <new_value> is a decimal value for a new temperature limit. The OpenBoot PROM then uses the new temperature limits after the system reset.



caution icon

Caution - Be careful when setting the temperature parameters. Setting the warning-temperature and shutdown-temperature values too high will leave the system unprotected against overheating. Setting the temperature too low may cause the Netra CP2160 board to send error messages continuously.



4.6.2 PCI_RESET# Polling on the Satellite Board

The ASM also provides PCI-RESET# polling. ASM checks the status of the PCI_RESET# on the system board and enables the satellite board to respond accordingly. For example, a hot-swap cPCI chassis containing a system host board and a few Netra CP2160 satellite boards that are all at the ok prompt: If the PCI_RESET# is reasserted by the system board, then the assertion is polled by the SMC on the satellite boards. The satellite board then does an automatic reset-all on itself.


4.7 SMC Firmware

The field upgradeable SMC firmware supports features such as Netra CP2160 board resources, temperature monitoring, control of the power module, IPMI communication with other boards, PCI reset modes of operation, hot-swap capability and watchdog timer heartbeat mechanism. The SMC firmware also has its own built-in self test at power up. The SMC consists of DS80CH11, which is an 8051 compatible chip and the WS833, the memory chip. Inside WS833, there are the main flash and the boot flash and SRAM for data storage. The host CPU sends commands and data to SMC via the EBus. For more details on the SMC subsystem please see Section 5.6, System Management Controller.

The SMC architecture allows the update of the SMC firmware. SMC firmware is only updated from the OpenBoot PROM. This feature is used to modify SMC firmware during a field upgrade, for fixing bugs, adding enhancements/new features, or providing special code for a specific OEM customer.

The SMC is capable of performing a flash update on both, main and boot flash. The main flash can flash update the boot flash, and the boot flash can flash update the main flash. The boot code contains the bare minimum code to be able to let the system boot to ok prompt in the event of the main flash failure, and be able to switch from boot flash to main flash for execution. Therefore any attempt to perform flash update to the boot flash is considered risky and should not be done too often.

The CORE/OpenBoot PROM code has support for recovery in case of SMC flash update failure. When it detects that SMC is running from boot code, it automatically goes to the ok prompt, and the user can do a flash update. Any other commands sent to SMC will not be allowed at this time.

For full details on SMC firmware and detailed commands, please refer to the Netra CP2160 board web site:

http://www.sun.com/products-n-solutions/nep/hardware/boards/cp2160/



Note - Due to interdependency between OpenBoot PROM CORE, SMC and hardware, the user must take into account compatibility between various parts of the system among different version numbers when performing flash update. Please refer to the release note at the product web site for the latest information and compatibility between firmware and hardware components.



4.7.1 SMC Firmware Reset Modes for System Slot and Peripheral Slot Operations

This section provides information on the various modes of reset available on the Netra CP2160 board when used in the different roles and CompactPCI slots. TABLE 4-6 describes the available modes of operation in response to a reset request on the CompactPCI backplane. Determination of system or peripheral/satellite operation is made from the state of the cPCI backplane SYSEN# signal as per the PICMG 2.0 R3.0 Specification. The RESET# signal affects only the PCI component of the cPCI bus. Please refer to the Netra CP2160 board web site for detailed information on reset modes:

http://www.sun.com/products-n-solutions/nep/hardware/boards/cp2160/

 


TABLE 4-6 Reset Operating Modes

Reset Mode

System Slot

Periperal / Satellite Slot

11

Standard system slot operation -- the board generates normal RESET# and PCI signalling for the backplane in its role as system controller

Backplane reset is propagated to the UltraSPARC-IIi 21555 NTB and other reset table components on the board. This results in a complete reset of the UltraSPARC section of the board.

22

Standalone mode - The board asserts a constant RESET# but no PCI clocking for the cPCI bus, and does not respond to any PCI signalling on the backplane

Standalone mode - The local cPCI bridge is held in reset, isolated from the cPCI bus. the board does not respond to any PCI signalling on the cPCI bus.

66[4]

Standard system slot operation -- the board generates normal RESET# and PCI signalling for the backplane in its role as system controller

Standalone mode - The local cPCI bridge is held in reset, isolated from the cPCI bus. The board does not respond to any PCI signalling on the cPCI bus.


Users may reprogram the operating mode from the OpenBoot PROM prompt, then reboot (power cycle) the entire system in order for the new reset modes to take effect.



Caution - Some of these modes may be incompatible with various PICMG specifications, and customers may use these modes at their own risk.



4.7.2 SMC Configuration Block

The SMC power-on behavior and other attributes are stored in an 16-byte configuration block. This configuration block is stored in an accessible Serial I2C EEPROM. In the absence of this configuration block, SMC boots up in a default mode. For this purpose, at the OpenBoot PROM level there are two commands: setsmcenv and printsmcenv in the SMC node. The setsmcenv command is used to set paramters in the configuration block of SMC. The printsmcenv command prints the value of the parameters in the SMC configuration block.

4.7.2.1 Command Usage Detail

To change the settings on the configuration block, read the block using the printsmcenv command. If you want to change the settings, use the setsmcenv command to change the SEEPROM configuration block. Some examples are given below:

Example:



ok printsmcenv
config-version      : 4 
backplane-type      : 1 
reset-mode          : 66 
sir-xir-enable      : 2 
byte5               : 0 
chassis-type        : 0 
flash-device        : 0 
byte8               : 0 
ha-signal-handler   : 0 
poweron-vector      : 0 
ipmi-checksum-ctlr  : 0 
byteC               : 0 
byteD               : 0 
byteE               : 0 
byteF               : 0 
byte10              : 0 
ok setsmcenv reset-mode 66
ok setsmcenv backplane-type 1

 



Note - Each setting on the configuration block can change the behavior of the board significantly. For further information on how to change the settings, contact your local Sun support team. Please refer to Netra CP2160 CompactPCI Board Product (P/N 816-5761).



During OpenBoot PROM start up sequence, and before the PCI probe, OpenBoot PROM checks for a valid SMC configuration block. If it does not find a valid configuration block (i.e configuration version is not equal to 1), then OpenBoot PROM instructs the SMC to program the configuration block with the following default settings:



Config version:   1
Backplane info:   0
Reset mode:       66
SIR & XIR:        2
Health control:   0
Health status:    0
byte 7:           0
byte 8:           0


4.8 Firmware Diagnostics

The firmware contains a comprehensive set of hardware diagnostic modules that provide tests for most situations. FIGURE 4-1 shows the control-flow relationship of the diagnostic modules with the system firmware. SunVTS can be executed from within the Solaris software if more tests are required. For more information, see Section 3.7.2, Downloading and Installing SunVTS.

The firmware diagnostic modules are:

The firmware diagnostics cover address and data bits on all system buses and exercise the function of the major hardware resources on the board.

Diagnostics can be performed at OpenBoot PROM level by using the obdiag command, or by typing individual test commands at the ok prompt. These test suites are similar to those in earlier OpenBoot PROM versions but they are comprised of dropins that can be placed by the user. See the reference to the OpenBoot 4.x Command Reference Manual listed in Appendix D.

4.8.1 Setting Diagnostic Levels

The user interface in terms of running POST at minimum or maximum remains the same. BPOST is embedded within Firmware CORE and is executed when the OpenBoot PROM environment variable, diag-switch is set to true and diag- level set to min. Similarly, CPOST (and EPOST if it is present) is executed when diag-level is set to max. The permutations are shown in TABLE 4-4.

CPOST and Extended POST are clients of Firmware CORE.

4.8.2 Basic POST (BPOST)

BPOST is integrated into Firmware CORE. It can provide on-demand diagnostic services in response to IPMI requests from the System Management Bus.


FIGURE 4-3 Basic POST Services

This is a diagram showing the flow of on-demand diagnostic services in response to IPMI requests from the Sun Management Bus.


BPOST consists of two parts:

The first part of BPOST executes from flash memory. It is designed to validate enough of the system resources to be able to run Firmware CORE in main memory (System RAM). If this test phase is passed, BPOST is also copied into system RAM. BPOST runs when the diag-switch? is set to true (see TABLE 4-4).

The part of BPOST executed from flash includes basic tests for the following:

The second part of BPOST is performed after Firmware CORE is copied into main RAM. This part of BASIC POST executed from RAM includes:

4.8.3 Comprehensive POST (CPOST)

Comprehensive POST (CPOST) is a client of Firmware CORE. It is a dropin module invoked by Firmware CORE and contains enhanced diagnostics for the CPU and on-board devices.

The execution of CPOST is optional and can be selectively controlled by an environment variable--see TABLE 4-4. CPOST runs after BPOST. To run CPOST, set the environment variables diag-switch? to true and diag-level set to max

CPOST tests comprise:

After CPOST it undergoes a software reset which sends it back to Firmware CORE. From this point, execution enters OpenBoot PROM (since diagnostics are only executed at power on reset).

4.8.4 OpenBoot PROM On-Board Diagnostics

The OpenBoot PROM on-board diagnostics reside in the OpenBoot PROM dropin. These diagnostics are described fully in the OpenBoot 3.x Command Reference Manual--see Appendix D.

To execute the OpenBoot PROM on-board diagnostics, the system must be at the ok prompt. The OpenBoot PROM on-board diagnostics comprise:

4.8.5 OpenBoot Diagnostics

The OpenBoot Diagnostics are an enhancement of the traditional system tests. They reside in Forth script in a dropin and are invoked with an interactive tool that is started from the ok prompt by typing obdiag.

When OpenBoot Diagnostics is started, the following menu is displayed:


ok obdiag

1 ebus@1

4 flashprom@10,400000

7 usb@1,3

2 ebus@3

5 network@1,1

8 usb@3,3

3 flashprom@10,0

6 network@3,1

Commands: test test-all except help what printenvs setenv versions exit


When at the obdiag prompt, typing test-all would display a printout similar to the following:



obdiag> test-all
Hit the spacebar to interrupt testing
Testing /pci@1f,0/pci@1,1/ebus@1...................................... passed
Testing /pci@1f,0/pci@1,1/ebus@3 ..................................... passed
Testing /pci@1f,0/pci@1,1/ebus@1/flashprom@10,0 ...................... passed
Testing /pci@1f,0/pci@1,1/ebus@1/flashprom@10,400000 ................. passed
Testing /pci@1f,0/pci@1,1/network@1,1 ................................ passed
Testing /pci@1f,0/pci@1,1/network@3,1 ................................ passed
Testing /pci@1f,0/pci@1,1/usb@1,3 .................................... passed
Testing /pci@1f,0/pci@1,1/usb@3,3
 


1 (TableFootnote) Execute if hardware power-on, run-post set to true, post-level set to min/max and key to skip post not pressed
2 (TableFootnote) Execute if h/w power-on, run-post set to true, post-level set to max and key to skip post not pressed
3 (TableFootnote) Firmware CORE variables run-post and post-level are equivalent to env. variables diag-switch? and diag-level respectively.
4 (TableFootnote) Reset Mode 66 is the default setting for the Netra CP2160 boards.