About the Network Server Diagnostic Utility Contents * Introduction * Creating or copying the Network Server Diagnostic Utility disk * Verifying the Network Server Hardware Configuration * Starting Up the Network Server Diagnostic Utility * Changing Default Test Preferences * Running All Diagnostic Utility Tests * Displaying Hardware Configuration Information * Displaying Power-On Self Test (POST) Results * Testing on board Memory * Testing the LCD * Testing the SCSI Controllers * Testing the PCI Bridges, VGA Controller & RAM, NVRAM, Serial ports, and Serial Ports with loopback connected * Displaying the Error Summary Report * Exiting the Diagnostic Utility and Restarting the Network Server Introduction The Network Server Diagnostic Utility allows you to verify basic capabilities of the Network Server 500 and Network Server 700. You can use this diagnostic utility when you are unable to load and run your operating system. You may want to print this document and keep it with your other manuals for future reference. Both Network Server ships from the factory without an operating system or other software. Before or after installing the AIXR operating system, you can use the Network Server Diagnostic Utility to confirm the hardware configuration and to run basic tests. This document describes how to use the diagnostic utility. The Network Server Diagnostic Utility comes on a floppy disk. To keep this disk readily available, you may want to store it in the plastic envelope that is secured to the side of the server cabinet. For the latest version of the Network Server Diagnostic Utility software and documentation, click the Network Server button at the World Wide Web site http:/www.solutions.apple.com. Creating or Copying the Network Server Diagnostic Utility Disk If you create a backup copy of the diagnostic utility, either by copying from another disk or by downloading it from the network, use a high-density, 1.4 MB floppy disk formatted on a Mac OS computer. Copy the updated software to the disk and give the program file this name: diags Verifying the Network Server Hardware Configuration If you have just unpacked your Network Server and have set it up, you can run the Network Service Diagnostic Utility to establish that the basic hardware is functional. Check the server's front display panel (LCD) for information on server startup and to determine whether the server's Power- On Self Test (POST) identified a problem. You may also determine certain basic information about the configuration of your Network Server by reviewing the front panel display status before the operating system starts up. To verify that SCSI devices have been properly attached, use the commands scsi-probe1 and scsi-probe2 described in the manual Setting Up the Network Server. Starting Up the Network Server Diagnostic Utility Before using the diagnostic utility, you need to set up server hardware according to the instructions in the manual Setting Up the Network Server. Your Network Server comes already setup to use the VGA monitor and ADB keyboard. If you want to run diagnostics using a serial terminal, see the instructions in Setting Up the Network Server. There are two options for starting up the diagnostic utility. The preferred option is to place the server in service mode. The other option, which you can use if the boot path names stored in NVRAM are corrupted, is to boot from Open Firmware . To boot the Network Server Diagnostic Utility from service mode: 1. If AIX is running, enter this command: shutdown -r 2. After the system completely shuts down, turn the front key to the left (service) position. 3. Insert the Network Server Diagnostic Utility disk and press the reset button. The Network Server Utility starts up, displaying the hardware configuration and the Level One menu and prompt. To boot the Network Server Diagnostic Utility from Open Firmware: 1. If AIX is running, enter this command: shutdown -r 2. While the system is resetting, or powering on, hold down these keys: Command-Option-O-F Continue holding down these keys until the 0> prompt appears. If AIX is installed on your system and has run before, a Security> prompt appears. 3. Enter this command: login The system displays ok followed by the 0> prompt. 4. If AIX is installed, the OF Password> prompt appears. Enter the AIX root password. 5. Insert the Network Server Diagnostic Utility disk. 6. Enter this command to boot the diagnostic utility: boot fd:diags The Network Server Utility starts up, then displays the server hardware configuration: Installed Hardware Configuration for Network Server 500/700 Version 1.1 8/28/96 > Power-on Self Test = 00001000 > 604 Processor = 176 Mhz > L1 Cache = 32K. > L2 Cache SIMM = 512K. > Memory installed = 32Mbytes > Slot 1A = 8Mbytes > Slot 1B = 8Mbytes > Slot 2A = 8Mbytes > Slot 2B = 8Mbytes > Slot 3A = 0 > Slot 3B = 0 > Slot 4A = 0 > Slot 4B = 0 > Drive Fan = On > Processor Fan = On > Left Power Supply = On > Right Power Supply = None > Thermal Sensor 1 = Safe Threshold > Thermal Sensor 2 = Safe Threshold > Installed PCI Slots= 1 > Empty PCI Slots = 2 3 4 5 6 After the hardware configuration information, this menu appears: 1. Show Hardware Configuration. 2. Show the Power-On Self Test results. 3. Run complete system test [ 1 ] times. 4. Show Error Summary. 5. Restart the Network Server. 6. Change preferences. 7. Other options. ? Help on Level One Menu. Level One> To run a Level One command, type the number that appears next to the command you want, then press RETURN. If the command includes a number in brackets, such as "Run complete system test [1] times," the bracketed number indicates the default. You can enter a different value by typing a different number after the command. For example, this runs the complete system test five times: Level One>3 5 To display additional information about the commands, enter a ?. Changing Default Test Preferences These are the default Diagnostic Utility test preferences: * Run the selected test one time * Stop testing when a failure is found * Record each failure occurrence To change these preferences, enter 6 at the Level 1> prompt. The Preferences Menu appears, enabling you to adjust the defaults: Current preferences are: Test will repeat: 1 Stop tests when a failure is found. Record each failure occurrence. Preferences Menu. 0. Return to Level One menuÉ *. Return to top level menuÉ 1. Continue testing when a failure is found. 2. Stop testing when a failure is found. 3 Repeat the last operation that failed. 4. Repeat the last test that failed. 5. Record each failure occurrence. 6. Do not record each failure occurrence. 7. Clear errors from the error log. 8. Change times to run each test. Please enter a number. 9. Set default preferences. 10. Show current preferences. ? Help with this menu. Preferences> If you want to change the number of times each test runs, enter 8, followed by the number of test repetitions. For example, to automatically run each test three times: Preferences>8 3 Running All Diagnostic Utility Tests To run all available tests, enter 3 at the Level One> prompt, followed by a number indicating how many times you want to run the test suite. For example, to run all tests twice: Level One>3 2 Displaying Hardware Configuration Information Server hardware configuration information displays at the time the Diagnostic Utility starts up. You can display configuration information any time by entering 1 at the Level One> prompt. Displaying Power-On Self Test (POST) Results Power-On Self Test (POST) software is stored in ROM (which is contained on a SIMM) and executes a number of tests every time the Network Server is started up. When the POST software detects a problem, the problem description is encoded and stored into a special memory location in non- volatile RAM (NVRAM) where it is available for reference by Open Firmware, the Network Server Diagnostic Utility, and the operating system. The POST software also displays a description of the problem found on the front panel liquid crystal display (LCD). However, because a number of messages are displayed in sequence on the LCD, you may not be able to observe the error message unless the server halts. To display Power-On Self Test results reported by ROM, enter 2 at the Level One> prompt. These are the possible results: POST Results Interpretation LCD Shows 0x80000000 Reserved 0x40000000 DIMM Slot 1A Memory Test Failure RAM DIMM 1A Failed at Address xxxxxxxx 0x20000000 DIMM Slot 1B Memory Test Failure RAM DIMM 1B Failed at Address xxxxxxxx 0x10000000 DIMM Slot 2A Memory Test Failure RAM DIMM 2A Failed at Address xxxxxxxx 0x08000000 DIMM Slot 2B Memory Test Failure RAM DIMM 2B Failed at Address xxxxxxxx 0x04000000 DIMM Slot 3A Memory Test Failure RAM DIMM 3A Failed at Address xxxxxxxx 0x02000000 DIMM Slot 3B Memory Test Failure RAM DIMM 3B Failed at Address xxxxxxxx 0x01000000 DIMM Slot 4A Memory Test Failure RAM DIMM 4A Failed at Address xxxxxxxx 0x00800000 DIMM Slot 4B Memory Test Failure RAM DIMM 4B Failed at Address xxxxxxxx 0x00400000 Reserved 0x00200000 Reserved 0x00100000 Reserved 0x00080000 Non-Quad CAS DRAM RAM DIMM 4B Failed ECC Memory?) Found at Address ECCBEBAD 0x00040000 POST Skipped due to over temperature Temperature Too Hot! or Temperature Warning! 0x00020000 POST Skipped because user pressed No Message reset button twice on server restart 0x00010000 All memory (RAM) has parity xxxx MB Parity RAM 0x00008000 Failed Slave Processor Processor Card Failed 0x00004000 Failed Master Processor Processor Card Failed 0x00002000 Failed Processor cache test Processor Card Failed 0x00001000 Failed Main Logic Board Cuda CudaNotResponding!!! not responding 0x00000800 Failed Main Logic Board VGA MainLBU Video ID Bad PCI Register Test 0x00000400 Failed Main Logic Board F/W SCSI 1 MainLBU 825#1 Failed (825#1) PCI Register Test 0x00000200 Failed Main Logic Board F/W SCSI 2 MainLBU 825#2 Failed (825#2) PCI Register Test 0x00000100 Failed Address Line Test See DIMM messages 0x00000080 Failed Main Logic Board NVRAM Test MainLBU NVRAM Failed 0x00000040 Failed L2 Cache SIMM Test L2 Cache SIMM Failed 0x00000020 Failed Data Line Stuck at 0 See DIMM messages 0x00000010 Failed Data Line Stuck at 1 See DIMM messages 0x00000008 Failed ROM SIMM Checksum ROM SIMM FAILED! 0x00000004 Failed Simple Memory (RAM) Test See DIMM messages 0x00000002 Failed Reverse Modulo 3 Test See DIMM messages 0x00000001 Failed Forward Modulo 3 Test See DIMM messages Testing On board Memory To test on board memory, select Other options by entering 7 at the Level One> prompt, then enter 2 at the Other Options> prompt. While the tests are running, these progress messages and instructions appear on the monitor: Performing full memory test.... Walking pattern forward Passed! Walking pattern backward Passed! Complete Memory Test completed successfully. Passes! Testing the LCD To test the LCD that's on the front of the server, select Other options by entering 7 at the Level One> prompt, then enter 1 at the Other Options> prompt. After you enter the command, watch the LCD to determine whether it's properly displaying characters on each line. While the tests are running, these progress messages and instructions appear on the monitor: Now testing LCD.... Please observe that the LCD shows on... Now preforming LCD Blink Test line 1: Blink On Passed! line 1: Cursor On Passed! Now preforming LCD Four Line Test line 1: Three Line Test12345 line 2: Second Line012345678 line 3: Third Line012345678 line 4: Fourth Line012345678 Passed! Now preforming LCD One Line Shift to the Right Test line 1: Shift Right>>> Passed! Now preforming LCD One Line Shift to the Left Test line 1: <<>> For One Line Shift Left Test: << prompt, then enter 3 at the Other Options> prompt. These options appear: Apple Network Server Diagnostic Utility Version: 1.1 8/28/96 SCSI Unit Menu. 0. Return to Other Options Menu. * Return to top level menu. 1. Test Fast/Wide SCSI controller 1. 2. Test Fast/Wide SCSI controller 2. ? Help with Attached Replaceable Unit Menu. SCSI FRU> At the SCSI FRU> prompt, enter either 1 or 2 to test the SCSI controller of your choice. Testing the PCI Bridges, VGA Controller & VRAM, NVRAM, Serial ports, and Serial Ports with loopback connector attached. To test subcomponents, select Other options by entering 7 at the Level One> prompt, then enter 4 at the Other Options> prompt. These options appear: Apple Network Server Diagnostic Utility Version: 1.1 8/28/96 Subcomponent Area Menu. 0. Return to Other Options menu. *. Return to top level menu. 1. Test PCI Bridges. 2. Test VGA Controller and RAM. 3. Test NVRAM. 4. Test Serial ports. 5. Test Serial ports with loopback connector attached. ? Help with this menu. Subcomponent Area> At the Subcomponent Area> prompt, enter either 1, 2, 3, 4, or 5 to test the subcomponent area of your choice. Displaying the Error Summary Report The Network Server Diagnostic Utility maintains an internal log of errors. Changing preferences affects how the log entries are updated. For example, if the preference option Record each failure occurrence is active, every error detected by the Network Server Diagnostic Utility is recorded in the internal log. If the preference option Do not record each failure occurrence is active, the error log contains only entries made before error logging was disabled. Note that the Network Server Diagnostic Utility maintains a error log only while the utility is running. Exiting the diagnostic utility and restarting the Network Server erases the error log. To display the error log, enter 4 a the Level One> prompt. Here are examples of the errors that might appear: Component: Description: Bridge ............Bandit 1 not found! Errors: 10 Bridge ............Bandit 2 not found! Errors: 1 Bridge ............Grand Central not found. Errors: 1 Bridge ............F&W SCSI 1 not found. Errors: 1 Bridge ............F&W SCSI 2 not found. Errors: 1 Complete Memory....Received bad 5 data. Errors: 4 Slot 1A, Address: 00BC6144 Act: 555A5555 Exp: 55555555 Complete Memory....Received bad A data. Errors: 18 Slot 2A, Address: 01BC6148 Act: AAAA5AAA Exp: AAAAAAAA Complete Memory.... Data Miscompare. Errors: 1 F&W SCSI 1.........Wrong device. Errors: 5 F&W SCSI 1.........FIFO not full. Errors: 1 F&W SCSI 1.........Data miscompare. Errors: 3 Address: 00000002 Act: 00000010 Exp: 00000030 F&W SCSI 1.........Output Control Latch. Errors: 40 Address: 00000009 Act:000090 Exp: 00000080 F&W SCSI 1.........F/W SCSI not found. Errors: 3 F&W SCSI 1.........Not Working. Errors: 95 F&W SCSI 2.........Wrong device. Errors: 3 F&W SCSI 2.........FIFO not full. Errors: 1 F&W SCSI 2.........Data miscompare. Errors: 8 Address: 00000002 Act: 00000010 Exp: 00000030 F&W SCSI 2.........Output Control Latch. Errors: 1 Address: 00000009 Act: 000090 Exp: 00000080 F&W SCSI 2.........F/W SCSI not found. Errors: 12 F&W SCSI 2.........Not Working. Errors: 95 Non Volatile RAM...Unexpected Value. Errors: 1 Non Volatile RAM...Corrupted NVR data. Errors: 1 Serial.............A: Timed Out. Errors: 3 Serial.............B: Timed Out. Errors: 5 Serial.............A->A PIO Data Miscompare. Errors: 1 Serial.............B->B PIO Data Miscompare. Errors: 2 Serial.............A->A DMA Data Miscompare. Errors: 7 Serial.............B->B DMA Data Miscompare. Errors: 4 Serial.............A: Expected Tx Interrupt. Errors: 3 Serial.............B: Expected Tx Interrupt. Errors: 9 Serial.............A: Expected Rx Interrupt. Errors: 2 Serial.............B: Expected Rx Interrupt. Errors: 1 Serial.............A->A SDLC DMA Miscompare. Errors: 1 Serial.............B->B SDLC DMA Miscompare. Errors: 3 Serial Loop Back...A->B PIO Data Miscompare. Errors: 4 Serial Loop Back...B->A PIO Data Miscompare. Errors: 8 Serial Loop Back...A->B DMA Data Miscompare. Errors: 1 Serial Loop Back...B->A DMA Data Miscompare. Errors: 2 VGA ...............VGA was not found. Errors: 17 VGA ...............Video RAM not responding. Errors: 1 VGA ...............Video RAM Error. Errors: 12 Address: F8008010 Act: 000000AA Exp: 0000005A VGA ...............Red data incorrect. Errors: 3 VGA ...............Green data incorrect. Errors: 1 VGA ...............Blue data incorrect. Errors: 2 VGA ...............CLUT is invalid. Errors: 1 Exiting the Diagnostic Utility and Restarting the Network Server Once you have finished running diagnostics, reboot the server by entering 5 at the Level 1> prompt. The server ejects the diagnostic utility disk, and reboots the AIX operating system. If you want to run Open Firmware, hold down these keys while the server is restarting: Command-Option-O-F c 1996 Apple Computer, Inc. All rights reserved. Apple and the Apple logo are trademarks of Apple Computer, Inc., registered in the United States and other countries. Mac is a are trademark of Apple Computer, Inc. AIX is a trademark of IBM Corporation, registered in the United States and other countries, and is being used under license u About Open Firmware for the Network Server Contents * Introduction * Starting Up Open Firmware * Using Open Firmware * Open Firmware Command Summary Introduction Open Firmware provides features that enable you to access low-level information about your Network Server. Using Open Firmware, for example, you may examine settings stored in the server's non volatile memory (NVRAM). Open Firmware is a standard software architecture for controlling a computer before the operating system begins execution. The complete specification for the Open Firmware standard is defined in the IEEE standard document IEEE P1275-1994 Standard for Boot Firmware. The Open Firmware software orchestrates how the hardware loads the operating system and defines which properties (or features) of the hardware are available for use by the operating system. The Open Firmware command language is based on Forth. For the latest version of Open Firmware software and documentation, click the Network Server button at the World Wide Web site http:/www.solutions.apple.com. Starting Up Open Firmware To start up Open Firmware, hold down these keys while the server is restarting: Command-Option-O-F Enter Open Firmware commands at the >ok prompt. Separate each command by one or more spaces. A summary of general commands available in this implementation of the IEEE standard is provided at the end of this section. Using Open Firmware These commands provide low-level information about your Network Server: printenv Displays configuration settings stored in NVRAM. For example, one configuration setting specifies the boot path for the operating system. This setting is named boot-device. There is also a setting named diag-device which identifies the boot path for loading diagnostics when the server key switch is in the left (service) position. The configuration setting name appears in the left column, the current setting appears in the middle column, and the default setting is in the right column. Use the set-default command to restore default settings when appropriate. If you encounter difficulties starting up the Network Server operating system, try setting defaults. Also, you should copy down the current settings after you install the operating system. If you later experience problems starting up the operating system, you can use printenv to check the settings using this command to determine verify the configuration settings. devalias Displays name aliases to devices stored as properties in the device tree. A name alias is an abbreviated way of referring to a device path name. For example, to boot the Network Server Diagnostic Utility, you specify the name alias for the floppy drive, fd: boot fd:diags probe-scsi1 Searches the Fast and Wide SCSI bus 0 and for each device attached displays the SCSI ID, the type of device, and other pertinent information such as the device's firmware version number. Use this command to verify that the devices in the top four drive trays are correctly recognized by the Network Server. probe-scsi2 Searches the Fast and Wide SCSI bus 1 and for each device attached displays the SCSI ID, the type of device, and other pertinent information such as the device's firmware version number. Use this command to verify that the devices in the bottom four drive trays and the two rear bracket-mounted internal drives (Network Server 700 only) are correctly recognized by the Network Server. dump-device-tree Displays the device tree, which lists all features and devices in the Network Server encoded into a specific data format. Use the spacebar to control scrolling of the list. The following command are used to change configuration settings stored in NVRAM. The name-alias variable is the setting name. The value variable can be a number, logical name (true, false), or a sequence of text. setenv name-alias value Use this command to change the specified configuration setting to the indicated value. For example, to change the OS boot device: setenv boot-device disk3:aix This adds disk 6 to the boot search path: setenv diag-device cd disk6 fd:diags set-default name-alias This command restores the default of the named configuration setting. This example restores the boot device setting to disk2:aix: set-default boot-device This command restores the default diagnostic device to disk2:aix: set-default diag-device set-defaults Restores the factory defaults for all the configuration settings. Configuration Settings to Check in Case of Problems If you encounter problems when the operating system starts up, check these configuration settings: auto-boot? Must be true in order to enable automatic booting of the operating system or the diagnostics when the key switch is the in the service position. load-base The Network Server Diagnostic Utility expects this number to be 4000 or greater. diag-device In order to be able to boot the Network Server Diagnostic Utility from the floppy drive, the value of diag-device must include fd:diags. Any device preceding fd:diags must be unmounted or removed. For example, the default setting for diag-device is cd fd:diags. This means that the search order for a bootable device begins with the CD-ROM drive and proceeds to the floppy drive only if the CD-ROM drive does not contain a bootable CD. You must remove the CD-ROM disk in this case in order to boot the floppy drive. boot-device The factory default for booting the operating system is disk2 or the hard drive contained in drive tray three (Fast and Wide bus 0 SCSI ID 2). If this value becomes corrupt or changes, the AIX operating system won't boot. If you are unable to restore this setting to the default or you cannot change the setting with the setenv boot-device command, then you may still be able to boot AIX by manually entering the boot command: boot disk2:aix Open Firmware Command Summary Command Stack Comment Changing the Number Base & Number Input/Output Commands decimal ( -- ) Set the number base to 10. d# number ( -- n) Interpret the next number in decimal. hex ( -- ) Set the number base to 16. h# number ( -- n) Interpret the next number in hex. u. (n -- ) Display the unsigned number. .d (n -- ) Display n in decimal without changing number base system. .h (n -- ) Display n in hex without changing base. . (n -- ) Display a number in the Current base. .s ( -- ) Display contents of data stack. Memory Access Commands ! (n adr16 -- ) Store a 32-bit Number at adr16, 16-bit aligned. @ (adr16 -- n ) Fetch a 32-bit Number from adr16. c! (n adr -- ) Store low byte of n at adr. c@ (adr -- n ) Fetch a byte from adr. cpeek (adr -- [byte] ok?) Fetch the byte at adr.Return the data and true if the read access was successful. Return false if an error occurred. cpoke (byte adr -- ok?) Store the byte to adr. Return true if the write access was successful. Return false if an error occurred. comp (adr1 adr2 len -- n) Compare two byte arrays, n=0 if arrays are identical, n=1 if first byte that is different is greater in array#1, n= -1 otherwise. dump (adr len -- ) Display len bytes of memory from adr. fill (adr size byte -- ) set size bytes of memory to byte. l! (n adr32 -- ) Store a 32-bit number at adr32, 32-bit aligned. l@ (adr32 -- n) Fetch a 32-bit number from adr32. lpeek (adr -- [long] ok?) Like cpeek, but 32-bit access. lpoke (long adr -- ok?) Like cpoke, but 32-bit access. move (adr1 adr2 n -- ) Copy n bytes from adr1 to adr2. w! (n adr16 -- ) Store a 16-bit number at adr16. w@ (adr16 -- n) Fetch a 16-bit number from adr16. wpeek (adr -- [word] ok?) Like cpeek, but 16-bit access. wpoke (word adr -- ok?) Like cpoke, but 16-bit access. Memory Mapping Commands do-map (phys virt size mode -- )Map a region of 32-bit physical address at phys to a region of 32-bit virtual address at virt, the mode is 0 for Memory and 0x28 for input/output normally. Open Firmware turns on MMU translation and uses virtual address for Memory and I/O access. The physical addr has to be mapped before access. The mapping table can be seen from the property 'translations' under the cpu node '/PowerPC,601' or '/PowerPC,604'. eg. fa000000 dup 1000 28 do-map do-unmap ( virt size -- ) Unmap the previous mapped region. PCI Registers Access Commands rb! (n adr -- ) Store low byte of n at adr. rb@ (adr -- n) Fetch a byte from adr. rl! (n adr32 -- ) Store a 32-bit number at adr32, 32-bit aligned. rl@ (adr32 -- n ) Fetch a 32-bit number from adr32. rw! (n adr16 -- ) Store a 16-bit number at adr16. rw@ (adr16 -- n ) Fetch a 16-bit number from adr16. NOTE: For big endian registers use xb!, xb@, xl!, xl@, rw!, rw@ instead. If the (big endian) register access doesn't require special instruction such as eieio, it may use c!, c@, l!, l!, w!, w@. Stack Manipulation Commands bounds (start-adr size -- end-adr start-adr) This is equal to:over + swap 2drop (n1 n2 -- ) Remove two items from the stack. 2dup (n1 n2 -- n1 n2 n1 n2) Duplicate two items. clear (??? -- ) Empty the stack. drop (n -- ) Remove one item from the stack. dup (n -- n n) Duplicate the top stack item. over (n1 n2 -- n1 n2 n1) Copy the second item to the top. rot (n1 n2 n3 -- n2 n3 n1) Rotate three stack items. swap (n1 n2 -- n2 n1) Exchange the top two items. Arithmetic Commands * (n1 n2 -- n3) Multiply n1 * n2 + (n1 n2 -- n3) Add n1 + n2 - (n1 n2 -- n3) Subtract n1 - n2 / (n1 n2 -- n3) Divide n1 / n2 (truncated) << (n1 n2 -- n3) Left shift n1 by n2 bits >> (n1 n2 -- n3 ) Right shift n1 by n2 bits and ( n1 n2 -- n3) Bitwise logical and mod (n1 n2 -- n3) Remainder of n1 / n2 not (n1 -- n2) Bitwise logical inversion or (n1 n2 -- n3) Bitwise logical or xor (n1 n2 -- n3) Bitwise logical exclusive or. Examining and Creating Device Aliases devalias Display all current device aliases. devalias Display the device path name corresponding to . devalias Define an representing the . Device Tree Browsing Commands dump-device-tree Dump the whole system device tree. .properties Display the names and values of the current device node's properties. dev Select the indicated device node, making it the current node. dev Search for a node with given name in the subtree below the current node, and choose the first such node found. dev .. Choose the device node that is the parent of the current node. dev / Choose the root machine node. show-devs Display all the devices directly beneath the given device. For example, show-devs /bandit device-end Leave no node selected. ls Display children of the current node. pwd Display the current device path name. words Display the names of the current node's methods. select-dev (str,len -- ) Select the desired device node in order to execute the device methods under it. This requires all nodes of the desired device path have open method. unselect-dev Unselect the previous selected device node. If-then-else Commands else ( -- ) Execute the following code if 'if' failed. if (flag -- ) Execute the following code if flag is true. then ( -- ) Terminate if ... then ... else. Begin (conditional) Loop Commands again ( -- ) End a begin ... again infinite loop. begin ( -- ) Begin a begin ... while ... repeat, begin ... until, or begin ... again loop. repeat ( -- ) End a begin ... while ... repeat loop. until (flag -- ) Continue executing a begin ... until loop until flag is true. while (flag -- ) Executing a begin ... while ... repeat loop while flag is true. Do (Counted) Loop Commands +loop (n -- ) End a do ... +loop construct; add n to loop index and return to do (if n < 0, index goes from start to end inclusive). do (end start -- ) Begin a do ... loop. Index goes from start to end-1 inclusive. Example: 10 0 do i . loop i ( -- n) Loop index. j ( -- n) Loop index for next enclosing loop. leave ( -- ) Exit from do ... loop. loop ( -- ) End of do ... loop. Comparison Commands < (n1 n2 -- flag) True if n1 < n2. <= (n1 n2 -- flag) True if n1 <= n2. <> (n1 n2 -- flag) True if n1 <> n2. = (n1 n2 -- flag) True if n1 = n2. > (n1 n2 -- flag) True if n1 > n2. >= (n1 n2 -- flag) True if n1 >= n2. Controlling Text Input Commands & Display Text Output Commands ascii ( -- n) Get numerical value of first ASCIIcharacter of next word. key ( -- char) Read a character from the assigned input device's keyboard. key? ( -- flag) True if a key has been typed on the input device's keyboard. cr ( -- ) Go to the next line on the display. File Loading Commands boot [specifiers] Boot file from specified source. dl Load a Forth file over a serial line. init-program Initialize to execute a binary file. load [specifiers] Load data from specified device. NOTE: Use boot (or load) one of these four ways: (1) boot (2) boot (3) boot (4) boot NOTE: When using the floppy drive (name-alias is fd), the disk must be high density 1.4 MB formatted for the MacOS or DOS environments. (1) For a MacOS floppy, is fd: (2) For a DOS floppy, is fd:, Defining Words : ( -- ) Start creating a new command word. ; ( -- ) Finish creating the new word. Manipulating Text Strings " "( -- adr len ) Collect an input string. Redirecting I/O input (device-str -- ) Select the indicated device for console input, device may be a device name-alias. io (device-str -- ) Select device for subsequent input and output. Eg. ttyb:9600 output (device-str -- ) Select the indicated device for console output. Eg. screen output Emergency Keyboard Commands NOTE: Hold down keys during Open Firmware power on sequence. Command-Option-O-F Abort auto booting if auto-boot? is true. Command-Option-P-R Reset NVRAM contents to default values. PowerPC Register Commands %r0 through %r31 ( -- value)Return saved copy of the given register. %srr0 & %srr ( -- value) Return saved copy of Save/Restore reg. %sprg0 through %sprg3( -- value) Access saved copies of SPRG registers. %cr ( -- value) Return saved copy of Condition Register. %ctr ( -- value) Return saved copy of Counter Register. %lr ( -- value) Return saved copy of Link Register. %xer ( -- value) Return saved copy of XER register. msr@ ( -- value) Return current value of Machine State Register. msr! (value --) Set new value of Machine State Register. sprg3@ ( -- value) Get current interrupt vector pointer. sprg3! ( value --) Set our interrupt vector pointer. .registers Display the PowerPC CPU's saved program state. Miscellaneous Operation Commands eject [fd] Eject the floppy disk from the drive. get-msecs ( -- ms ) Return the approximate current time in milliseconds. ms ( n -- ) Delay for n milliseconds. Resolution is 1 millisecond. reset-all Reset the entire system (similar to a power cycle). NVRAMRC Editor Commands nvalias Store the command "devalias " in NVRAMRC. (The alias persists until the nvunalias or set-defaults commands are executed or NVRAM is reset.) nvedit Enter the NVRAMRC editor. If data remains in the temporary buffer from a previous nvedit session, resume editing the previous contents. If not, read the contents of NVRAMRC into the temporary buffer and begin editing it. nvquit Discard the contents of the temporary buffer without writing it to NVRAMRC. nvrecover Recover the contents of NVRAMRC if they have been lost nvrun Evaluate the temporary buffer. nvstore Copy the contents of the temporary buffer to NVRAMRC; discard the contents of the temporary buffer. nvunalias Delete the corresponding alias from NVRAMRC. ^c (Control-C) Quit nvedit and get back to the ok prompt. c 1996 Apple Computer, Inc. All rights reserved. Apple and the Apple logo are trademarks of Apple Computer, Inc., registered in the United States and other countries. Mac is a are trademark of Apple Computer, Inc. AIX is a trademark of IBM Corporation, registered in the United States and other countries, and is being used under license - jaro.vcf