monitor(1M) Maintenance Commands monitor(1M) NAME monitor - SPARC system PROM monitor SYNOPSIS L1-A BREAK initial system power-on exit from a client program, e.g., the Operating System AVAILABILITY SPARC DESCRIPTION The CPU board of a workstation contains one or more EPROMs or EEPROMs. The program which executes from the PROMs is referred to as "the monitor". Among other things, the moni- tor performs system initialization at power-on and provides a user interface. Monitor Prompt The monitor of earlier workstations was known as the SunMON monitor and displayed the > for its prompt. See the SunMON MONITOR USAGE section for further details. Existing workstations use a monitor which is known as the OpenBoot monitor. The OpenBoot monitor typically displays ok as its prompt, but it may also display the > prompt under certain circumstances. If the 'auto-boot?' NVRAM parameter is set to 'false' when the workstation is powered on then the system will not attempt to boot and the monitor will issue its prompt. If 'auto-boot' is set to 'true' then the system will initiate the boot sequence. The boot sequence can be aborted by simultaneously pressing two keys on the system's keyboard: L1 and A (on older keyboards), or Stop and A (on newer key- boards). Note that either a lower case 'a' or an upper case 'A' will work for the keyboard abort sequence. If a console has been attached via one of the system's serial ports then the abort sequence can be accomplished by sending a BREAK - see the tip(1) manpage. When the NVRAM 'security-mode' parameter has been turned on, or when the value of the 'sunmon-compat?' parameter is true, then the OpenBoot monitor will display the message: Type b (boot), c (continue), or n (new command mode) and the > prompt will appear. OPENBOOT PROM USAGE SunOS 5.5.1 Last change: 14 Dec 1994 1 monitor(1M) Maintenance Commands monitor(1M) Some of the more useful commands that can be issued from OpenBoot's ok prompt are described here. Refer to the _O_p_e_n_- _B_o_o_t _2._x _C_o_m_m_a_n_d _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l book for a complete list of commands. Help Help for various functional areas of the OpenBoot monitor can be obtained by typing help. The help listing will pro- vide a number of other key words which can then be used in the help command to provide further details. NVRAM Parameters Each workstation contains one or more NVRAM devices which contains unique system ID information, as well as a set of user-configurable parameters. The NVRAM parameters allow the user a certain level of flexibility in configuring the system to act in a given manner under a specific set of cir- cumstances. See the eeprom(1M) manpage for a description of the parame- ters. This manpage also describes a way of setting the parameters from the OS level. The following commands can be used at the OpenBoot monitor to access the NVRAM parameters. printenv Used to list the NVRAM parameters, along with their default values and current values. setenv _p_n _p_v Used to set or modify a parameter. The _p_n represents the parameter name, and _p_v represents the parameter value. set-default _p_n Used to set an individual parameter back to its default value. set-defaults Used to reset all parameters to their default values. (Note that 'set- defaults' only affects parameters that have assigned default values.) Hardware Checks and Diagnostics The following commands are available for testing or checking the system's hardware. If the 'diag-switch?' NVRAM parame- ter is set to true when the system is powered on, then a Power-On Self Test (POST) diagnostic will be run, if present, sending its results messages to the system's serial port A. Not all of the commands shown are available on all workstations. test-all Run the diagnostic tests on each device SunOS 5.5.1 Last change: 14 Dec 1994 2 monitor(1M) Maintenance Commands monitor(1M) which has provided a self-test. test floppy Run diagnostics on the system's floppy device. test /memory Run the main memory tests. If the NVRAM parameter 'diag-switch?' is set to true, then all of main memory is tested. If the parameter is false then only the amount of memory specified in the 'selftest-#megs' NVRAM parameter will be tested. test net Test the network connection for the on- board network controller. watch-net Monitor the network attached to the on- board net controller. watch-net-all Monitor the network attached to the on- board net controller, as well as the network controllers installed in SBus slots. watch-clock Test the system's clock function. System Information The following commands are available for displaying informa- tion about the system. Not all commands are available on all workstations. banner Display the power-on banner. .enet-addr Display the system's Ethernet address. .idprom Display the formatted contents of the IDPROM. module-info Display information about the system's processor(s). probe-scsi Identify the devices attached to the on-board SCSI controller. probe-scsi-all Identify the devices attached to the on-board SCSI controller as well as those devices which are attached to SBus SCSI controllers. show-disks Display a list of the device paths for installed SCSI disk controllers. show-displays Display a list of the device paths for installed display devices. show-nets Display a list of the device paths for installed Ethernet controllers. show-sbus Display list of installed SBus devices. show-tapes Display a list of the device paths for installed SCSI tape controllers. SunOS 5.5.1 Last change: 14 Dec 1994 3 monitor(1M) Maintenance Commands monitor(1M) show-ttys Display a list of the device paths for tty devices. .traps Display a list of the SPARC trap types. .version Display the version and date of the OpenBoot PROM. Emergency Commands These commands must be typed from the keyboard, they will not work from a console which is attached via the serial ports. With the exception of the Stop-A command, these com- mands are issued by pressing and holding down the indicated keys on the keyboard immediately after the system has been powered on. The keys must be held down until the monitor has checked their status. The Stop-A command can be issued at any time after the console display begins, and the keys do not need to be held down once they've been pressed. The Stop-D, Stop-F and Stop-N commands are not allowed when one of the security modes has been set. Not all commands are available on all workstations. Stop (L1) Bypass the Power-On Self Test (POST). This is only effective if the system has been placed into the diagnostic mode. Stop-A (L1-A) Abort the current operation and return to the monitor's default prompt. Stop-D (L1-D) Set the system's 'diag-switch?' NVRAM parameter to 'true', which places the system in diagnostic mode. POST diag- nostics, if present, will be run, and the messages will be displayed via the system's serial port A. Stop-F (L1-F) Enter the OpenBoot monitor before the monitor has probed the system for dev- ices. Issue the 'fexit' command to con- tinue with system initialization. Stop-N (L1-N) Causes the NVRAM parameters to be reset to their default values. Note that not all parameters have default values. Line Editor Commands The following commands can be used while the monitor is displaying the ok prompt. Not all of these editing commands are available on all workstations. CTRL-A Place the cursor at the start of line. CTRL-B Move the cursor backward one character. ESC-B Move the cursor backward one word. CTRL-D Erase the character that the cursor is SunOS 5.5.1 Last change: 14 Dec 1994 4 monitor(1M) Maintenance Commands monitor(1M) currently highlighting. ESC-D Erase the portion of word from the cursor's present position to the end of the word. CTRL-E Place the cursor at the end of line. CTRL-F Move the cursor forward one character. ESC-F Move the cursor forward one word. CTRL-H Erase the character preceding the cursor (also use Delete or Back Space) ESC-H Erase the portion of the word which pre- cedes the cursor (use also CTRL-W) CTRL-K Erase from the cursor's present position to the end of the line. CTRL-L Show the command history list. CTRL-N Recall the next command from the command history list CTRL-P Recall a previous command from the com- mand history list. CTRL-Q Quote the next character (used to type a control character). CTRL-R Retype the current line. CTRL-U Erase from the cursor's present position to the beginning of the line. CTRL-Y Insert the contents of the memory buffer into the line, in front (to the left) of the cursor. nvramrc The nvramrc is an area of the system's NVRAM where users may store Forth programs. The programs which are stored in the nvramrc will executed each time the system is reset, pro- vided that the 'use-nvramrc?' NVRAM parameter has been set to 'true'. Refer to the _O_p_e_n_B_o_o_t _2._x _C_o_m_m_a_n_d _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l book for information on how to edit and use the nvramrc. Restricted Monitor The command 'old-mode' is used to move OpenBoot into a res- tricted monitor mode, causing the > prompt to be displayed. Only three commands are allowed while in the restricted mon- itor; the 'go' command (to resume a program which was inter- rupted with the Stop-A command), the 'n' command (to return to the normal OpenBoot monitor), and boot commands. The restricted monitor's boot commands will approximate the older SunMON monitor's boot command syntax. If a 'security-mode' has been turned on then the restricted moni- tor becomes the default monitor environment. The restricted monitor may also become the default environment if the 'sunmon-compat?' NVRAM parameter is set to true. (Note that not all workstations will have the 'sunmon-compat?' parame- ter.) SunOS 5.5.1 Last change: 14 Dec 1994 5 monitor(1M) Maintenance Commands monitor(1M) SunMON PROM USAGE The following commands are available systems with older SunMON-based PROM: +|- Increment or decrement the current address and display the contents of the new location. ^C _s_o_u_r_c_e _d_e_s_t_i_n_a_t_i_o_n _n (caret-C) Copy, byte-by-byte, a block of length _n from the _s_o_u_r_c_e address to the _d_e_s_t_i_n_a_t_i_o_n address. ^I _p_r_o_g_r_a_m (caret-I) Display the compilation date and location of _p_r_o_g_r_a_m. ^T _v_i_r_t_u_a_l__a_d_d_r_e_s_s (caret-T) Display the physical address to which _v_i_r_t_u_a_l__a_d_d_r_e_s_s is mapped. b [ ! ] [ _d_e_v_i_c_e [ (_c,_u,_p) ] ] [ _p_a_t_h_n_a_m_e ] [ _a_r_g_u_m_e_n_t_s__l_i_s_t ] b[?] Reset appropriate parts of the system and bootstrap a program. A `!' (preceding the _d_e_v_i_c_e argument) prevents the system reset from occurring. Pro- grams can be loaded from various devices (such as a disk, tape, or Ethernet). `b' with no arguments will cause a default boot, either from a disk, or from an Ethernet controller. `b?' displays all boot devices and their _d_e_v_- _i_c_es. _d_e_v_i_c_e one of le Lance Ethernet ie Intel Ethernet sd SCSI disk, CDROM st SCSI 1/4" or 1/2" tape fd Diskette id IPI disk mt Tape Master 9-track 1/2" tape xd Xylogics 7053 disk xt Xylogics 1/2" tape xy Xylogics 440/450 disk _c A controller number (0 if only one controller), SunOS 5.5.1 Last change: 14 Dec 1994 6 monitor(1M) Maintenance Commands monitor(1M) _u A unit number (0 if only one driver), and _p A partition. _p_a_t_h_n_a_m_e A pathname for a program such as /stand/diag. _a_r_g_u_m_e_n_t_s__l_i_s_t A list of up to seven argu- ments to pass to the program being booted. c [_v_i_r_t_u_a_l__a_d_d_r_e_s_s] Resume execution of a program. When given, _v_i_r_t_u_a_l__a_d_d_r_e_s_s is the address at which execution will resume. The default is the current PC. Registers are restored to the values shown by the d, and r commands. d [_w_i_n_d_o_w__n_u_m_b_e_r] Display (dump) the state of the proces- sor. The processor state is observable only after: +o An unexpected trap was encountered. +o A user program dropped into the moni- tor (by calling _a_b_o_r_t_e_n_t). +o The user manually entered the monitor by typing L1-A or BREAK. The display consists of the following: +o The special registers: PSR, PC, nPC, TBR, WIM, and Y +o Eight global registers +o 24 window registers (8 _i_n, 8 _l_o_c_a_l, and 8 _o_u_t), corresponding to one of the 7 available windows. If a Floating-Point Unit is on board, its status register along with 32 floating-point registers are also shown. _w_i_n_d_o_w__n_u_m_b_e_r Display the indi- cated _w_i_n_d_o_w__n_u_m_b_e_r, which can be any value between 0 and 6, inclusive. If no window is specified and the PSR's current window pointer contains a valid window number, SunOS 5.5.1 Last change: 14 Dec 1994 7 monitor(1M) Maintenance Commands monitor(1M) registers from the window that was active just prior to entry into the moni- tor are displayed. Otherwise, registers from window 0 are displayed. e [_v_i_r_t_u_a_l__a_d_d_r_e_s_s][_a_c_t_i_o_n] ... Open the 16-bit word at _v_i_r_t_u_a_l__a_d_d_r_e_s_s (default zero). The address is inter- preted in the address space defined by the s command. See the a command for a description of _a_c_t_i_o_n. f _v_i_r_t_u_a_l__a_d_d_r_e_s_s_1 _v_i_r_t_u_a_l__a_d_d_r_e_s_s_2 _p_a_t_t_e_r_n [_s_i_z_e] Fill the bytes, words, or long words from _v_i_r_t_u_a_l__a_d_d_r_e_s_s_1 (lower) to _v_i_r_t_u_a_l__a_d_d_r_e_s_s_2 (higher) with the con- stant, _p_a_t_t_e_r_n. The _s_i_z_e argument can take one of the following values: b byte format (the default) w word format l long word format For example, the following command fills the address block from 0x1000 to 0x2000 with the word pattern, 0xABCD: f 1000 2000 ABCD W g [_v_e_c_t_o_r] [_a_r_g_u_m_e_n_t] g [_v_i_r_t_u_a_l__a_d_d_r_e_s_s] [_a_r_g_u_m_e_n_t] Goto (jump to) a predetermined or default routine (first form), or to a user-specified routine (second form). The value of _a_r_g_u_m_e_n_t is passed to the routine. If the _v_e_c_t_o_r or _v_i_r_t_u_a_l__a_d_d_r_e_s_s argument is omitted, the value in the PC is used as the address to jump to. To set up a predetermined routine to jump to, a user program must, prior to executing the monitor's g command, set the variable *romp->v_vector_cmd to be equal to the virtual address of the desired routine. Predetermined routines need not necessarily return control to the monitor. SunOS 5.5.1 Last change: 14 Dec 1994 8 monitor(1M) Maintenance Commands monitor(1M) The default routine, defined by the mon- itor, prints the user-supplied _v_e_c_t_o_r according to the format supplied in _a_r_g_u_m_e_n_t. This format can be one of: %x hexadecimal %d decimal g0 Force a panic and produce a crash dump when the monitor is running as a result of the system being interrupted, g4 (Sun-4 systems only) Force a kernel stack trace when the monitor is running as a result of the system being inter- rupted, h Display the help menu for monitor com- mands and their descriptions. To return to the monitor's basic command level, press ESCAPE or q before pressing RETURN. i [_c_a_c_h_e__d_a_t_a__o_f_f_s_e_t] [_a_c_t_i_o_n]... Modify cache data RAM command. Display and/or modify one or more of the cache data addresses. See the a command for a description of _a_c_t_i_o_n. j [_c_a_c_h_e__t_a_g__o_f_f_s_e_t] [_a_c_t_i_o_n]... Modify cache tag RAM command. Display and/or modify the contents of one or more of the cache tag addresses. See the a command for a description of _a_c_t_i_o_n. k [_r_e_s_e_t__l_e_v_e_l] Reset the system, where _r_e_s_e_t__l_e_v_e_l is: 0 Reset VMEbus, interrupt regis- ters, video monitor (Sun-4 systems). This is the default. 1 Software reset. 2 Power-on reset. Resets and clears the memory. Runs the EPROM-based diagnostic self test, which can take several minutes, depending upon how much memory is being tested. SunOS 5.5.1 Last change: 14 Dec 1994 9 monitor(1M) Maintenance Commands monitor(1M) kb Display the system banner. l [_v_i_r_t_u_a_l__a_d_d_r_e_s_s][_a_c_t_i_o_n]... Open the long word (32 bit) at memory address _v_i_r_t_u_a_l__a_d_d_r_e_s_s (default zero). The address is interpreted in the address space defined by the s command (below). See the a command for a description of _a_c_t_i_o_n. m [_v_i_r_t_u_a_l__a_d_d_r_e_s_s][_a_c_t_i_o_n]... Open the segment map entry that maps _v_i_r_t_u_a_l__a_d_d_r_e_s_s (default zero). The address is interpreted in the address space defined by the s command. See the a command for a description of _a_c_t_i_o_n. ne ni Disable, enable, or invalidate the cache, respectively. o [_v_i_r_t_u_a_l__a_d_d_r_e_s_s][action]... Open the byte location specified by _v_i_r_t_u_a_l__a_d_d_r_e_s_s (default zero). The address is interpreted in the address space defined by the s command. See the a command for a description of _a_c_t_i_o_n. p [_v_i_r_t_u_a_l__a_d_d_r_e_s_s][_a_c_t_i_o_n]... Open the page map entry that maps _v_i_r_t_u_a_l__a_d_d_r_e_s_s (default zero) in the address space defined by the s command. See the a command for a description of _a_c_t_i_o_n. q [_e_e_p_r_o_m__o_f_f_s_e_t][_a_c_t_i_o_n]... Open the EEPROM _e_e_p_r_o_m__o_f_f_s_e_t (default zero) in the EEPROM address space. All addresses are referenced from the begin- ning or base of the EEPROM in physical address space, and a limit check is per- formed to insure that no address beyond the EEPROM physical space is accessed. This command is used to display or modify configuration parameters, such as: the amount of memory to test during self test, whether to display a standard or custom banner, if a serial port (A or B) is to be the system console, etc. See the a command for a description of _a_c_t_i_o_n. SunOS 5.5.1 Last change: 14 Dec 1994 10 monitor(1M) Maintenance Commands monitor(1M) r [_r_e_g_i_s_t_e_r__n_u_m_b_e_r] r [_r_e_g_i_s_t_e_r__t_y_p_e] r [_w _w_i_n_d_o_w__n_u_m_b_e_r] Display and/or modify one or more of the IU or FPU registers. A hexadecimal _r_e_g_i_s_t_e_r__n_u_m_b_e_r can be one of: 0x00-0x0f window(0,i0)-window(0,i7), window(0,i0)-window(0,i7) 0x16-0x1f window(1,i0)-window(1,i7), window(1,i0)-window(1,i7) 0x20-0x2f window(2,i0)-window(2,i7), window(2,i0)-window(2,i7) 0x30-0x3f window(3,i0)-window(3,i7), window(3,i0)-window(3,i7) 0x40-0x4f window(4,i0)-window(4,i7), window(4,i0)-window(4,i7) 0x50-0x5f window(5,i0)-window(5,i7), window(5,i0)-window(5,i7) 0x60-0x6f window(6,i0)-window(6,i7), window(6,i0)-window(6,i7) 0x70-0x77 g0, g1, g2, g3, g4, g5, g6, g7 0x78-0x7d PSR, PC, nPC, WIM, TBR, Y. 0x7e-0x9e FSR, f0-f31 Register numbers can only be displayed after an unexpected trap, a user program has entered the monitor using the _a_b_o_r_- _t_e_n_t function, or the user has entered the monitor by manually typing L1-A or BREAK. If a _r_e_g_i_s_t_e_r__t_y_p_e is given, the first register of the indicated type is displayed. _r_e_g_i_s_t_e_r__t_y_p_e can be one of: f floating-point g global s special If w and a _w_i_n_d_o_w__n_u_m_b_e_r (0-6) are given, the first _i_n-register within the indicated window is displayed. If _w_i_n_d_o_w__n_u_m_b_e_r is omitted, the window that was active just prior to entering the monitor is used. If the PSR's current window pointer is invalid, win- dow 0 is used. s [_a_s_i]) Set or display the Address Space SunOS 5.5.1 Last change: 14 Dec 1994 11 monitor(1M) Maintenance Commands monitor(1M) Identifier. With no argument, s displays the current Address Space Identifier. The _a_s_i value can be one of: 0x2 control space 0x3 segment table 0x4 Page table 0x8 user instruction 0x9 supervisor instruction 0xa user data 0xb supervisor data 0xc flush segment 0xd flush page 0xe flush context 0xf cache data u [ _e_c_h_o ] u [ _p_o_r_t ] [ _o_p_t_i_o_n_s ] [ _b_a_u_d__r_a_t_e ] u [ u ] [ _v_i_r_t_u_a_l__a_d_d_r_e_s_s ] With no arguments, display the current I/O device characteristics including: current input device, current output device, baud rates for serial ports A and B, an input-to-output echo indica- tor, and virtual addresses of mapped UART devices. With arguments, set or configure the current I/O device. With the u argument (uu...), set the I/O dev- ice to be the _v_i_r_t_u_a_l__a_d_d_r_e_s_s of a UART device currently mapped. _e_c_h_o Can be either e to enable input to be echoed to the out- put device, or ne, to indicate that input is not echoed. _p_o_r_t Assign the indicated _p_o_r_t to be the current I/O device. _p_o_r_t can be one of: a serial port A b serial port B k the workstation keyboard s the workstation screen _b_a_u_d__r_a_t_e Any legal baud rate. _o_p_t_i_o_n_s can be any combination of: i input SunOS 5.5.1 Last change: 14 Dec 1994 12 monitor(1M) Maintenance Commands monitor(1M) o output u UART e echo input to output ne do not echo input r reset indicated serial port (a and b ports only) If either a or b is supplied, and no _o_p_t_i_o_n_s are given, the serial port is assigned for both input and output. If k is supplied with no options, it is assigned for input only. If s is supplied with no options, it is assigned for output only. v _v_i_r_t_u_a_l__a_d_d_r_e_s_s_1 _v_i_r_t_u_a_l__a_d_d_r_e_s_s_2 [_s_i_z_e] Display the contents of _v_i_r_t_u_a_l__a_d_d_r_e_s_s_1 (lower) _v_i_r_t_u_a_l__a_d_d_r_e_s_s_2 (higher) in the format specified by _s_i_z_e: b byte format (the default) w word format l long word format Enter return to pause for viewing; enter another return character to resume the display. To terminate the display at any time, press the space bar. For example, the following command displays the contents of virtual address space from address 0x1000 to 0x2000 in word format: v 1000 2000 W w [_v_i_r_t_u_a_l__a_d_d_r_e_s_s][_a_r_g_u_m_e_n_t] Set the execution vector to a predeter- mined or default routine. Pass _v_i_r_t_u_a_l__a_d_d_r_e_s_s and _a_r_g_u_m_e_n_t to that routine. To set up a predetermined routine to jump to, a user program must, prior to executing the monitor's w command, set the variable *romp->v_vector_cmd to be equal to the virtual address of the desired routine. Predetermined routines need not necessarily return control to the monitor. SunOS 5.5.1 Last change: 14 Dec 1994 13 monitor(1M) Maintenance Commands monitor(1M) The default routine, defined by the mon- itor, prints the user-supplied _v_e_c_t_o_r according to the format supplied in _a_r_g_u_m_e_n_t. This format can be one of: %x hexadecimal %d decimal x Display a menu of extended tests. These diagnostics permit additional testing of such things as the I/O port connectors, video memory, workstation memory and keyboard, and boot device paths. yc _c_o_n_t_e_x_t__n_u_m_b_e_r yp|s _c_o_n_t_e_x_t__n_u_m_b_e_r _v_i_r_t_u_a_l__a_d_d_r_e_s_s Flush the indicated context, context page, or context segment. c flush context _c_o_n_t_e_x_t__n_u_m_b_e_r p flush the page beginning at _v_i_r_t_u_a_l__a_d_d_r_e_s_s within context _c_o_n_t_e_x_t__n_u_m_b_e_r s flush the segment beginning at _v_i_r_t_u_a_l__a_d_d_r_e_s_s within context _c_o_n_t_e_x_t__n_u_m_b_e_r SEE ALSO tip(1), boot(1M), eeprom(1M) _O_p_e_n_B_o_o_t _2._x _C_o_m_m_a_n_d _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l SunOS 5.5.1 Last change: 14 Dec 1994 14