PPCBug Firmware Package User’s Manual Parts 1 & 2 PPCBUGA1/UM4 PPCBUGA2/UM4
Notice While reasonable efforts have been made to assure the accuracy of this document, Motorola, Inc. assumes no liability resulting from any omissions in this document, or from the use of the information obtained therein. Motorola reserves the right to revise this document and to make changes from time to time in the content hereof without obligation of Motorola to notify any person of such revision or changes.
Preface The PPCBug Firmware Package UserÕs Manual provides information on the PPCBug Þrmware, the start-up and boot routines, the debugger commands, the one-line assembler/disassembler, and the debugger system calls.
Conventions The following conventions are used in this document: bold is used for user input that you type just as it appears. Bold is also used for commands, options and arguments to commands, and names of programs, directories, and files. italic is used for names of variables to which you assign values. Italic is also used for comments in screen displays and examples. courier is used for system output (e.g., screen displays, reports), examples, and system prompts.
Safety Summary Safety Depends On You The following general safety precautions must be observed during all phases of operation, service, and repair of this equipment. Failure to comply with these precautions or with speciÞc warnings elsewhere in this manual violates safety standards of design, manufacture, and intended use of the equipment. Motorola, Inc. assumes no liability for the customer's failure to comply with these requirements.
The computer programs stored in the Read Only Memory of this device contain material copyrighted by Motorola Inc., 1995, 1996, and 1997, and may be used only under a license such as those contained in MotorolaÕs software licenses. The software described herein and the documentation appearing herein are furnished under a license agreement and may be used and/or disclosed only in accordance with the terms of the agreement. The software and documentation are copyrighted materials.
Contents CHAPTER 1 General Information PPCBug Overview ..................................................................................................1-1 Comparison with other Motorola Bugs ...............................................................1-2 PPCBug Implementation .......................................................................................1-2 Memory Requirements...........................................................................................
Physical Layer Manager Ethernet Driver................................................... 1-28 UDP and IP Modules .................................................................................... 1-28 RARP and ARP Modules.............................................................................. 1-30 BOOTP Module.............................................................................................. 1-30 TFTP Module.................................................................................
BC - Block of Memory Compare ....................................................................3-5 BF - Block of Memory Fill ...............................................................................3-7 BI - Block of Memory Initialize ....................................................................3-10 BM - Block of Memory Move .......................................................................3-12 BR - Breakpoint Insert NOBR - Breakpoint Delete................................................
MAE - Macro Edit........................................................................................ 3-117 MAL - Enable Macro Listing NOMAL - Disable Macro Listing .............................................................. 3-119 MAR - Load Macros .................................................................................... 3-120 MAW - Save Macros.................................................................................... 3-122 MD, MDS - Memory Display..................................
T - Trace .........................................................................................................3-216 TA - Terminal Attach....................................................................................3-220 TIME - Display Time and Date ..................................................................3-221 TM - Transparent Mode ..............................................................................3-222 TT - Trace to Temporary Breakpoint .......................................
System Call Routines.............................................................................................. 5-2 .INCHR ............................................................................................................. 5-7 .INSTAT ............................................................................................................ 5-8 .INLN ................................................................................................................ 5-9 .READSTR ...................
.DIVU32...........................................................................................................5-67 .CHK_SUM .....................................................................................................5-68 .BRD_ID ..........................................................................................................5-69 .ENVIRON ......................................................................................................5-72 .PFLASH Function ..........................
APPENDIX C PPCBug Messages Introduction ............................................................................................................ C-1 Error Messages ....................................................................................................... C-1 Other Messages ...................................................................................................... C-2 APPENDIX D S-Record Format Introduction ......................................................................
List of Tables Table 1-1. LED/Serial Startup Diagnostic Codes ...............................................1-8 Table 3-1. Debugger Commands...........................................................................3-1 Table 5-1. System Call Routines -- Hex Code Order ..........................................5-2 Table 5-2. System Call Routines -- Alphabetical Order......................................5-4 Table 5-3. Disk Packet Parameters ...................................................................
List of Figures Figure 1-1. Network Boot Modules ....................................................................1-29 Figure 3-1. Boot Record ......................................................................................3-172 Figure 3-2. PowerPC Reference Platform Partition Table Entry...................3-173 Figure 3-3. Layout of the $41-Type Partition...................................................
1General Information 1 PPCBug Overview PPCBug is a powerful evaluation and debugging tool for systems built around the Motorola PowerPC microprocessors. PPCBug firmware consists of three parts: ❏ Command-driven user-interactive software debugger. It is hereafter referred to as the debugger, which is described in this manual. Debugging commands are available for loading and executing user programs under complete operator control for system evaluation.
1 Comparison with other Motorola Bugs They are collectively referred to in this manual as the PowerPC board or board. The debugger includes: ❏ Commands for display and modification of memory ❏ Breakpoint and tracing capabilities ❏ Assembler and disassembler useful for patching programs Various PPCBug routines that handle I/O, data conversion, and string functions are available to user programs through the System Call handler.
General Information The executable code is checksummed at every power-on or reset firmware entry. The result is checked with a pre-calculated checksum contained in the last 16-bit word of the Flash image. ! Caution Although a command to allow the erasing and reprogramming of this Flash memory is available to you, keep in mind that reprogramming any portion of Flash memory will erase everything currently contained in Flash, including PPCBug.
1 Set-up Set-up Refer to the board installation and use manual for information on installing the hardware, configuring jumpers, and assigning the console monitor. Start-up At either power-up or system reset, PPCBug performs the MPU, hardware, and firmware initialization process (refer to MPU, Hardware, and Firmware Initialization on page 1-5). This process includes a checksum of the FLASH memory contents.
General Information The system performs the self test diagnostics if you do not terminate system start-up. Upon successful completion of these tests, the system pauses another five seconds. You may terminate start-up, and exit to the diagnostics prompt, by pressing ESC or the Break key. If you do not terminate system start-up, the system begins the boot routine that has been set up in the ENV command, either NVRAM Boot List Boot, Auto Boot, ROMboot, or Network Auto Boot.
1 Start-up 13. Set base address of memory to $00000000. 14. Retrieve the speed of read/write memory from NVRAM. 15. Initialize read/write memory controller with the speed of read/write memory. 16. Retrieve the speed of read only memory (i.e., FLASH) from NVRAM. 17. Initialize read only memory controller with the speed of read only memory. 18. Enable the MPU's instruction cache. 19. Copy the MPU's exception vector table from $FFF00000 to $00000000. 20.
General Information 30. Verify the configuration data that is resident in NVRAM, and display a warning message if the verification failed. 31. Calculate and display the MPU clock speed. Verify that the MPU clock speed matches the configuration data, and display a warning message if the verification fails. 32. Display the BUS clock speed. Verify that the BUS clock speed matches the configuration data, and display a warning message if the verification fails. 33.
1 Start-up Under normal conditions, the startup sequence begins at 0x1100 and continues to the PPC1-Bug> prompt just after 0x11D4. RAM initialization problems may cause the startup sequence to terminate at the : (RawBug) prompt just after 0x11D8 instead. The operating system boot sequence begins at 0x11E0 with the creation of residual data and continues to 0x11EC just before execution is passed to the boot image. The OS may have its own LED codes which are displayed after 0x11EC.
General Information Table 1-1.
1 Start-up Table 1-1.
General Information Table 1-1.
1 Running the Diagnostics and Debugger Table 1-1. LED/Serial Startup Diagnostic Codes (Continued) Code (Hex) 11EA 11EC Location in Startup Adding ISA device information Residual data completed 12nn Probing PCI conÞg space (board speciÞc) Running the Diagnostics and Debugger In order to use the diagnostics, terminate the start-up process by pressing ESC or the Break key during one of the four pauses (PowerPlus architecture boards in their default configuration may not pause at any of the four places.
General Information Auto Boot Note The PowerPlus architecture boards do not execute a configured boot routine. Auto Boot is the default boot routine. It provides an independent mechanism for booting an operating system. No console is required. Autoboot selects the boot device from either a scan list of device types, a floppy diskette, a CD-ROM, tape, or a hard disk.
1 ROMboot ROMboot Note The PowerPlus architecture boards do not execute a configured boot routine. ROMboot is a mechanism for booting an operating system from a user-defined routine stored in ROM. ROMboot executes at powerup (or optionally at reset) if it is configured and enabled in parameters set with the ENV command. It may also be executed with the RB (ROMboot) command. Refer to Chapter 3 for information on setting the ENV command parameters for enabling ROMboot.
General Information The format of the beginning of the routine is: Offset Length Contents Description $00 4 bytes BOOT ASCII string indicating possible routine; the checksum must be valid $04 4 bytes Entry Address Word offset from ÒBOOTÓ $08 4 bytes Routine Length Word; includes length from ÒBOOTÓ to and including a twobyte checksum $0C Length Routine name of name ASCII string containing routine name If you want to make use of ROMboot, you do not have to fill a complete FLASH device.
1 ROMboot established that the routine was meant to be used for ROMboot. Under control of the ENV command, the sequence of searches is as follows: 1. Search direct address for ÒBOOTÓ. The direct address points to an installed ROMboot routine. It is a variable that may be set using the ENV command. 2. Search complete ROM map. 3. Search local RAM, at all 8KB boundaries starting at the beginning of local RAM. 4.
General Information Do the following to prepare the ROMboot routine (includes checksum calculation): 1. Assemble and link the code, leaving $00 in the even and odd locations destined to contain the checksum. 2. Load the routine into RAM (with S-records via the LO command, or from magnetic media using IOP). 3. Display entire ROMboot routine (checksum bytes are at $00010038 and $00010039).
1 Network Auto Boot 8. Verify the functionality of the user ROMboot routine with the RB command. PPC1-Bug>RB; V ROMboot about to Begin... Press to Bypass, to Continue Direct Add: FFC00000 FFFFFFFC: Searching for ROMboot Module at: 00010000 Executing ROMboot Module “TEST” at 00010000 MON MAR 27 10:39:08.00 1995 PPC1-Bug> The sample ROMboot routine is now ready for use.
General Information During the delay, you can gain control without Network Autoboot by pressing either the BREAK key or the software abort or reset switches. Network Autoboot is controlled by parameters contained in the NIOT and ENV commands. These parameters allow the selection of specific boot devices, systems, and files and allow programming of the boot delay. Refer to the NIOT and ENV commands in Chapter 3 for more details.
1 Restarting the System Abort Abort is invoked by pressing and releasing the ABORT switch. Whenever abort is invoked while executing a user program (running target code), a snapshot of the processor state is captured and stored in the target registers. (When working in the debugger, abort captures and stores only the Instruction Pointer, status register, and format and vector information.) For this reason, abort is most appropriate when terminating a user program that is being debugged.
General Information Break A break is generated by pressing and releasing the BREAK key on the current-console keyboard. Break does not generate an interrupt. The only time break is recognized is when characters are sent or received by the console port. Break removes any breakpoints in the user code and keeps the breakpoint table intact. Break also takes a snapshot of the machine state if the function was entered using SYSCALL. This machine state is then accessible to you for diagnostic purposes.
1 Restarting the System SYSFAIL* Assertion and Negation (MVME230x, MVME260x, MVME360x, and MVME460x) On VMEbus boards, the board fail is the same as the SYSFAIL indicator. At reset or power-up, the debugger asserts the VMEbus SYSFAIL* line (refer to the VMEbus specification). The SYSFAIL* line is negated if debugger initialization is done and if none of the board failure conditions have occurred. However, SYSFAIL* stays asserted if any of the board failure conditions have occurred.
General Information Disk I/O Support The debugger can initiate disk input and output by communicating with intelligent disk controllers over the PCI bus. Disk support facilities built into the debugger consist of command-level disk operations, disk I/O system calls (only via one of the system call instructions) for use by user programs, and defined data structures for disk parameters (refer to Chapter 5 for information on system calls).
1 Disk I/O Support initiate the transfer. If the conversion from blocks to sectors yields a fractional sector count, an error is returned and no data is transferred. Device Probe A device probe with entry into the device descriptor table is done whenever a specified device is accessed. This happens when system calls .DSKRD, .DSKWR, .DSKCFIG, .DSKFMT, and .DSKCTRL, and commands IOC, IOP, IOT, MAR, MAW, and PBOOT are used. The device probe mechanism utilizes the SCSI commands Inquiry and Mode Sense.
General Information IOP (Physical I/O to Disk) ! Caution If you start the IOP format procedure, it must be allowed to complete (PPC1Bug> prompt returns) or else the disk drive may be totally disabled. This format procedure may take as long as half an hour. The IOP command allows you to read or write blocks of data, or to format the specified device in a certain way. IOP creates a command packet from the arguments you specify, and then invokes the proper system call function to carry out the operation.
1 Disk I/O Support Disk I/O via Debugger System Calls All operations that actually access the disk are done directly or indirectly by debugger system calls. (The command-level disk operations provide a convenient way of using these system calls without writing and executing a program.) The following system calls are provided to allow user programs to do disk I/O: .DSKRD .DSKWR .DSKCFIG .DSKFMT .
General Information The packets which a controller module expects to receive vary from controller to controller. The disk driver module for the particular board module must take the standardized packet given to a trap function and create a new packet which is specifically tailored for the disk drive controller it is sent to. Refer to documentation on the particular controller module for the format of its packets. Refer to the IOC command in Chapter 3 for sending command packets.
1 Network I/O Support Network I/O Support The network autoboot firmware provides the capability to boot the CPU through the ROM debugger using a network (local Ethernet interface) as the boot device. The booting process is executed in two distinct phases. ❏ The first phase allows the diskless remote node to discover its network identify and the name of the file to be booted. ❏ The second phase has the diskless remote node reading the boot file across the network into its memory.
General Information Boot Control Module (Two phases) Bootstrap Protocol (BOOTP) RFC 951 Trivial File Transfer Protocol (TFTP) RFC 783 User Datagram Protocol (UDP) RFC 768 Address Resolution Protocol (ARP) RFC 826 Reverse Address Resolution Protocol (RARP) - RFC 903 Internet Protocol (IP) RFC 791 Ethernet Driver Physical Layer Manager 1273 9401 Figure 1-1.
1 Network I/O Support RARP and ARP Modules The Reverse Address Resolution Protocol (RARP) basically consists of an identity-less node that broadcasts a ÒwhoamiÓ packet onto the Ethernet and waits for an answer. The RARP server fills an Ethernet reply packet up with the target's Internet Address and sends it. The Address Resolution Protocol (ARP) basically provides a method of converting protocol addresses (e.g., IP addresses) to local area network addresses (e.g., Ethernet addresses).
General Information Network I/O Error Codes PPCBug returns an error code if an attempted network operation is unsuccessful. Refer to Appendix H for an explanation of network I/O error codes. Multiprocessor Support (Remote Start) The PowerPC board dual-port RAM feature makes the shared RAM available to remote processors as well as to the local processor. This can be done by the following method. This method can be enabled/disabled by the ENV command as its Remote Start Switch method.
1 Multiprocessor Support (Remote Start) P ($50) Program FLASH Memory. The MPAR is set to the address of the FLASH memory program control packet. Ready; the Þrmware monitor is watching for a change R ($52) Code P is used only by the MVME260x, MVME360x, MVME460x, and MVME230x boards. You can only program FLASH memory by the MPCR method. See the .PFLASH system call for a description of the FLASH memory program control packet structure.
General Information If no terminal is connected to the port, the MPCR is still polled to see whether an external processor requires control to be passed to the dual-port RAM. If a terminal does respond, the MPCR is polled for the same purpose while the serial port is being polled for user input. A G placed in the MPCR by a remote processor indicates that the Go Direct type of transfer is requested (as with the GD command).
1 Byte Ordering Byte Ordering The MPU on the PowerPC board is programmed to big-endian byte ordering. Any attempt to use little-endian byte ordering will immediately render the debugger unusable.
2Using the Debugger 2 Entering Commands The debugger is command-driven and performs its various operations in response to commands that you enter at the keyboard. When the PPC1-Bug> prompt appears on the screen, the debugger is ready to accept commands. What you enter is stored in an internal buffer. Execution begins only after you press the Return key, allowing you to correct entry errors, if necessary, using the control characters (refer to Control Characters on page 2-7).
Entering Commands ❏ 2 Any required options. Precede an option or a string of options with a semi-colon (;). If no option is selected, the default options are used. Command entry is either uppercase or lowercase. Command Arguments The following arguments are common to many of the commands. Additional arguments are defined in the description of the particular command in which they occur.
Using the Debugger / divide by & logical AND << shift left >> shift right 2 Numeric values may be expressed in either hexadecimal, decimal, octal, or binary by immediately preceding them with the proper base identifier. Data Type IdentiÞe r Base Example Integer Hexadecimal $ $FFFFFFFF Integer Decimal & &1974, &10-&4 Integer Octal @ @456 Integer Binary % %1000110 If no base identifier is specified, then the numeric value is assumed to be hexadecimal.
Entering Commands Valid expression examples: 2 Expression Result (Hex) FF0011 FF0011 45+99 DE &45+&99 90 @35+@67+@10 5C %10011110+%1001 A7 88<<4 880 AA&F0 A0 << represents shift-left & represents logical AND The total value of the expression must be between 0 and $FFFFFFFF. ADDR The syntax for the ADDR argument is similar to the syntax accepted by the PowerPC one-line assembler. All control addressing modes are allowed. Refer to Addressing Modes in Chapter 4.
Using the Debugger Once a qualifier has been entered, it remains valid for all addresses entered for that command sequence, until either the debugger is reentered or another qualifier is provided. In the alternate register number (Rn) form, the debugger uses the address contained in MPU Register Rn, where n is 0 through 31 (i.e., 0, 1, . . . 31).
Entering Commands 2 PORT The PORT argument is the logical number of the port to be used to input or output. Valid port numbers which may be used for these commands are as follows: 0 or 00 Terminal port 0 (console port) is used for interactive user input and output (the default), or may also be used for the graphics adapter device. This port is labeled COM1 or SER1 or DEBUG on the PowerPC board or transition module.
Using the Debugger Control Characters 2 Some commands, such as CNFG, MM, or RM, allow you to edit parameter fields or the contents of registers or memory. You may use the following control characters to scroll through the listed items: V or v Go to the next Þeld, register, or memory location. This is the default, and remains in effect until changed by entering one of the other special characters. ^ Back up to the previous Þeld register, or memory location.
Entering and Debugging Programs The XON and XOFF characters in effect for the terminal port may be entered to control the output from any debugger command, if the XON/XOFF protocol is enabled (default). The characters initialized by PPCBug are (you may change them with the PF command): 2 CTRL-s Wait: halt console output (XON) CTRL-q Resume console output (XOFF). Entering and Debugging Programs There are various ways to enter a user program into system memory for execution.
Using the Debugger The System Call handler is accessible through the SC (system call) instruction, with exception vector $00C00 (System Call Exception). Refer to Chapter 5 for details on the routines available and how to invoke them from within a user program. Preserving the Operating Environment This section explains how to avoid contaminating the operating environment of the debugger. PPCBug uses some of the PowerPC board onboard resources to contain temporary variables and exception vectors.
Preserving the Operating Environment Whenever the host hardware is reset, the target IP is initialized to $00004000 (i.e., just above the memory space of the exception vector table), and the target pseudo stack pointer is initialized to the starting location of the debugger's read/write memory space. The target IP will be set to the appropriate address if a program load operation (e.g., the PBOOT command) is initiated.
Using the Debugger MPU Register SPR275 2 MPU register SPR275 is reserved for usage by the debugger. If SPR275 is to be used by the user program, it must be restored prior to utilizing debugger resources (system calls) and or returning control to the debugger. MPU Registers SPR272-SPR274 These MPU registers are utilized by debugger as scratch registers. Context Switching Context switching is the switching from the debugger state to the user (target) state, or vice versa.
Context Switching PPC604-based boards: 2 R0-R31 General Purpose Registers FR0-FR31 Floating Point Unit Data Registers SR0-SR15 Segment Registers SPRn Special Purpose Registers (n is 1, 8, 9, 18, 19, 22, 25, 26, 27 268, 269, 275, 282, 287, 528 - 543, 1008, 1010, 1013, 1023) IP Instruction Pointer (copy of SPR26) MSR Machine State Register (copy of SPR27) CR Condition Register FPSCR Floating Point Status/Control Register When the context switch transitions from the debugger state to the use
Using the Debugger Note that on a restoration context switch, registers whose perspectives feature MMU characteristics and operating modes of the MPU are not restored. The debugger honors the user's MMU configuration. If the user's program wishes to utilize the programmatic interface (i.e., system calls) of the debugger, it must maintain the address translation of 1 to 1, and the I/O resources utilized by the debugger must be data cache inhibited.
Floating Point Support 2 ❏ The sign field, the exponent field, and at least the first digit of the mantissa field must be present (any unspecified digits in the mantissa field are set to zero). ❏ Each field must be separated from adjacent fields by an underscore. ❏ All the digit positions in the sign and exponent fields must be present.
Using the Debugger Scientific Notation 2 The scientific notation format provides a convenient way to enter and display a floating point decimal number. Internally, the number is assembled into a packed decimal number and then converted into a number of the specified data type. Entering data in this format requires the following fields: ❏ An optional sign bit (+ or -). ❏ One decimal digit followed by a decimal point. ❏ Up to 17 decimal digits (at least one must be entered).
3Debugger Commands 3 Introduction This chapter contains descriptions of each debugger command, with one or more examples of each. The debugger commands are listed in Table 3-1. Debugger Commands Each of the individual command is described in the following pages. The command syntax is shown using the symbols explained in Chapter 2. Table 3-1.
Debugger Commands Table 3-1.
Debugger Commands Table 3-1.
3Debugger Commands AS - One-Line Assembler AS - One-Line Assembler Command Input 3 AS ADDR Description The AS command provides access to the one-line assembler. It is synonymous with the Memory Modify (MM) command when used with the DI option (MM ADDR ;DI). Refer to MM - Memory Modify on page 3-129 for details on using the MM command. Refer to Chapter 4 for information on using the one-line assembler.
BC - Block of Memory Compare BC - Block of Memory Compare Command Input 3 BC RANGE ADDR [;B|H|W] Options B Byte H Half-word W Word Description The BC command compares the contents of memory defined by RANGE with another place in memory, beginning at ADDR. The option field is only allowed when RANGE is specified using a COUNT. In this case, the B, H, or W defines the size of the data that the COUNT is referring to.
BC - Block of Memory Compare Example 2: Compare the memory, with nothing printed. PPC1-Bug>BC 20000:20 21000;B Effective address: 00020000 Effective count : &32 Effective address: 00021000 PPC1-Bug> 3 Example 3: Create a mismatch (using the MM command), and prints out the mismatches. PPC1-Bug>MM 2100F;B 0002100F 21? 0.
BF - Block of Memory Fill BF - Block of Memory Fill Command Input 3 BF RANGE data [increment] [;B|H|W] Arguments data Data pattern to be written to memory. If data does not Þt into the selected data Þeld length, then leading bits are truncated to make it Þt. If truncation occurs, then a message is printed stating the data pattern which was actually written (or initially written if you speciÞed an increment). increment Value that data is incremented following each write.
BF - Block of Memory Fill If the upper address of the range is not on the correct boundary for an integer multiple of the data to be stored, then data is stored to the last boundary before the upper address. No address outside of the specified range is ever disturbed in any case. The Effective address messages displayed by the command show exactly where data was stored. 3 Examples Example 1: For this example, assume that memory from $20000 through $2002F is clear.
BF - Block of Memory Fill Example 3: For this example, assume that memory from $20000 through $2002F is clear. The word pattern does not fit evenly in the given range. Only one word is written and the Effective address messages reflect the fact that data is not written all the way up to the specified address.
BI - Block of Memory Initialize BI - Block of Memory Initialize Command Input 3 BI RANGE [;B|H|W] Options B Byte H Half-word W Word Description The BI initializes parity for a block of memory. The BI command is non-destructive; if the parity is correct for a memory location, then the contents of that memory location are not altered. The limits of the block of memory to be initialized may be specified using a RANGE.
BI - Block of Memory Initialize Example 2: For this example, assume system memory from $0 to $000FFFFF.
BM - Block of Memory Move BM - Block of Memory Move Command Input 3 BM RANGE ADDR [;B|H|W] Options B Byte H Half-word W Word Description The BM command copies the contents of the memory addresses defined by RANGE to another place in memory, beginning at ADDR. The option field is only allowed when RANGE is specified using a COUNT. In this case, the B, H, or W defines the size of the data that the COUNT is referring to.
BM - Block of Memory Move PPC1-Bug>BM 21000 2100F 20000 Effective address: 00021000 Effective address: 0002100F Effective address: 00020000 PPC1-Bug> PPC1-Bug>MD 20000:10;H 00020000 5448 4953 2049 5320 4120 5445 5354 2121 00020010 0000 0000 0000 0000 0000 0000 0000 0000 PPC1-Bug> 3 THIS IS A TEST!! ................ Example 2: Patch assembly code in memory For this example, assume that you had a short program in memory at address 20000 (displayed with the MD command).
BM - Block of Memory Move PPC1-Bug>MD 20000 20014;DI 00020000 3C401000 ADDIS R2,R0,$1000 00020004 60420001 ORI R2,R2,$1 00020008 7C631078 ANDC R3,R3,R2 0002000C 7C631378 OR R3,R3,R2 00020010 7CA53214 ADD R5,R5,R6 PPC1-Bug> 3 3-14
BR - Breakpoint Insert NOBR - Breakpoint Delete BR - Breakpoint Insert NOBR - Breakpoint Delete Command Input 3 BR [ADDR[:COUNT]] NOBR [ADDR] Description The BR command sets a target code instruction address as a breakpoint address for debugging purposes. If, during target code execution, a breakpoint with 0 count is found, the target code state is saved in the target registers and control is returned back to the debugger.
BR - Breakpoint Insert NOBR - Breakpoint Delete Examples Example 1: Set some breakpoints. PPC1-Bug>BR 1E000,1E200 1E700:&12 BREAKPOINTS 0001E000 0001E200 0001E700:C PPC1-Bug> 3 Example 2: Delete specified breakpoint. PPC1-Bug>NOBR 1E200 BREAKPOINTS 0001E000 0001E700:C PPC1-Bug> Example 3: Delete all breakpoints.
BS - Block of Memory Search BS - Block of Memory Search Command Input 3 BS RANGE TEXT [;B|H|W] or BS RANGE data [mask] [;B|H|W [,N] [,V]] Arguments TEXT An ASCII text string that is matched against a range of memory data Data pattern that is matched against a range of memory mask A string that indicates which bit positions in data to compare to memory (a one is compared, a zero is not). The default is all ones. Options B Byte H Half-word W Word N Non-aligned.
BS - Block of Memory Search String Search In the string search mode, a search is carried out for the TEXT argument. The size option Þeld indicates whether the COUNT Þeld of RANGE refers to bytes, half-words, or words. If RANGE is not speciÞed using a COUNT, then no options are allowed. If a match is found, then the address of the Þrst byte of the match is output. 3 Data Search In the Data Search mode, a data pattern (data) is matched against a range of memory.
BS - Block of Memory Search Data VeriÞcation If the V (verify) option has been selected, the addresses and data are displayed only when the memory contents do not match data. Otherwise this mode is identical to the Data Search mode. For all three modes, information on matches is output to the screen in a four-column format. If more than 24 lines of matches are found, then output is inhibited to prevent the first match from rolling off the screen.
BS - Block of Memory Search Example 3: Mode 1: The string is found, but it ends outside of the range, so the address of its first byte and a message are output. PPC1-Bug>BS 30000 3001F 'ConfigTableStart' Effective address: 00030000 Effective address: 0003001F 00030014 -last match extends over range boundaryPPC1-Bug> 3 Example 4: Mode 1, using RANGE with COUNT and size option: COUNT is displayed in decimal, and address of each occurrence of the string is output.
BS - Block of Memory Search Example 8: Mode 2, using RANGE with COUNT, mask option, and size option: COUNT is displayed in decimal, and the actual unmasked data patterns found are displayed.
BV - Block of Memory Verify BV - Block of Memory Verify Command Input 3 BV RANGE data [increment] [;B|H|W] Arguments data Data pattern to be compared to memory. If data does not Þt into the selected data Þeld length, then leading bits are truncated to make it Þt. If truncation occurs, then a message is printed stating the data pattern which was actually written (or initially written if you speciÞed an increment). increment Value that data is incremented following each write.
BV - Block of Memory Verify If the upper address of the range is not on the correct boundary for an integer multiple of the data to be verified, data is verified to the last boundary before the upper address. No address outside of the specified range is read from in any case. The Effective address messages displayed by the command show exactly the extent of the area read from. Examples Example 1: For this example, assume memory from $20000 to $2002F is as indicated.
BV - Block of Memory Verify Example 3: For this example, assume memory from $20000 to $2002F is as indicated. Size is half-word, mismatches are printed out. 3 PPC1-Bug>MD 20000:18;H 00020000 0000 0001 0002 0003 0004 0005 0006 0007 00020010 0008 FFFF 000A 000B 000C 000D 000E 000F 00020020 0010 0011 0012 0013 0014 0015 0016 0017 PPC1-Bug> PPC1-Bug>BV 20000:18 0 1;H Effective address: 00020000 Effective count : &48 00020012|FFFF PPC1-Bug> 3-24 ................ ................ ..........
CM - Concurrent Mode NOCM - No Concurrent Mode CM - Concurrent Mode NOCM - No Concurrent Mode Command Input 3 CM [[PORT] [ID-STRING] [BAUD] [PHONE-NUMBER]]|[;A]|[;H] NOCM Arguments ID-STRING Device (i.e. modem) with which communications is established before the concurrent mode session is activated. If no identiÞer string is speciÞed, CM will use an identiÞer string of ÒDUMBÓ by default. The identiÞer string must be one that is supported.
CM - Concurrent Mode NOCM - No Concurrent Mode Options 3 A List all supported devices. H Displays whether concurrent mode is active or not, and if it is, what secondary port number is being used by it. Description The CM command activates a mode in which everything that appears on the system console terminal is also echoed to the port specified by the PORT argument. PORT is checked for inbound characters. These are also echoed to the system console terminal.
CM - Concurrent Mode NOCM - No Concurrent Mode Example 2: Activate the concurrent mode. PPC1-Bug>CM Concurrent Mode Active 3 This results in the default settings remaining intact: PORT 1 ID-STRING DUMB BAUD 9600 (default if ID-STRING is ÒDUMBÓ) PHONE-NUMBER null Example 3: Activate the concurrent mode, with changes to the modem and the phone number.
CM - Concurrent Mode NOCM - No Concurrent Mode This results in the following changes: 3 PORT 2 ID-STRING UDS2980 BAUD 1200 PHONE-NUMBER 18007777777 Example 5: Activate the concurrent mode, with error. PPC1-Bug>CM 2,,DUMB Concurrent Mode Setup Failure PPC1-Bug> Example 6: Terminate the concurrent mode. PPC1-Bug>NOCM Concurrent Mode Terminated PPC1-Bug> Example 7: Attempt to terminate the previously terminated concurrent mode.
CNFG - Configure Board Information Block CNFG - Configure Board Information Block Command Input 3 CNFG [;[I] [M]] Options I Initialize the board information block to zero. M Modify the board information block. Description The CNFG command displays the configure the board information block, and allows you to change the contents. The board information block, which is resident within the Non-Volatile RAM (NVRAM), contains various elements detailing specific operation parameters of the PowerPC board.
CNFG - Configure Board Information Block Option M allows you to modify the board information block. When invoked, this command prompts for entry into each field. You may change the displayed value by typing a new value, followed by the Return key. To leave the field unaltered, press the Return key without typing a new value. 3 You may also enter a special character, either at the prompt or after typing new data, for scrolling through the fields. The special characters are: V or v Go to the next Þeld.
CNFG - Configure Board Information Block needs to be done if the firmware complains that there is a mismatch in values. To correct it, invoke CNFG;M from the firmware command line to correct the mismatched values.
CNFG - Configure Board Information Block Example 3: Modify the Board Information Block.
CS - Checksum CS - Checksum Command Input 3 CS RANGE [;B|H|W] Options B Byte H Half-word W Word Description The CS command calculates a checksum to verify the contents of a block of memory. It uses the same checksum routine that is run at system start-up. The checksum algorithm works as follows: 1. The checksum variable is set to zero. 2. Each data element is added to the checksum. If a carry is generated, a one is added to the checksum variable.
CS - Checksum Examples Example 1: Default size is word. PPC1-Bug>CS 1000 2000 Effective address: 00001000 Effective address: 00001FFF Checksum: FF8D3E87 PPC1-Bug> 3 Example 2: Size is set to half-word. PPC1-Bug>CS 1000 2000;H Effective address: 00001000 Effective address: 00001FFF Checksum: 3E15 PPC1-Bug> Example 3: Size is set to byte, COUNT is in hexadecimal.
CSAR - PCI Configuration Space READ Access CSAR - PCI Configuration Space READ Access Command Input 3 CSAR busnum devnum function addr [;B|H|W] Options B Byte H Half-word W Word (default) Description The CSAR command reads the location in PCI configuration space of the device at the PCI bus number specified by: busnum = the PCI bus number to be read devnum = the device number to be read function = the device function number to be read addr = the offset into the device conÞguration registers.
CSAW - PCI Configuration Space WRITE Access CSAW - PCI Configuration Space WRITE Access Command Input 3 CSAW busnum devnum function addr data [;B|H|W] Options B Byte H Half-word W Word (default) Description The CSAW command writes data to the location of the device in PCI configuration space at the PCI bus number specified by: busnum = the PCI bus number to be read devnum = the device number to be read function = the device function number to be read addr = the offset into the device conÞgur
DC - Data Conversion DC - Data Conversion Command Input 3 DC EXP | ADDR [;[B] [O] [A]] Options B Display the output in binary O Display the output in octal A Display the ASCII character equal to the value. If the value is greater than $7F, the A option displays NA. Description The DC command calculates an expression into a single numeric value. This equivalent value is displayed in its hexadecimal and decimal representation. If the numeric value could be interpreted as a signed negative number (i.
DC - Data Conversion Example 4: PPC1-Bug>DC (2*3*8)/4 0000000C = $C = &12 PPC1-Bug> 3 Example 5: PPC1-Bug>DC 55&F 00000005 = $5 = &5 PPC1-Bug> Example 6: PPC1-Bug>DC 55>>1 0000002A = $2A = &42 PPC1-Bug> Example 7: PPC1-Bug>DC 1+2;B DATA BIT: 33222222222211111111110000000000 NUMBER>>: 10987654321098765432109876543210 BINARY : 00000000000000000000000000000011 PPC1-Bug> Example 8: PPC1-Bug>DC 1+2;BO DATA BIT: 33222222222211111111110000000000 NUMBER>>: 10987654
DC - Data Conversion Example 10: For this example, assume R2=00030000 and the following data resides in memory: 00030000 11111111 22222222 33333333 44444444 ....
DMA - Block of Memory Move DMA - Block of Memory Move Note 3 This command works for MVME160x series modules only. Command Input DMA RANGE ADDR VDIR AM BLK [;B|H|W] Arguments VDIR Direction of the transfer. 0 means the transfer occurs from the local bus to the VMEbus; 1 means the transfer occurs from the VMEbus to the local bus. AM VMEbus address modiÞer of the transfer. Refer to the VMEbus speciÞcation for the complete list of address modiÞers.
DMA - Block of Memory Move Options B Byte H Half-word W Word 3 Description The DMA command moves blocks of data from the local bus to the VMEbus, or from the VMEbus to the local bus. This command. utilizes the hardware capability of Direct Memory Access (DMA). Refer to the board installation and use manual for a detailed description of DMA. You can not perform a DMA from the local bus to the local bus, or from the VMEbus to the VMEbus.
DMA - Block of Memory Move Note If the block transfer modes are used to transfer data make sure that your VMEbus and VME memory actually support the block transfer modes. 3 When the command is given on a non-VMEbus board, the following message is shown: This system does not host a VMEbus. Be sure to set the high bit when specifying the address for the local memory. Setting the high bit directs the address to the PCI bus. The PCI bus actually strips the high bit and passes the address onward.
DMA - Block of Memory Move First a range is given for the source location of the data on the VMEbus. Note that this is an exact address on the VMEbus. (From the beginning of the VME memory ($01000000 to $01800000). The destination for the memory transfer is back to local memory on the board beginning at $0. Notice, that on the destination address the high bit is set. This is due to the PCI bus, the PCI bus masks the high bit and the actual data transfer maps to $0 (the beginning of local memory).
DMA - Block of Memory Move 000000F0 00000100 00000110 00000120 00000130 00000140 00000150 00000160 00000170 00000180 00000190 000001A0 000001B0 000001C0 000001D0 000001E0 000001F0 PPC1-Bug> 3 000000F0 00000100 00000110 00000120 00000130 00000140 00000150 00000160 00000170 00000180 00000190 000001A0 000001B0 000001C0 000001D0 000001E0 000001F0 000000F4 00000104 00000114 00000124 00000134 00000144 00000154 00000164 00000174 00000184 00000194 000001A4 000001B4 000001C4 000001D4 000001E4 000001F4 000000F8
DMA - Block of Memory Move Example 3: Transfer data from the local bus to the VMEbus. First, show the data at the destination so we can see it change. PPC1-Bug>MD 100000:40 00100000 7C3043AF 7CFFFBBF 7C3143A7 48FFFFDF |0C.|...|1C.H... 00100010 00000001 00FFFC0F 00000003 00FFFFFF ................ 00100020 00048003 00FFFFFF 00000008 00FFFEEF ................ 00100030 0000000F 00FFFFFF 0000000D 00FFFEEF ................ 00100040 00000000 00FFF10F 0000000E 00FFFD5F ...............
DMA - Block of Memory Move View the transferred data: PPC1-Bug>MD C1000000:40 C1000000 7C3043AF 7CFFFBBF 7C3143A7 C1000010 00000001 00FFFC0F 00000003 C1000020 00048003 00FFFFFF 00000008 C1000030 0000000F 00FFFFFF 0000000D C1000040 00000000 00FFF10F 0000000E C1000050 00000000 00FFF2EF 00000003 C1000060 0000000E 00FFFFFF 0000000A C1000070 0000068E 00FFFFBF 00000001 C1000080 00000002 00FFF39F 00000002 C1000090 00000001 00FFF91F 00000003 C10000A0 0000800F A0FFFFFF 0000020F C10000B0 0000000D 00FFFFEF 0
DMA - Block of Memory Move PPC1-Bug>DMA 01000000:10 80002000 1 D 0 Effective address: 01000000 Effective count : &64 Effective address: 80002000 DMA Completion Status =00000001 PPC1-Bug>MD 00002000:10 00002000 5A5A5A5A 5A5A5A5A 5A5A5A5A 5A5A5A5A ZZZZZZZZZZZZZZZZ 00002010 5A5A5A5A 5A5A5A5A 5A5A5A5A 5A5A5A5A ZZZZZZZZZZZZZZZZ 00002020 5A5A5A5A 5A5A5A5A 5A5A5A5A 5A5A5A5A ZZZZZZZZZZZZZZZZ 00002030 5A5A5A5A 5A5A5A5A 5A5A5A5A 5A5A5A5A ZZZZZZZZZZZZZZZZ 3 Example 5: Attempt to DMA to non-existen
DS - One-Line Disassembler DS - One-Line Disassembler Command Input 3 DS ADDR [:COUNT | ADDR] Description The DS command enables the one-line disassembler. This command is synonymous with the Memory Display (MD) command when used with the DI option (MD ADDR;DI). Refer to MD, MDS Memory Display on page 3-124 for details. Refer to Chapter 4 for information on using the one-line assembler.
DU - Dump S-Records DU - Dump S-Records Command Input 3 DU [PORT] RANGE [TEXT] [ADDR] [OFFSET] [;B|H|W] Description The DU command outputs data from memory in the form of Motorola S-records to a port you specified. If port is not specified, the S-records are sent to the host port, and the missing port number must be delimited by two commas. A size option is allowed only if a COUNT was entered as part of the RANGE, and defines the units of the COUNT. The default data type is byte.
DU - Dump S-Records Examples Example 1: Dump memory from $20000 to $2002F to port 1. PPC1-Bug>DU ,,20000 2002F Effective address: 00020000 Effective address: 0002002F PPC1-Bug> 3 Example 2: Dump 10 bytes of memory beginning at $30000 to the terminal screen (port 0). PPC1-Bug>DU 0 30000:&10 Effective address: 00030000 Effective count : &10 S0030000FC S20E03000026025445535466084E4F7B S9030000FC PPC1-Bug> Example 3: Dump memory from $20000 to $2002F to host (port 1).
ECHO - Echo String ECHO - Echo String Command Input 3 ECHO [PORT] {hexadecimal number} {'string'} Description The ECHO command displays strings to a configured port. ASCII strings can be entered by enclosing them in single quotes ('). To include a quote as part of a string, enter two consecutive quotes. The hexadecimal number allows printing , , and other control symbols. A hexadecimal number must have two digits before it is displayed.
ECHO - Echo String Example 4: This example handles a string with quotes.
ENV - Set Environment ENV - Set Environment Command Input 3 ENV [;[D]] Description The ENV command allows you to view and configure all PPCBug operational parameters that are kept in Non-Volatile RAM (NVRAM). The operational parameters are saved in NVRAM and used whenever power is lost. (The NVRAM is also known as the Battery Backed Up RAM.) Any time PPCBug uses a parameter from NVRAM, the NVRAM contents are first tested by checksum to insure the integrity of the NVRAM contents.
ENV - Set Environment You may also enter a special character, either at the prompt or after typing new data, for scrolling through the fields. The special characters are: 3 V or v Go to the next Þeld. This is the default, and remains in effect until changed by entering one of the other special characters. ^ Back up to the previous Þeld. This remains in effect until changed by entering one of the other special characters. = Re-open the same Þeld .
ENV - Set Environment 3. Determine any necessary VMEbus translation offset. The offset value is added to the VMEbus address to create the PCI bus address. 4. Determine the necessary VMEbus slave image control. The value used for slave image control is made up of several bit fields which specify how reads and writes will be processed by the Universe device. The desired value can be determined by progressively ORing together the selected bit fields described below.
ENV - Set Environment To enable prefetch reads for incoming VMEbus block read cycles, OR the following value with those chosen above: 0x20000000 3 To enable posted writes of incoming data on the VMEbus, OR the following value with those chosen above: 0x40000000 To enable the selected VME Slave Image Map Decoder, OR the following value with those chosen above: 0x80000000 As an example, a control value of: 0xE0F20000 decodes A32, non-privileged and supervisor, data and program VMEbus space, with prefetch r
ENV - Set Environment LED/Serial Startup Diagnostic Codes These codes can be displayed at key points in the initialization of the hardware devices. Should the debugger fail to come up to a prompt, the last code displayed will indicate how far the initialization sequence had progressed before stalling. The codes are enabled by an ENV parameter: Serial Startup Code Master Enable [Y/N]=N? A line feed can be inserted after each code is displayed to prevent it from being overwritten by the next code.
FORK - Fork Idle MPU at Address FORK - Fork Idle MPU at Address Note 3 This command is for multi-processor boards only. Command Input FORK MPU# ADDR Description The FORK command allows you to fork an idle processor to target code that is pointed to by the ADDR argument. The MPU# argument depends on your configuration and idle processors present. It is the target code's responsibility to load the processor's registers.
FORKWR - Fork Idle MPU with Registers FORKWR - Fork Idle MPU with Registers Note This command is for multi-processor boards only. 3 Command Input FORKWR MPU# Description The FORKWR command allows you to fork an idle processor to target code. The associated register set is loaded before execution. The MPU# argument depends on your configuration and idle processors present. The idle processor's registers can be examined/modified by the commands IRD, IRM, and IRS.
GD - Go Direct (Ignore Breakpoints) GD - Go Direct (Ignore Breakpoints) Command Input 3 GD [ADDR] Description The GD command starts target code execution. If an address is specified, it is placed in the target IP. Execution starts at the target IP address. Unlike GO, breakpoints are not inserted. Once execution of the target code has begun, control may be returned to the debugger by one of the following conditions: ❏ The abort or reset switch on the debugger host was pressed.
GD - Go Direct (Ignore Breakpoints) PPC1-Bug>BR 20028 BREAKPOINTS 00020028 PPC1-Bug> 3 Initialize R7 and start target the program. PPC1-Bug>RM R7 R7 =00000000 ? FFFFFFFF. PPC1-Bug> PPC1-Bug>GD 20000 Effective address: 00020000 To exit target code, press the abort switch. Note that the breakpoint was not taken.
GEVBOOT - Global Environment Variable Boot GEVBOOT - Global Environment Variable Boot Command Input 3 GEVBOOT Variable-Name Description The GEVBOOT command permits the user to boot the system using a Global Environment Variable, Variable-Name, which is a Òfw-boot-pathÓ. Background: Residual Data and Boot List Recent releases of IBM AIX requires that the PRP style of residual data be provided by the system firmware. Previous releases of IBM's AIX did not require that residual data be implemented.
GEVBOOT - Global Environment Variable Boot Requirements Some high-level requirements that this release meets are: ❏ Residual Data as specified above. ❏ Boot List Support via "fw-boot-path", "fw-boot-device", and "boot-file" global environment variables ❏ Network Boot, PRP style ❏ OEM Banner support ❏ Initialization of the PIRQx (PCI Interrupts) route control registers. ❏ System uniqueness (i.e.
GEVBOOT - Global Environment Variable Boot ❏ fw-boot-path This variable contains a list (four maximum) of boot devices which can be booted from. The OS maintains this variable. This is a read-only variable from the firmware's perspective. (The firmware does not impose any limit upon the length of this list.) However, this variable may be modified by utilizing the GEVEDIT command. ❏ fw-boot-device This variable contains the boot device path from the current boot device (i.e.
GEVBOOT - Global Environment Variable Boot Styles of Booting The older Motorola mode of mass storage device booting was also preserved for backward compatibility. However, priority is given to the new style of booting (i.e., NVRAM boot list). The older product supports booting from the network. However, it does not support it as per the PRP specification. The PRP specification specifies the boot image from a mass storage device to be the same when booting from a network interface.
GEVBOOT - Global Environment Variable Boot NVRAM Boot List (GEV.fw-boot-path) Boot Enable [Y/N], defaults to 'Y' NVRAM Boot List (GEV.fw-boot-path) Boot at power-up only [Y/N], defaults to 'N' NVRAM Boot List (GEV.fw-boot-path) Boot Abort Delay, defaults to 5 The default state of the ENV configuration parameter is set to 'Y' for yes/enabled. This gives boot priority to the devices listed within the "fw-boot-path" GEV.
GEVBOOT - Global Environment Variable Boot fw-boot-path needs to be defined as a device that was shown to be available via ioi PPC1-Bug>gevshow fw-boot-device=/pci@80000000/pci1011,9@e,0:0,0 ClientIPAddr=144.191.24.121 ServerIPAddr=144.191.24.252 GatewayIPAddr=144.191.12.252 NetMask=255.255.255.0 boot-file=/usr/tmp/jdcham.
GEVDEL - Global Environment Variable Delete GEVDEL - Global Environment Variable Delete Command Input 3 GEVDEL Variable-Name Description The GEVDEL command permits the user to selectively delete a Global Environment Variable, Variable-Name. Example PPC1-Bug>gevdel testvar testvar=12345 Update Global Environment Area of NVRAM (Y/N)? y PPC1-Bug> Show that the variable is deleted PPC1-Bug>gevshow fw-boot-device=/pci@80000000/pci1011,9@e,0:0,0 ClientIPAddr=144.191.24.121 ServerIPAddr=144.191.24.
GEVDUMP - Global Environment Variable(s) Dump GEVDUMP - Global Environment Variable(s) Dump Command Input 3 GEVDUMP Description The GEVDUMP command permits the user to dump to the console, in a hexadecimal/ASCII fashion, the contents of NVRAM (i.e., the PRP partition). These contents include the NVRAM Header + Data. Example PPC1-Bug>gevdump 01F8B000 00 04 01 02 07 E8 59 C3 02 00 01 00 00 00 00 00 ......Y......... 01F8B010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
GEVDUMP - Global Environment Variable(s) Dump 01F8B100 64 65 76 69 63 65 3D 2F 70 63 69 40 38 30 30 30 device=/pci@8000 01F8B110 30 30 30 30 2F 70 63 69 31 30 31 31 2C 39 40 65 0000/pci1011,9@e 01F8B120 2C 30 3A 30 2C 30 00 43 6C 69 65 6E 74 49 50 41 ,0:0,0.ClientIPA 01F8B130 64 64 72 3D 31 34 34 2E 31 39 31 2E 32 34 2E 31 ddr=144.191.24.1 01F8B140 32 31 00 53 65 72 76 65 72 49 50 41 64 64 72 3D 21.ServerIPAddr= 01F8B150 31 34 34 2E 31 39 31 2E 32 34 2E 32 35 32 00 47 144.191.24.252.
GEVEDIT - Global Environment Variable Edit GEVEDIT - Global Environment Variable Edit Command Input 3 GEVEDIT Variable-Name Description The GEVEDIT command permits the user to selectively edit a Global Environment Variable, Variable-Name. This writing of new, or modification of existing, global environment variables, is available from the command line (i.e., on demand), or at any time within the product (i.e., a function call).
GEVINIT - Global Environment Variable Initialization GEVINIT - Global Environment Variable Initialization Command Input 3 GEVINIT Description The GEVINIT command permits the user to initialize the NVRAM Header (i.e., the PRP partition) information. Initialization of the NVRAM PRP partition is available from the command line (i.e., on demand), or at any time when the system's firmware initializes itself (i.e., buginit()).
GEVSHOW - Global Environment Variable(s) Display GEVSHOW - Global Environment Variable(s) Display Command Input 3 GEVSHOW [string] Description The GEVSHOW command permits the user to selectively display the contents of a currently configured global environment variable (by typing string, where string is the name of a variable), or to display all currently configured global environment variables. Reading of global environment variables (GEV read) is available from the command line (i.e.
GN - Go to Next Instruction GN - Go to Next Instruction Command Input 3 GN Command Input The GN command sets a temporary breakpoint at the address of the next instruction (the instruction that follows the current instruction), and starts target code execution. After setting the temporary breakpoint, the sequence of events is similar to that of the GO command. GN is especially helpful when debugging modular code because it allows you to trace through a subroutine call as if it were a single instruction.
GN - Go to Next Instruction Execute up to the BL instruction. PPC1-Bug>RM IP IP =00020020 ? 20000.
GO - Go Execute User Program GO - Go Execute User Program Command Input 3 GO [ADDR] Description The GO command initiates target code execution. All previously set breakpoints are enabled. If an address is specified, it is placed in the target IP. Execution starts at the target IP address. The sequence of events is as follows: 1. If an address is specified, it is loaded in the target IP. 2.
GO - Go Execute User Program PPC1-Bug>DS 30000 00030000 3CA00000 ADDIS 00030004 2B040000 CMPLI 00030008 419A0014 BC 0003000C 98A30000 STB 00030010 3884FFFF ADDI 00030014 38630001 ADDI 00030018 4BFFFFEC B 0003001C 4E800020 BCLR PPC1-Bug> R5,R0,$0 CRF6,0,R4,$0 12,26,$0003001C R5,$0(R3) ($000410FE) R4,R4,$FFFFFFFF R3,R3,$1 $00030004 20,0 3 Initialize R3/R4, set some breakpoints, and start the target program. PPC1-Bug>RM R3 R3 =000410FE? 68000 R4 =00000000? 34.
GO - Go Execute User Program Continue target program execution.
GT - Go to Temporary Breakpoint GT - Go to Temporary Breakpoint Command Input 3 GT ADDR Command Input The GT command sets a temporary breakpoint and starts target code execution. A count may be specified with the temporary breakpoint. Control is given at the target IP address. All previously set breakpoints are enabled. The temporary breakpoint is removed when any breakpoint with a count of 0 is encountered.
GT - Go to Temporary Breakpoint PPC1-Bug>DS 30000:8 00030000 3CA00000 ADDIS 00030004 2B040000 CMPLI 00030008 419A0014 BC 0003000C 98A30000 STB 00030010 3884FFFF ADDI 00030014 38630001 ADDI 00030018 4BFFFFEC B 0003001C 4E800020 BCLR PPC1-Bug> 3 R5,R0,$0 CRF6,0,R4,$0 12,26,$0003001C R5,$0(R3) ($00041004) R4,R4,$FFFFFFFF R3,R3,$1 $00030004 20,0 Set a breakpoint. PPC1-Bug>BR 20014 BREAKPOINTS 00020014 PPC1-Bug> Set IP to start of program, set temporary breakpoint, and start target code.
GT - Go to Temporary Breakpoint Set another temporary breakpoint at $20000 and continue the target program execution.
HE - Help HE - Help Command Input 3 HE [COMMAND] Description The HE command displays information about the debugger commands. HE displays the description and the syntax of the command specified in the COMMAND argument. Without the COMMAND argument, HE displays a list of the debugger commands and their descriptions.
HE - Help ECHO Echo String ENV Set Environment to Bug/Operating System FORK Fork Idle MPU at Address FORKWR Fork Idle MPU with Registers G "Alias" for "GO" Command GD Go Direct (Ignore Breakpoints) GEVBOOT Global Environment Variable Boot GEVDEL Global Environment Variable Delete GEVDUMP Global Environment Variable(s) Dump Press "RETURN" to continue GEVEDIT Global Environment Variable Edit GEVINIT Global Environment Variable Initialization GEVSHOW Global Environment Variable(s) Display GN Go to Next Instru
HE - Help NIOP Network I/O Physical NIOT I/O "Teach" for Configuring Network Controller NOBR Breakpoint Delete NOCM No Concurrent Mode NOMA Macro Delete NOMAL Disable Macro Expansion Listing NOPA Printer Detach NOPF Port Detach NORB No ROM Boot NOSYM Detach Symbol Table NPING Network Ping OF Offset Registers Display/Modify PA Printer Attach PBOOT Bootstrap Operating System PF Port Format Press "RETURN" to continue PFLASH Program FLASH Memory PS Put RTC Into Power Save Mode for Storage RB ROM Bootstrap Oper
HE - Help 3 3-85
3Debugger Commands IDLE - Idle Master MPU IDLE - Idle Master MPU Note 3 This command is for multi-processor boards only. Command Input IDLE Description The IDLE command allows you to idle the current processor. Care should be taken not to idle it when all other processors are idle. The only way to correct this problem is by an MPU reset. To inquire of the BUG about idle processors, refer to the RUN command. Example Idle current processor.
IOC - I/O Control for Disk IOC - I/O Control for Disk Command Input 3 IOC Description The IOC command sends command packets directly to a disk controller. The packet to be sent must already reside in memory and must follow the packet protocol of the particular disk controller. This packet protocol is outlined in the documentation for the SCSI controller (refer to Appendix A, Related Documentation).
IOC - I/O Control for Disk You may also enter a special character, either at the prompt or after typing new data, for scrolling through the fields. The special characters are: 3 V or v Go to the next Þeld. This is the default, and remains in effect until changed by entering one of the other special characters. ^ Back up to the previous Þeld. This remains in effect until changed by entering one of the other special characters. = Re-open the same Þeld .
IOC - I/O Control for Disk Example Send the packet at $10000 to a controller device configured as CLUN #0. Specify an operation to the hard disk which is at DLUN #1.
IOI - I/O Inquiry IOI - I/O Inquiry Command Input 3 IOI [;[C|D|L|N]] Options C Clear the Device Descriptor Table. D List Devices while probing L List the Device Descriptor Table. N List the Devices currently conÞgured Description The IOI command inquires for all of the possible attached devices. If no option is specified, this command probes the system for all possible CLUN/DLUN combinations. Both the CLUN and DLUN parameters have the range of 0 to 255 (decimal).
IOI - I/O Inquiry where: mm = the CLUN number and while: nn = the DLUN number The CLUN/DLUN numbers are always sent to the 7-segment LEDs regardless of the ENV setting. With the variable number of devices that can now be attached to a given system, the memory requirements to house the pertinent device descriptors cannot be met. The debugger reserves space for 16 device descriptors. The device descriptor table (16 entries) can be viewed or cleared by this command with the L and C options, respectively.
IOI - I/O Inquiry PPC1-Bug>IOI I/O Inquiry Status: CLUN DLUN CNTRL-TYPE 0 0 NCR53C825 0 30 NCR53C825 1 0 PC8477 PPC1-Bug> 3 DADDR 0 3 0 DTYPE $00 $05 $00 RM N Y Y Inquiry-Data SEAGATE ST31200N 8630 TOSHIBA CD-ROM XM-3401TA 1094 Note that if the board has a secondary SCSI, and both primary and secondary SCSI controllers are connected with the same SCSI cable, all SCSI peripherals will be listed twice by IOI because they can be accessed by either primary or secondary SCSI controller: PP
IOP - I/O Physical (Direct Disk Access) IOP - I/O Physical (Direct Disk Access) Command Input 3 IOP Description The IOP command allows you to read, write, or format any of the supported disk or tape devices. When invoked, this command goes into an interactive mode, prompting you for all the parameters necessary to carry out the command. You may change the displayed value by typing a new value, followed by the Return key. To leave the field unchanged, press the Return key without typing a new value.
IOP - I/O Physical (Direct Disk Access) entry into the device descriptor table with the pertinent data. After an entry has been made, the next time a probe is done it simply returns with the message device present (pointer to the device descriptor). 3 Initially (after a cold reset), all the parameters used by IOP are set to certain default values. However, any new values entered are saved and are displayed the next time that the IOP command is invoked.
IOP - I/O Physical (Direct Disk Access) Memory Address =00003000? The starting address for the memory block to be accessed. For disk read operations, data is written starting at this location. For disk write operations, data is read starting at this location. Starting Block =00000000? The starting disk block number to access. For disk read operations, data is read starting at this block. For disk write operations, data is written starting at this block.
IOP - I/O Physical (Direct Disk Access) Flag Byte =00? The ßag byte is used to specify variations of the same command, and to receive special status information. Bits 0 through 3 are used as command bits; bits 4 through 7 are used as status bits. The following bits are deÞned for streaming tape read and write operations. 3 Bit 7 Filemark ßag. If 1, a Þlemark was detected at the end of the last operation. Bit 3 Disk formatting. It is ignored on tape operations. Bit 2 Reset Controller Flag.
IOP - I/O Physical (Direct Disk Access) Examples Example 1: Read 25 blocks starting at block 370 from device 2 of controller 0 into memory beginning at address $50000.
IOP - I/O Physical (Direct Disk Access) Example 4: Format the specified device with the option to ignore the grown defect list.
IOT - I/O Configure Disk Controller IOT - I/O Configure Disk Controller Command Input 3 IOT [;[A|F|H|T]] Options A List all the disk controllers which are supported by PPCBug. SCSI controllers are identiÞed with an asterisk (*). Each PCI controller is only listed once. F Force a device descriptor into the Device Descriptor Table. This option makes it easier to debug a particular device, in the event the device probe for the speciÞed device fails.
IOT - I/O Configure Disk Controller Note that during a boot, the configuration sector is normally read from the disk, and the device descriptor table for the LUN used is modified accordingly. If you wish to read/write using IOP from a disk that has been booted, IOT will not be required, unless the system is reset. 3 A device probe with entry into the device descriptor table is done whenever a specified device is accessed via IOT.
IOT - I/O Configure Disk Controller V or v Open the next Þeld. This is the default, and remains in effect until changed by entering one of the other special characters. ^ Back up and open the previous Þeld = Re-open the same Þeld . Terminate the IOT command, and return control to the debugger All numerical values are interpreted as hexadecimal numbers. You may enter decimal values by preceding the number with an &.
IOT - I/O Configure Disk Controller $09 $0A, $0B $0C-$1E $0F 3 Communications Graphic Arts Pre-Press Reserved Unknown or no device type Only the $00, $01, $05, and $07 are supported by the I/O controller drivers. Attribute Parameters The parameters and attributes that are associated with a particular device are determined by a parameter and an attribute mask that is a part of the device definition.
IOT - I/O Configure Disk Controller Number of Heads =05? The number of heads on the drive. Number of Cylinders 3 =0337? The number of cylinders on the device. For ßoppy disks, the number of cylinders depends on the media size and the track density. Precomp. Cylinder =0000? The cylinder number at which precompensation should occur for this drive. This parameter is normally speciÞed by the drive manufacturer.
IOT - I/O Configure Disk Controller The rate at which the read/write heads can be moved when seeking a track on the disk.
IOT - I/O Configure Disk Controller Gap 1 =07? The number of words of zeros that are written before the header Þeld in each sector during format.
IOT - I/O Configure Disk Controller Sectors/track Number of heads Number of cylinders Precomp.
IRD, IRM, IRS - Idle MPU Register Display/Modify/Set IRD, IRM, IRS - Idle MPU Register Display/Modify/Set Note These commands are for multi-processor boards only. Command Inputs IRD MPU# ARGS IRM MPU# ARGS IRS MPU# ARGS Descriptions The IRD command allows you to display the idle processor's registers. The idle processor is specified by the argument MPU#. This argument depends on your configuration. The ARGS argument is equivalent to the argument string as required by the command RD.
LO - Load S-Records from Host LO - Load S-Records from Host Command Input 3 LO [PORT] [ADDR] [;[X] [C] [T]] [=text] Arguments PORT Port to be used for the downloading. The default is port 1. ADDR Offset address which is to be added to the address contained in the address Þeld of each record. This causes the records to be stored to memory at different locations than would normally occur. The contents of the automatic offset register are not added to the S-record addresses.
LO - Load S-Records from Host =text The command that is sent to the host before the debugger begins to look for S-records at the host port. The command is sent to the host device to initiate the download. Do not enclose text in quote marks. Do not separate the = and text with a space. If the host is operating full duplex, the string is also echoed back to the host port by the host and appears on your terminal screen.
LO - Load S-Records from Host The S-record format (refer to Appendix D) allows for an entry point to be specified in the address field of the termination record of an Srecord block. The contents of the address field of the termination record (plus the offset address, if any) are put into the target IP. Thus, after a download, you need only enter GO instead of GO ADDR to execute the code that was downloaded.
LO - Load S-Records from Host Example For this example, assume that a host system was used to create the following program: .file “test.s” # # retrieve contents of the RTC registers # .toc T.FD: .tc FD.4330000080000000[tc] ,1127219200,-2147483648 .toc T..test: .tc ..test[tc], test[ds] T..LDATA: .tc ..LDATA[tc], .LDATA T..LRDATA: .tc ..LRDATA[tc], .LRDATA # .align 2 .globl test[ds] .csect test[ds] .long .test[pr], TOC[tc0], 0 .globl .test[pr] .csect .test[pr] .
LO - Load S-Records from Host Load this file into memory for execution at address $40000 as follows: PPC1-Bug>TM Escape character: $01=^A. 3 Go into transparent mode to establish host link, input the necessary character sequences to gain access to the S-Record file test.mx. . . . Exit transparent mode by inputting the escape character sequence, default is Ctrl-a. At this point control will return to the debugger prompt. . PPC1-Bug> PPC1-Bug>LO ,,-65000000 ;X=cat test.mx cat test.
LO - Load S-Records from Host PPC1-Bug>RD IP =00040000 MSR =00003030 CR R0 =00000000 R1 =00020000 R2 R4 =00000000 R5 =00000000 R6 R8 =00000000 R9 =00000000 R10 R12 =00000000 R13 =00000000 R14 R16 =00000000 R17 =00000000 R18 R20 =00000000 R21 =00000000 R22 R24 =00000000 R25 =00000000 R26 R28 =00000000 R29 =00000000 R30 SPR0 =00000000 SPR1 =00000000 SPR8 00040000 7C8402A6 MFSPR R4,4 PPC1-Bug> =00000020 =FFF0178C =00000000 =00000000 =00000000 =00000000 =00000000 =00000000 =00000000 =00020014 FPSCR
MA - Macro Define/Display NOMA - Macro Delete MA - Macro Define/Display NOMA - Macro Delete 3 Command Input MA [NAME|;L] NOMA [NAME] Description The MA command allows you to define a macro consisting of any number of debugger commands with optional parameter specifications. NOMA command is used to delete either a single macro or all macros. The NAME argument is a macro name, which may be any combination of one to eight alphanumeric characters.
MA - Macro Define/Display NOMA - Macro Delete Macro definitions are stored in a string pool of fixed size. If the string pool becomes full while in the definition mode, the offending string is discarded, a message STRING POOL FULL, LAST LINE DISCARDED is printed and the user is returned to the debugger command prompt. This also happens if the string entered would cause the string pool to overflow. The string pool has a capacity of 511 characters.
MA - Macro Define/Display NOMA - Macro Delete Example 2: Define the macro DIS. PPC1-Bug>MA DIS M=MD \0:17;DI M= PPC1-Bug> 3 Example 3: List all currently defined macros. PPC1-Bug>MA MACRO ABC 010 MD 3000 020 GO \0 MACRO DIS 010 MD \0:17;DI PPC1-Bug> Example 4: List the definition of the macro ABC. PPC1-Bug>MA ABC MACRO ABC 010 MD 3000 020 GO \0 PPC1-Bug> Example 5: Delete the macro DIS.
MAE - Macro Edit MAE - Macro Edit Command Input 3 MAE NAME LINE # [STRING] Arguments NAME Macro name, which may be any combination of one to eight alphanumeric characters LINE # Line number (1-999) to be replaced or where a new line is to be inserted STRING Line to be inserted or replaced Description The MAE command allows you to edit a macro. MAE is line oriented and allows inserting, deleting, and replacing individual lines. Replace a line by specifying its line number and the replacement text.
MAE - Macro Edit Line numbers serve one purpose: specifying the location within a macro definition to perform the editing function. After the editing is complete, the macro definition is displayed with a new set of line numbers. 3 Examples Example 1: Add a line to macro ABC. List definition of macro ABC. PPC1-Bug>MA ABC MACRO ABC 010 MD 3000 020 GO \0 PPC1-Bug> Then add a line to macro ABC.
MAL - Enable Macro Listing NOMAL - Disable Macro Listing MAL - Enable Macro Listing NOMAL - Disable Macro Listing Command Input 3 MAL NOMAL Description The MAL command allows you to view expanded macro lines as they are executed. This is especially useful when errors result, as the line that caused the error appears on the display. The NOMAL command is used to suppress the listing of the macro lines during execution.
MAR - Load Macros MAR - Load Macros Command Input 3 MAR [controllerLUN] [[deviceLUN] [block#]] Arguments controllerLUN deviceLUN block# Logical Unit Number (LUN) of the controller to which the following device is attached. This initially defaults to LUN 0. LUN of the device to save/load macros to/from. This initially defaults to LUN 0. Number of the block on the above device that is the Þrst block of the macro list. This initially defaults to block 2.
MAR - Load Macros Example For the example, assume that controller 0, device 2 is accessible. Load macros from block 3. 3 PPC1-Bug> MAR 0,2,3 PPC1-Bug> List macros. PPC1-Bug> MA MACRO ABC 010 MD 3000 020 GO \0 PPC1-Bug> Define macro ASM. PPC1-Bug> MA ASM M=MM \0;DI M= (CR) PPC1-Bug> List all macros.
MAW - Save Macros MAW - Save Macros Command Input 3 MAW [controllerLUN] [[deviceLUN] [block#]] Arguments controllerLUN deviceLUN block# Logical Unit Number (LUN) of the controller to which the following device is attached. This initially defaults to LUN 0. LUN of the device to save/load macros to/from. This initially defaults to LUN 0. Number of the block on the above device that is the Þrst block of the macro list. This initially defaults to block 2.
MAW - Save Macros Example For the example, assume that controller 0, device 2 is accessible. Load macros from block 3. 3 PPC1-Bug> MAR 0,2,3 PPC1-Bug> List macros. PPC1-Bug> MA MACRO ABC 010 MD 3000 020 GO \0 PPC1-Bug> Define macro ASM. PPC1-Bug> MA ASM M=MM \0;DI M= (CR) PPC1-Bug> List all macros. PPC1-Bug> MA MACRO ABC 010 MD 3000 020 GO \0 MACRO ASM 010 M=MM \0;DI PPC1-Bug> Save macros to block 8, previous device.
MD, MDS - Memory Display MD, MDS - Memory Display Command Input 3 MD ADDR[:COUNT | ADDR] [; [B|H|W|S|D|DI] ] MDS ADDR[:COUNT | ADDR] [; [B|H|W|S|D|DI] ] Options Integer Data Types B Byte H Half-word W Word Floating Point Data Types S Single Precision D Double Precision DI Enable the one-line disassembler. All other options are invalid if DI is selected. Description The MD and MDS commands display the contents of multiple memory locations all at once. The default data type is word.
MD, MDS - Memory Display Examples Example 1: PPC1-Bug>MD 22000;H 00022000 2800 1942 2900 1942 PPC1-Bug> 00022010 FC20 0050 ED07 9F61 PPC1-Bug> 2800 1842 2900 2846 (..B)..B(..B).(F FF00 000A E860 F060 | .Pm..a....h'p' Example 2: For this example, assume the microprocessor register state is R5=00023627. PPC1-Bug>MD R5:&19;B 00023627 4F 82 00 C5 9B 10 33 7A DF 01 6C 3D 4B 50 0F 0F 00023637 31 AB 80 PPC1-Bug> O..E..3z_.l=KP.. 1+.
MD, MDS - Memory Display Example 5: PPC1-Bug>MD 10000;S 00020000 0_A4_194155= 1.6455652147200000_E+0011 00020004 0_27_3BFC7C= 4.7454405384196168_E-0027 00020008 1_E8_005800=-4.0673757930760459_E+0031 0002000C 1_80_00D2A5=-2.0128567218780518_E+0000 00020010 0_56_3BFF25= 6.6789829960070541_E-0013 00020014 1_70_031E80=-3.1261239200830460_E-0005 00020018 0_8F_497EC3= 1.0316552343750000_E+0005 0002001C 0_80_22A8D5= 2.
MD, MDS - Memory Display Example 7: PPC1-Bug>MDS 30000;B 00030000 3C A0 00 00 2B 04 00 00030010 38 84 FF FF 38 63 00 00030020 FF FF FF FF FF FF FF 00030030 FF FF FF FF FF FF FF 00030040 00 00 00 00 00 00 00 00030050 00 00 00 00 00 00 00 00030060 FF FF FF FF FF FF FF 00030070 FF FF FF FF FF FF FF PPC1-Bug> 00 01 FF FF 00 00 FF FF 41 4B FF FF 00 00 FF FF 9A FF FF FF 00 00 FF FF 00 FF FF FF 00 00 FF FF 14 EC FF FF 00 00 FF FF 98 4E FF FF 00 00 FF FF A3 80 FF FF 00 00 FF FF 00 00 FF FF 00 00 F
MENU - System Menu MENU - System Menu Command Input 3 MENU Description The MENU command displays the System Menu, which is shown below: 1 Continue System Start Up 2 Select Alternate Boot Device 3 Go to System Debugger 4 Initiate Service Call 5 Display System Test Errors 6 Dump Memory to Tape Enter Menu #: You can return to the debugger by entering 3 at the Enter Menu # prompt. (If you execute the Menu command from the PPC1Diag> prompt, menu option 3 will return you to the PPCBug diagnostics.
MM - Memory Modify MM - Memory Modify Command Input 3 MM ADDR [;[[B|H|W|S|D] [A] [N]]|[DI] ] Options Integer Data Types B Byte H Half-word W Word Floating Point Data Types S Single Precision D Double Precision Other Options: N Disable the read portion of the command A Force alternate location accesses only DI Enable the one-line assembler/disassembler. All other options are invalid if this option is selected. Description The MM command is used to view and change the contents of memory.
MM - Memory Modify 3 V or v Open the next memory location. This is the default, and remains in effect until changed by entering one of the other special characters. ^ Back up and open the previous memory location = Re-open the same memory location (this is useful for examining I/O registers or memory locations that are changing over time) . Terminate the MM command, and return control to the debugger The command reads the memory and verifies that the new contents match what was written.
MM - Memory Modify Examples Example 1: Access location $20000, modify memory, modify and backup, and modify memory and exit. PPC1-Bug>MM 20000;H 00020000 1234? 00020002 5678? 4321 00020004 9ABC? 8765^ 00020002 4321? 00020000 1234? ABCD. PPC1-Bug> Example 2: Word access to location $20004 with alternate location access option enabled, modify and reopen location, and exit memory modify.
MM - Memory Modify Example 5: Step to next location and exit MM. PPC1-Bug>MM 40000;DI 00040000 3D401000 ADDIS R10,R0,$1000? 00040004 614AFFFF ORI R10,R10,$FFFF? . PPC1-Bug> 3 Example 6: Double precision floating point numbers. PPC1-Bug>MM 20000;D 00020000 3.140000000000001_E+87? 1.2 00020008 -5.8508426708663386_E+250? 2 00020010 1.9999900000000014_E-100? 4.357E+10 00020018 6.7777778899999985_E+37? 2.765E-99 00020020 9.
MMD - Memory Map Diagnostic MMD - Memory Map Diagnostic Command Input 3 MMD RANGE INCREMENT [;B|H|W] Options B Byte H Half-word W Word Description The MMD command is used to find and display ranges of addresses that are readable. This is done by reading memory locations within the RANGE. If a successful transaction to a location is completed, that address is included in a found range, else in a not-found range. The transaction (a read) is done with the data type specified on the command line.
MMD - Memory Map Diagnostic Example 2: Look for any memory between $10000000 and $FFFFFFFF with an increment of $40000 by bytes.
MS - Memory Set MS - Memory Set Command Input 3 MS ADDR {Hexadecimal number} {'string'} Arguments Hexadecimal number Hexadecimal value to be written to memory. It is not assumed to be of a particular size, so it can contain any number of digits (as allowed by command line buffer size). If an odd number of digits are entered, the least signiÞcant nibble of the last byte accessed will be unchanged. string An ASCII string to be written to memory. Enclose it in single quotes (').
MW - Memory Write MW - Memory Write Command Input 3 MW ADDR DATA [;B|H|W] Options B Byte H Half-word W Word The default data size is word. Description The MW command writes a data pattern (DATA) to a specific location (ADDR). No verify (read) is performed. Examples Example 1: PPC1-Bug>MW 1E000 55AA55AA Effective address: 0001E000 Effective data : 55AA55AA PPC1-Bug> PPC1-Bug>MD 1E000 0001E000 55AA55AA 00000000 00000000 00000000 U.U.............
MW - Memory Write Example 3: PPC1-Bug>MW 1E002 33CC;H Effective address: 0001E002 Effective data : 33CC PPC1-Bug> 3 PPC1-Bug>MD 1E000 0001E000 77AA33CC 00000000 00000000 00000000 w.3............. 0001E010 00000000 00000000 00000000 00000000 ................
NAB - Network Auto Boot NAB - Network Auto Boot Command Input 3 NAB Description The NAB command re-invokes the network auto boot feature. This command simply invokes the NBO command with the specified parameters saved in NVRAM for the specified network interface. This invocation occurs at system start-up and can be specified at either power-up or at any reset condition. Refer to NBO - Network Boot Operating System on page 3-142. The clock must be running in order for this command to work properly.
NAP - NAP MPU NAP - NAP MPU Note This command is for multi-processor boards only. 3 Command Input NAP MPU# Options None Description The NAP command puts an idling CPU into a tight cached loop from which it will never exit. The napping CPU will not intrude onto the bus. This command is useful during performance analysis when it is desirable to allow one single CPU access to the bus without having to share bus bandwidth with another CPU.
NBH - Network Boot Operating System, Halt NBH - Network Boot Operating System, Halt Command Input 3 NBH [ControllerLUN] [DeviceLUN] [ClientIPAddress] [ServerIPAddress] [String] Arguments ControllerLUN Logical Unit Number (LUN) of the controller to which the following device is attached. It defaults to LUN 0. DeviceLUN LUN of the device to boot from. It defaults to LUN 0. ClientIPAddress Internet Protocol Address of the client, basically my/source IP address.
NBH - Network Boot Operating System, Halt After the registers are initialized, control is returned to the debugger monitor and the prompt reappears on the terminal screen. Because control is retained by the debugger, all of the debugger's facilities are available for debugging the loaded program if necessary. 3 The device and controller configuration parameters used when NBH is initiated can be examined via the NIOT command.
NBO - Network Boot Operating System NBO - Network Boot Operating System Command Input 3 NBO [ControllerLUN] [DeviceLUN] [ClientIPAddress] [ServerIPAddress] [String] Arguments ControllerLUN Logical Unit Number (LUN) of the controller to which the following device is attached. It defaults to LUN 0. DeviceLUN Logical Unit Number (LUN) of the device from which to boot. It defaults to LUN 0. ClientIPAddress Internet Protocol Address of the client, basically my/source IP address.
NBO - Network Boot Operating System NBO uses primarily the BOOTP, RARP, and TFTP protocols to load the boot file. Refer to the DARPA Internet Request for Comments RFC-951, RFC-903, and RFC-783, respectively, for the description of these protocols. You may skip the BOOTP phase (address determination and bootfile selection) by specifying the IP addresses (server and client) and the boot filename; the booting process would then start with the TFTP phase (file transfer) of the boot sequence.
NBO - Network Boot Operating System Note that certain arguments are passed (through MPU registers) to the loaded program. The following is a list of the MPU registers and their contents: 3 R3 Controller Logical Unit Number (CLUN) of the boot R4 Device Logical Unit Number (DLUN) of the boot R5 System Call Support available R6 Base address of Network Controller Device R7 Execution Address of Load Program R8 Address to IPAs (Client, Server, Gateway) R9 Pointer to Filename String (i.e.
NBO - Network Boot Operating System the boot file is loaded into the user memory, the statistics of the TFTP phase (file transfer) are displayed. The boot process continues with loading of the MPU registers and execution of the loaded file. Whenever an error occurs, the booting process is terminated and the error code is displayed. The error codes are listed in Appendix H. The clock must be running in order for this command to work properly. Use TIME ;L to see if the clock is running.
NIOC - Network I/O Control NIOC - Network I/O Control Command Input 3 NIOC Description The NIOC command sends command packets directly to the Ethernet network interface driver. The packet to be sent must already reside in memory and must follow the packet protocol of the interface. This command facilitates in the transmission and reception of raw packets (command identifiers 2 and 3, listed below), as well as some control (command identifiers 0, 1, 4, and 5, listed below).
NIOC - Network I/O Control The reset device/channel/node (type 5) would be used if another operating system (node driver) needs to be control of the device/channel/node. Basically, put the device/channel/ node to a known state. Whenever an error occurs, the initiated I/O control process is terminated and the appropriate error code is displayed. The error codes are listed in Appendix H. When invoked, NIOC enters an interactive mode which prompts for information required to perform the command.
NIOC - Network I/O Control Examples Example 1: Initialize (type 0) the device/channel/node. PPC1-Bug>NIOC Controller LUN =00? Device LUN =00? Packet Address =00006454? 00006454 0000 0000 0000 0000 0000 0000 0000 0000 00006464 0000 0000 Send Packet (Y/N) =N? Y PPC1-Bug> 3 ................ .... Example 2: Retrieve the hardware address of the specified network interface (type 1).
NIOC - Network I/O Control PPC1-Bug>MD E000:&21 0000E000 FFFF FFFF FFFF 0800 3E21 0FCC 0806 0001 0000E010 0800 0604 0001 0800 3E21 0FCC ffff 0B2C 0000E020 FFFF FFFF FFFF 8610 1112 .......... PPC1-Bug> PPC1-Bug>NIOC Controller LUN =00? Device LUN =00? Packet Address =00006454? 00006454 0000 0000 0000 0002 0000 E000 0000 002A 00006464 0000 0000 .... Send Packet (Y/N) =N? Y PPC1-Bug> ........>!...... ........>!....., 3 ................
NIOC - Network I/O Control View the address data retrieval.
NIOC - Network I/O Control This entry point is useful when the interface has not been accessed for some time and you do not want receive data. The Network I/O commands (i.e., NAB, NBH, NBO, NIOP, and NPING) use this feature prior to any Network I/O transactions.
NIOP - Network I/O Physical NIOP - Network I/O Physical Command Input 3 NIOP Description The NIOP command allows you to get files from the supported Ethernet network interfaces and put files to the supported Ethernet network interfaces. When invoked, this command goes into an interactive mode, prompting you for all parameters necessary to carry out the command. This command basically uses the TFTP protocol to perform the file transfer.
NIOP - Network I/O Physical You may also enter a special character, either at the prompt or after typing new data, for scrolling through the fields. The special characters are: V or v Open the next Þeld. This is the default, and remains in effect until changed by entering one of the other special characters. ^ Back up and open the previous Þeld = Re-open the same Þeld .
NIOP - Network I/O Physical Controller LUN =00? The Logical Unit Number (LUN) of the controller to access 3 Device LUN =00? The LUN of the device to access Get/Put =G? G Read/get from host P Write/put to host File Name =? The name of the Þle to load/store. On a write the Þle must exist on the host system and also be writable (write permission). The Þlename string must be null terminated. The maximum length of the string is 64 bytes inclusive of the null terminator.
NIOP - Network I/O Physical Example Read a file into memory. This example illustrates the reading (or getting) of the file /tftboot/motorola.bin from the specified server (refer to the NIOT command) into memory at address 00010000. The length field of 0 signifies to load the entire file. The load (get) of a file can be truncated to a desired length by specifying the desired length (nonzero). The byte offset field can be used to wind (index) into a file (only used on file reads, gets).
NIOT - Network I/O Teach (Configuration) NIOT - Network I/O Teach (Configuration) Command Input 3 NIOT [;[A|H|D]] Options A Display the Network Controllers/Nodes that are supported by this version of the firmware. Each PCI controller is only listed once. H Display all Network Controllers/Nodes that are present in the system. The display also includes the Protocol (Internet) and Hardware (Ethernet) addresses.
NIOT - Network I/O Teach (Configuration) Each mass storage boot device and network interface boot device is identified by a device name. Each device type that the product supports is contained/listed within device probe tables. These tables are modified to contain the associative device name. At probe time, the probed device's name is copied into the dynamic device configuration tables housed within in NVRAM. This will only be done, of course, if the device is present.
NIOT - Network I/O Teach (Configuration) Node Control Memory Address=FFE10000? The starting address of the necessary memory needed for the transmit and receive buffers. 256KB are needed for the Ethernet driver (transmit/receive buffers). 3 As of version 1.8 of PPC1Bug, the node control memory address is dynamically calculated. The saved version(i.e., NVRAM) is now ignored. Client IP Address =255.255.255.255? The IP address of the client. The firmware is considered the client. Server IP Address =255.
NIOT - Network I/O Teach (Configuration) Boot File Name (“NULL” for None) =? The name of the boot file to load. Once the file is loaded, control is passed to the loaded file (program). To specify a null filename, the string ÒNULLÓ must be used; this resets the filename buffer to a null character string. Argument File Name (“NULL” for None) =? The name of the argument file. This file may be used by the booted file (program) for an additional file load.
NIOT - Network I/O Teach (Configuration) Trace Character Buffer Address=00000000? The starting address of memory in which to place the trace characters. The receive/transmit packet tracing are disabled by default (value of 0). Any non-zero value enables tracing. Tracing would only be used in a debug environment and normally should be disabled. Care should be exercised when enabling this feature; you need to ensure that adequate memory exists.
NIOT - Network I/O Teach (Configuration) BOOTP/RARP Request Control: Always/When-Needed (A/W) =W A BOOTP/RARP request is always sent, and the accompanying reply expected W BOOTP/RARP request is sent if needed (i.e., IP addresses of 0, null boot Þle name) BOOTP/RARP Reply Update Control: Yes/No (Y/N) =Y This parameter specifies the updating of the configuration parameters following a BOOTP/RARP reply. Receipt of a BOOTP/RARP reply would only be in lieu of a request being sent.
NIOT - Network I/O Teach (Configuration) Example 2: Display the network controllers/nodes that are present in the system. PPC1-Bug>NIOT;H Network Controllers/Nodes Available CLUN DLUN Name Address IP-Address/H-Address 0 0 DEC21140 $80804000 255.255.24.10/08003E210FCC PPC1-Bug> 3 Example 3: Display the Network Controllers/Nodes that are supported by PPCBug.
3Debugger Commands NPING - Network Ping NPING - Network Ping Command Input NPING ControllerLUN DeviceLUN SourceIP DestinationIP [NPackets] Arguments ControllerLUN Logical Unit Number (LUN) of the controller to which the device is attached. DeviceLUN Logical Unit Number (LUN) of the device. SourceIP Internet Protocol Address of the Source (initiator, ECHO_REQUEST). DestinationIP Internet Protocol Address of the Destination (target, ECHO_RESPONSE). NPackets Number of packets to send.
NPING - Network Ping If the destination does not respond within 10 seconds, the command continues on with the next transmission. Between each successful transmit/receive packet there is a one second delay; this is done so as not to inundate the network. 3 If the number of packets is not specified on the command line, the command will indefinitely transmit/receive packets. You must press the BREAK key to abort the session. The clock must be running in order for this command to work properly.
OF - Offset Registers Display/Modify OF - Offset Registers Display/Modify Command Input 3 OF [Zn[;A] ] Description The OF command allows you to access and change pseudoregisters called offset registers. These registers are used to simplify the debugging of relocatable and position-independent modules. There are eight offset registers Z0-Z7, but only Z0-Z6 can be changed. Z7 always has both base and top addresses set to 0.
OF - Offset Registers Display/Modify Enter the following parameters: [base_address [top_address] ] or 3 [base_address [: byte_count] ] The top_address must equal or exceed the base_address. Wrap-around is not permitted. The default for byte_count is 1MB. You may also enter a special character, either at the prompt or after typing new data, for scrolling through register Zn. The special characters are: V or v Open the next register.
OF - Offset Registers Display/Modify Examples Example 1: Display offset registers. PPC1-Bug>OF Z0 =00000000 00000000 Z2 =00000000 00000000 Z4 =00000000 00000000 Z6 =00000000 00000000 PPC1-Bug> Z1 = Z3 = Z5 = Z7*= 00000000 00000000 00000000 00000000 3 00000000 00000000 00000000 00000000 Example 2: Modify some offset registers. PPC1-Bug>OF Z0 Z0 =00000000 00000000? 20000 200FF Z1 =00000000 00000000? 25000:200^ Z0 =00020000 000200FF? .
PA - Printer Attach NOPA - Printer Detach PA - Printer Attach NOPA - Printer Detach 3 Command Input PA [PORT] NOPA [PORT] Description The PA command attaches a printer to the parallel or serial port that you specify. Multiple printers may be attached. When the printer is attached, everything that appears on the system console terminal is also echoed to the attached port. If no port is specified, PA does not attach a port. The NOPA command detaches a port.
PA - Printer Attach NOPA - Printer Detach Example 2: Display current attached printers. PPC1-Bug>PA Printer $02 attached PPC1-Bug> 3 Example 3: Detach device at logical unit $02. PPC1-Bug>NOPA 2 Printer $02 detached PPC1-Bug> Example 4: Detach all possible attached printers.
PBOOT - Bootstrap Operating System PBOOT - Bootstrap Operating System Command Input 3 PBOOT ; A|V PBOOT CLUN DLUN PARTITION [String] [;H ] Arguments CLUN Controller Logical Unit Number (CLUN). The default is 00. DLUN Device Logical Unit Number (DLUN). The default is 00. The CLUN/DLUN argument pair is the set of parameters that the IOI command reports as attached/found/probed devices. Refer to IOI - I/O Inquiry on page 3-90 for a complete description.
PBOOT - Bootstrap Operating System H Boot and halt. Control is not passed to the booted program, but back to the debugger monitor. This option is useful for examining and patching the booted program, and or setting instruction breakpoints prior to execution. Once the interim commands are invoked the user may simply use the GO command to pass control to booted program. PBOOT with the H option is analogous to the BH command in other Motorola debuggers.
PBOOT - Bootstrap Operating System The layout of the boot record must be designed as shown in the Figure 3-1. The first 446 bytes of the boot record contain a PC compatibility block, the next four entries contain a partition table totaling 64 bytes, and last two bytes contain a signature. 3 0 0 PC Compatibility Block in the Boot Record $1BE 446 Partition Entry 1 $1CE 462 Partition Entry 2 $1DE 478 Partition Entry 3 $1EE 494 Partition Entry 4 $1FE 510 $55 $AA 512 Figure 3-1.
PBOOT - Bootstrap Operating System partition begin boot ind head sector cyl partition end sys ind head sector cyl beginning sector 32-bit start RBA (zero-based) (LE) number of sectors 32-bit RBA count (one-based) (LE) 3 Figure 3-2. PowerPC Reference Platform Partition Table Entry The 32-bit start RBA is zero-based. The 32-bit count RBA value is one-based and indicates the number of 512-byte blocks.
PBOOT - Bootstrap Operating System 0 PC Compatibility Block 3 512 Entry Point Offset (LE) 516 Load Image Load Image Length (LE) 520 Flag Field 521 OS_ID 522 Partition Name 554 Reserved1 1024 OS-SpeciÞc Field (Optional) Entry Point (Code Aligned) Code Section of the Load Image Reserved2 RBA_Count * 512 Figure 3-3.
PBOOT - Bootstrap Operating System Once the boot partition is located by using the boot record, the debugger will typically: 1. Read into memory the second 512-byte block of the load image. 2. Determine the load image length, which runs to, but does not include, the Reserved2 space. 3. Allocate a buffer in system RAM for the load image transfer (no fixed location). 4. Transfer the remaining portion of the load image into system RAM from the boot device (the Reserved2 space is not loaded).
PBOOT - Bootstrap Operating System PPC1-Bug>IOI I/O Inquiry Status: CLUN DLUN CNTRL-TYPE DADDR DTYPE RM Inquiry-Data 0 0 NCR53C825 0 $00 N SEAGATE ST31200N 8630 0 30 NCR53C825 3 $05 Y TOSHIBA CD-ROM XM-3401TA 1094 1 0 PC8477 0 $00 Y PPC1-Bug>PBOOT 0 30,,,;H Booting from: NCR53C825, Controller 0, Drive 30 Loading: Operating System 3 IPL loaded at: $00080000 IP =00080430 MSR =00003040 CR =00000000 R0 =00000000 R1 =03FA0000 R2 =00000000 R4 =00000000 R5 =00000000 R6 =00000000 R8 =000
PBOOT - Bootstrap Operating System Example 3: This example demonstrates a boot from a direct-access device (i.e., hard disk). The default partition is used due to the lack of the PARTITION argument. 3 PPC1-Bug>PBOOT 0 0 Booting from: NCR53C825, Controller 0, Drive 0 Loading: Operating System IPL loaded at: $00080000 . . . The above example is equivalent of: PPC1-Bug>PBOOT,,, Booting from: NCR53C825, Controller 0, Drive 0 Loading: Operating System IPL loaded at: $00080000 . . .
PF - Port Format NOPF - Port Detach PF - Port Format NOPF - Port Detach 3 Command Input PF [PORT] NOPF [PORT] Description The PF command allows you to examine and change the serial input/output environment. PF may be used to configure a port that is already assigned or assign and configure a new port. PF supports PowerPC board drivers and the ports on each. PORT is the port to be assigned or configured. Without PORT specified, PF displays a list of the current port assignments.
PF - Port Format NOPF - Port Detach You may also enter a special character, either at the prompt or after typing new data, for scrolling through the fields. The special characters are: V or v Go to the next Þeld. This is the default, and remains in effect until changed by entering one of the other special characters. ^ Back up to the previous Þeld. This remains in effect until changed by entering one of the other special characters. = Re-open the same Þeld .
PF - Port Format NOPF - Port Detach ConÞguring a Port These are the configurable parameters (these may vary depending on the driver): 3 Port base address: The base address of the port. This is useful for supporting PowerPC boards with adjustable base addressing. Baud rate [110,300,600,1200,2400,4800,9600,19200]? The baud rate Note If a number base is not specified, the default is decimal, not hexadecimal.
PF - Port Format NOPF - Port Detach PPC1-Bug>PF 1 Baud rate [110,300,600,1200,2400,4800,9600,19200] = 9600? Even, Odd, or No Parity [E,O,N] = N? Character width [5,6,7,8] = 8? Stop Bits [1,2] = 1? 2 Auto Xmit enable on CTS* [Y,N] = N? . OK to proceed (y/n)? Y PPC1-Bug> Assigning a New Port These are the configurable parameters (these may vary depending on the driver): Name of board? The device driver.
PF - Port Format NOPF - Port Detach If the new port has not been configured, the interactive configuration mode is entered (refer to Configuring a Port on page 3-180). If the new port has been configured, the OK to proceed (y/n)? prompt appears. 3 PF does not initialize any hardware until you have responded with a Y to prompt OK to proceed (y/n)?. Pressing the BREAK key on the console any time prior to this step or responding with an N at the prompt leaves the port unassigned.
PFLASH - Program FLASH Memory PFLASH - Program FLASH Memory Command Input PFLASH SSADDR SEADDR DSADDR [IEADDR] [;[A|R] [X]] PFLASH SSADDR:COUNT DSADDR [IEADDR] [;[B|W|L] [A|R] [X]] Arguments SSADDR Source starting address of the binary image to program the FLASH memory with SEADDR Source ending address of the binary image to program the FLASH memory with DSADDR Destination starting address of the FLASH memory to program the binary image to COUNT Number of elements to program.
PFLASH - Program FLASH Memory Description The PFLASH command loads an application or program into Flash memory. The command line arguments are checked (e.g., does the destination range lie completely within the Flash memory?, are there overlapping address spaces?, are the address arguments aligned?). If an argument does not pass, an appropriate error message is displayed and control is passed back to the monitor with the Flash memory contents undisturbed.
PFLASH - Program FLASH Memory is not specified, upon successful completion, the driver blinks the FAIL LED at the rate of once per 1/2 second. Upon any error the driver illuminates the FAIL LED (no blinking).
PFLASH - Program FLASH Memory PPC1-Bug>BM FFF00000:100000/4 100000 Effective address: FFF00000 Effective count : &1048576 Effective address: 00100000 PPC1-Bug>PFLASH 100000:100000 FFF00000;R Source Starting/Ending Addresses =00100000/001FFFFF Destination Starting/Ending Addresses =FFF00000/FFFFFFFF Number of Effective Bytes =00100000 (&1048576) 3 Program FLASH Memory (Y/N)? Y The reset option R was utilized to restart the debugger.
PS - Put RTC into Power Save Mode PS - Put RTC into Power Save Mode Command Input 3 PS Description The PS command turns off the oscillator in the RTC chip. The PowerPC board is shipped with the RTC oscillator stopped to minimize current drain from the onchip battery. Normal cold start of the board with the PPCBug FLASH devices installed gives the RTC a Òkick startÓ to begin oscillation. Use SET command to restart the clock.
RB - ROMboot Enable NORB - ROMboot Disable RB - ROMboot Enable NORB - ROMboot Disable 3 Command Input RB[;V] NORB Description The RB command invokes the search for and booting from a ROMboot routine encoded in FLASH memory on the board. However, the routine can be stored in other memory locations, if configured to do so with the ENV command. Refer also to ROMboot in Chapter 1. The V option enables verbose mode operation.
RB - ROMboot Enable NORB - ROMboot Disable Example 3: PPC1-Bug> NORB ROM boot disabled PPC1-Bug> 3 3-189
RD - Register Display RD - Register Display Command Input 3 RD [{[+|-|=] [DNAME] [/]}{[+|-|=] [REG1[-REG2]] [/]}] [;E] Arguments DNAME MPU for Microprocessor Unit, DEF for default REG1 First register in a range of registers REG2 Last register in a range of registers Description The RD command displays the register state associated with the target program (refer to the GO command). The instruction pointed to by the target IP is disassembled and displayed also.
RD - Register Display = The device or register range is to be set. This character followed by DEF in the DNAME argument restores the register mask to select those registers originally displayed. / A required delimiter between device names and register ranges Note the following when specifying any arguments in the command line: ❏ The +, -, or = qualifier applies to the next register range only. ❏ If no qualifier is specified, a + is assumed, even for the default.
RD - Register Display Examples Example 1: Default display - MPU subset (also called out by DEF): PPC1-Bug>RD IP =00040010 MSR R0 =00000000 R1 R4 =22EDB280 R5 R8 =00000000 R9 R12 =00000000 R13 R16 =00000000 R17 R20 =00000000 R21 R24 =00000000 R25 R28 =00000000 R29 SPR0 =00000000 SPR1 00040010 4E800020 BCLR PPC1-Bug> 3 =00003030 CR =00020000 R2 =00000000 R6 =00000000 R10 =00000000 R14 =00000000 R18 =00000000 R22 =00000000 R26 =00000000 R30 =00000000 SPR8 20,0 =00000020 =FFF0178C =00000000 =000000
RD - Register Display FR6 =0_000_0000000000000= FR7 =0_000_0000000000000= FR8 =0_000_0000000000000= FR9 =0_000_0000000000000= FR10 =0_000_0000000000000= FR11 =0_000_0000000000000= FR12 =0_000_0000000000000= FR13 =0_000_0000000000000= FR14 =0_000_0000000000000= FR15 =0_000_0000000000000= FR16 =0_000_0000000000000= FR17 =0_000_0000000000000= FR18 =0_000_0000000000000= FR19 =0_000_0000000000000= FR20 =0_000_0000000000000= FR21 =0_000_0000000000000= FR22 =0_000_0000000000000= FR23 =0_000_0000000000000= FR24 =0
RD - Register Display Example 3: Add only FR0 and FR1 to the original default display.
RD - Register Display Example 6: Restore the display to the original set.
REMOTE - Remote REMOTE - Remote Command Input 3 REMOTE Description The REMOTE command initiates a service call through a remote modem. This command duplicates the Initiate Service Call option of the System Menu, which is assessed through the MENU command. Refer to MENU - System Menu on page 3-128 and to Appendix B for information on service calls.
RESET - Cold/Warm Reset RESET - Cold/Warm Reset Command Input 3 RESET Description The RESET command allows you to specify the level of reset operation that will be in effect when a RESET exception is detected by the processor. A reset exception can be generated by pressing the RESET switch on the debugger host. Two RESET levels are available: Cold This is the standard level of operation, and is the one defaulted to on power-up.
RESET - Cold/Warm Reset MPU Clock Speed =xxMhz BUS Clock Speed =xxMhz PPC1-Bug> 3 3-198
RL - Read Loop RL - Read Loop Command Input 3 RL ADDR[;B|H|W] Options B Byte H Half-word W Word Description The RL command establishes an infinite loop consisting of a processor load instruction targeted to the given address and of the given length (the default data size is word), followed by a branch instruction back to the load. Hence the address is accessed repeatedly in rapid succession.
RM - Register Modify RM - Register Modify Command Input 3 RM [REG] Description The RM command allows you to display and change the target registers. REG is the target register. If REG is not specified, all the registers are displayed in sequence. When invoked without options, the RM command enters an interactive mode where the register contents currently in effect are displayed one-at-a-time on the console for the operator to examine.
RM - Register Modify Example 2: Modify register FR0 and view the results. PPC1-Bug>RM FR0 FR0 =0_384_4ED67D467D9BF= 1.2300000000000004_E-0037? FR1 =0_000_0000000000000= 0.0000000000000000_E+0000? FR2 =0_000_0000000000000= 0.0000000000000000_E+0000? FR3 =0_000_0000000000000= 0.0000000000000000_E+0000? FR4 =0_000_0000000000000= 0.0000000000000000_E+0000? PPC1-Bug>RM FR0 FR0 =0_3DE_70C6B50A527AC= 1.6770000000000003_E-0010? FR1 =0_407_0000000000000= 2.
RM - Register Modify SPR20 =FFEC0000? SPR21 =FFEC0000? SPR22 =16A30500? SPR25 =00000000? SPR26 =00040010? SPR27 =00083030? SPR272 =00004210? SPR273 =00000000? SPR274 =00000000? SPR275 =00000000? SPR282 =00083030? SPR286 =00083030? SPR528 =0000000E? SPR529 =0000007F? SPR530 =FFF0000F? SPR531 =FFF00047? SPR532 =00000000? SPR533 =00000000? SPR534 =00
RS - Register Set RS - Register Set Command Input 3 RS REG [EXP|ADDR] Description The RS command allows you to change the data in the specified target register. It works in essentially the same way as the RM command. REG is the target register. When invoked without options, the RM command enters an interactive mode where the register contents currently in effect are displayed one-at-a-time. You may change the displayed value by typing a new value followed by the Return key.
RS - Register Set Example 2: Examine register R5. PPC1-Bug>RS R5 R5 =12345678 PPC1-Bug> 3 Example 3: Examine register FR0. PPC1-Bug>RS FR0 FR0 =0_44D_09F7E57C92CC4= 3.1399999999999997_E+0023 PPC1-Bug> Example 4: Set register FR0 contents. PPC1-Bug>RS FR0 1.23E-37 FR0 =0_384_4ED67D467D9BF= 1.
RUN - MPU Execution/Status RUN - MPU Execution/Status Note This command is for multi-processor boards only. 3 Command Input RUN [MPU#] Description The RUN command allows you to inquire of the BUG the current state of each of the processors. The command also allows you to switch an idle processor to the current processor (processor executing the debugger). The MPU# argument depends on your configuration and idle processors present.
RUN - MPU Execution/Status Descriptions of all possible states: State 3 Description IDLE Processor is idle (can be forked). UNKNOWN Processor never became idle from start up (power-up/reset). EXECUTING TARGET Processor has been forked to target code. ERROR Illegal state. EXCEPTION PROCESSING PENDING Processor is stalled at the exception handler semaphore (see NOTE). Note 3-206 The debugger only permits one processor to execute the debugger monitor.
SD - Switch Directories SD - Switch Directories Command Input 3 SD Description The SD command allows you to switch from the debugger directory to the diagnostic directory or from the diagnostic directory to the debugger directory. The prompt indicates the current directory (PPC1-Bug> for the debugger, and PPC1-Diag> for the diagnostics). The commands in the current directory (the directory that you are in at the particular time) may be listed using the HE command.
SET - Set Time and Date SET - Set Time and Date Command Input 3 SET mmddyyhhmm Description The SET command starts the RTC and sets the time and date. The argument, mmddyyhhmm, represents two digits each of month, day, year, hour, and minutes. Hours should be in Military (24-hour) form. mmddyyhhmm is validated to ensure that it corresponds to a legal date and time, and if valid, the time-of-day clock is updated to correspond, and a formatted date and time message is displayed as a check.
SROM - SROM Examine/Modify SROM - SROM Examine/Modify Command Input 3 SROM [offset] Options: None Description: The SROM command allows the user to examine and modify the contents of the network SROM attached to the DEC21140 Ethernet chip. When the command is invoked, the user will be prompted with choices of base addresses of DEC21140 chips which have attached SROMs. Upon selection of the device, the SROM contents is read into a buffer and the user allowed to view and edit the buffer.
SROM - SROM Examine/Modify Examples: Example 1: To simply view the first 26 bytes of SROM contents and not change any entry: 3 PPC1-Bug>srom Device Address =$80804000 (N/Y)? y Reading SROM into Local Buffer..... $00 (&000) 5710? $02 (&002) 0000? $04 (&004) 0000? $06 (&006) 0000? $08 (&008) 0000? $0A (&010) 0000? $0C (&012) 0000? $0E (&014) 0000? $10 (&016) AF00? $12 (&018) 0301? $14 (&020) 0800? $16 (&022) 3E25? $18 (&024) 3157? .
SYM - Symbol Table Attach NOSYM - Symbol Table Detach SYM - Symbol Table Attach NOSYM - Symbol Table Detach Command Input 3 SYM [ADDR] NOSYM Description The SYM command attaches a symbol table to the debugger. Once a symbol table has been attached, all displays of physical addresses are first looked up in the symbol table to see if the address is in range of any of the symbols (symbol data).
SYM - Symbol Table Attach NOSYM - Symbol Table Detach The format of the symbol table is shown below: 3 Offset Field Description $00 Number of entries in symbol table (32 bit word).
SYM - Symbol Table Attach NOSYM - Symbol Table Detach Example 4: PPC1-Bug>MD _LDCHAR+4 _ldchar+$0004 04050607 08090A0B 0C0D0E0F 10111213 _ldchar+$0014 14151617 18191A1B 1C1D1E1F 20212223 PPC1-Bug> ................ ............ !"# Example 5: PPC1-Bug>BF _LDCHAR:8 0 Effective address: _ldchar+$0000 Effective count : &32 PPC1-Bug>MD _LDCHAR _ldchar+$0000 00000000 00000000 00000000 00000000 _ldchar+$0010 00000000 00000000 00000000 00000000 PPC1-Bug> ................ .............
SYMS - Symbol Table Display/Search SYMS - Symbol Table Display/Search Command Input 3 SYMS [symbol-name]|[;S] Description The SYMS command displays the attached symbol table or search the attached symbol table. Specify a symbol-name to search the symbol table for a particular symbol. Enter a character string in symbol-name to search the symbol table for all of symbols that begin with the character string. The S option displays the attached symbol table in ascending ASCII order.
SYMS - Symbol Table Display/Search Example 4: Display the attached symbol table in ascending ASCII order.
T - Trace T - Trace Command Input 3 T [COUNT] Description The T command executes one instruction at a time, displaying the target state after execution. T starts tracing at the address in the target IP. The optional COUNT argument (which defaults to 1) specifies the number of instructions to be traced before returning control to the debugger. Breakpoints are monitored (but not inserted) during tracing for all trace commands. Instruction memory must be writable.
T - Trace PPC1-Bug>BR BREAKPOINTS 00030014 PPC1-Bug> 3 Initialize IP and R3, R4: PPC1-Bug>RM IP IP =0000E000 ? 30000. PPC1-Bug> PPC1-Bug>RM R3 R3 =00000000 ? 41000 R4 =00000000 ? 100.
T - Trace Trace next instruction: PPC1-Bug> IP =00030008 MSR R0 =00000000 R1 R4 =00000100 R5 R8 =00000000 R9 R12 =00000000 R13 R16 =00000000 R17 R20 =00000000 R21 R24 =00000000 R25 R28 =00000000 R29 SPR0 =00000000 SPR1 00030008 419A0014 BC PPC1-Bug> 3 =00003030 CR =00000040 =00020000 R2 =FFF0178C =00000000 R6 =00000000 =00000000 R10 =00000000 =00000000 R14 =00000000 =00000000 R18 =00000000 =00000000 R22 =00000000 =00000000 R26 =00000000 =00000000 R30 =00000000 =00000000 SPR8 =00020014 12,26,$000
T - Trace Trace the next instruction: PPC1-Bug>T At Breakpoint IP =00030014 MSR R0 =00000000 R1 R4 =000000FF R5 R8 =00000000 R9 R12 =00000000 R13 R16 =00000000 R17 R20 =00000000 R21 R24 =00000000 R25 R28 =00000000 R29 SPR0 =00000000 SPR1 00030014 38630001 ADDI PPC1-Bug> =00003030 CR =00020000 R2 =00000000 R6 =00000000 R10 =00000000 R14 =00000000 R18 =00000000 R22 =00000000 R26 =00000000 R30 =00000000 SPR8 R3,R3,$1 =00000040 =FFF0178C =00000000 =00000000 =00000000 =00000000 =00000000 =00000000 =0
TA - Terminal Attach TA - Terminal Attach Command Input 3 TA [PORT] Description The TA command assigns a serial port to be the console. The port specified must already be assigned (refer to PF - Port Format NOPF - Port Detach on page 3-178). No prompt appears unless the selected port is already the console. All keyboard exchanges and displays are now made through port. This remains in effect until either another TA command is issued or the reset switch is depressed.
TIME - Display Time and Date TIME - Display Time and Date Command Input 3 TIME [;L] Description The TIME command displays the date and time to the console in ASCII characters. Use the SET command to initialize the time-of-day clock (refer to SET - Set Time and Date on page 3-208). Option L causes the date and time display to be updated continuously. An abort or break returns you to the debugger prompt. Use TIME ;L to see if the clock is running.
TM - Transparent Mode TM - Transparent Mode Command Input 3 TM [PORT] [ESCAPE] Description The TM command connects the current console serial port to the an other port, allowing you to communicate with a host computer. The two ports remain connected until the escape character (the character used to exit the transparent mode) is received by the console port. The escape character is not transmitted to the host, and at power-up or reset it is initialized to $01 (CTRL- a).
TM - Transparent Mode TM without any arguments displays the current escape character, which you must enter in order to return to the debugger. Examples 3 Example 1: Display the escape character. PPC1-Bug>TM Escape character: $01=^A . . . PPC1-Bug> Example 2: In this example, the default port of 1 is specified by the NULL PORT argument, and the escape character is set to CTRL-g. PPC1-Bug>TM,,^g Escape character: $07=^G . . .
TT - Trace to Temporary Breakpoint TT - Trace to Temporary Breakpoint Command Input 3 TT ADDR Description The TT command sets a temporary breakpoint at the specified address and traces until a breakpoint with 0 count is encountered. The temporary breakpoint is then removed (TT is analogous to the GT command) and control is returned to the debugger. Tracing starts at the target IP address. The message At Breakpoint is displayed when a breakpoint is reached.
TT - Trace to Temporary Breakpoint PPC1-Bug>BR BREAKPOINTS 00030014 PPC1-Bug> 3 Initialize IP and R3, R4: PPC1-Bug>RM IP IP =0000E000 ? 30000. PPC1-Bug> PPC1-Bug>RM R3 R3 =00000000 ? 41000 R4 =00000000 ? 100.
TT - Trace to Temporary Breakpoint R4 =00000100 R5 R8 =00000000 R9 R12 =00000000 R13 R16 =00000000 R17 R20 =00000000 R21 R24 =00000000 R25 R28 =00000000 R29 SPR0 =00000000 SPR1 00030008 419A0014 BC PPC1-Bug> 3 3-226 =00000000 R6 =00000000 =00000000 R10 =00000000 =00000000 R14 =00000000 =00000000 R18 =00000000 =00000000 R22 =00000000 =00000000 R26 =00000000 =00000000 R30 =00000000 =00000000 SPR8 =00000000 12,26,$0003001C R7 R11 R15 R19 R23 R27 R31 SPR9 =00000000 =00000000 =00000000 =00000000 =00000000
VE - Verify S-Records Against Memory VE - Verify S-Records Against Memory Command Input 3 VE [PORT] [ADDR] [;[X] [C]] [=text] Options C Ignore checksum. A checksum for the data contained within an SRecord is calculated as the S-Record is read in at the port. Normally, this calculated checksum is compared to the checksum contained within the S-Record and if the compare fails an error message is sent to the screen on completion of the download. If this option is selected, then the comparison is not made.
VE - Verify S-Records Against Memory and should begin immediately following the equals sign, and terminate with the carriage return. If the host is operating full duplex, the string is also echoed back to the host port by the host and appears on your terminal screen. 3 In order to accommodate host systems that echo all received characters, the above-mentioned text string is sent to the host one character at a time and characters received from the host are read one at a time.
VE - Verify S-Records Against Memory Example For the example, assume that the program has been compiled and linked to start at address 65040000. .file “test.s” # # retrieve contents of the RTC registers # .toc T.FD: .tc FD.4330000080000000[tc] ,1127219200,-2147483648 .toc T..test: .tc ..test[tc], test[ds] T..LDATA: .tc ..LDATA[tc], .LDATA T..LRDATA: .tc ..LRDATA[tc], .LRDATA # .align 2 .globl test[ds] .csect test[ds] .long .test[pr], TOC[tc0], 0 .globl .test[pr] .csect .test[pr] .
VE - Verify S-Records Against Memory This file is downloaded into memory at address $40000. The program may be examined in memory using the MD command. PPC1-Bug>MD 40000:5;DI 00040000 7C8402A6 MFSPR R4,4 00040004 90830000 STW R4,$0(R3) ($00041000) 00040008 7C8502A6 MFSPR R4,5 0004000C 90830004 STW R4,$4(R3) ($00041004) 00040010 4E800020 BCLR 20,0 PPC1-Bug> 3 Suppose you want to make sure that the program has not been destroyed in memory. The VE command is used to perform a verification.
VER - Revision/Version Display VER - Revision/Version Display Command Input 3 VER [;E] Description The VER command displays the various revisions and versions of the host's hardware subsystems. The command displays the revision and date of PPCBug that is running. The E option displays more detail, such as PCI configuration headers for each device, which can be used for components/subsystems that may have lengthy data arrays associated with their identification.
VER - Revision/Version Display PCI Function PCI Function PCI Function PCI Function PCI Function PCI Function PCI Function PCI Function PCI Function PPC1-Bug> 3 00/0B/2 00/0B/3 00/0E/0 00/10/0 00/14/0 01/0D/0 01/0F/0 02/08/0 02/0D/0 (00005A00) (00005B00) (00007000) (00008000) (0000A000) (00016800) (00017800) (00024000) (00026800) ID/Revision.........=30381106/02 ID/Revision.........=30401106/02 ID/Revision.........=00091011/20 ID/Revision.........=00B81013/00 ID/Revision.........
VER - Revision/Version Display PCI Function 00/0B/0 (0005800) ID/Revision..........=05861106/33 Class:Bridge Device Subclass: PCI/ISA Bridge Base+$0000 05 86 11 06 02 00 00 07 06 01 00 33 00 80 00 00 ............3. Base+$0010 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... Base+$0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... Base+$0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
VER - Revision/Version Display PCI Function 00/14/0 (0000A000) ID/Revision..........=00261011/01 Class: Bridge Device Subclass:PCI/PCI Bridge Base+$0000 Base+$0010 Base+$0020 Base+$0030 3 00 00 3B 00 26 00 E0 00 10 00 3B 00 11 00 D0 00 02 00 00 00 80 00 01 00 00 00 FF 00 07 00 F1 00 06 80 FF 00 04 02 FF 00 00 01 FF 00 01 00 FF 00 00 22 00 00 01 80 00 00 80 E1 00 00 08 D1 00 00 .&............. ............... ............... ...............
WL - Write Loop WL - Write Loop Command Input 3 WL ADDR:DATA[;B|H|W] Options B Byte H Half-word W Word Description The WL command establishes an infinite loop consisting of a processor store instruction, DATA, targeted to the given ADDR and of the given length, followed by a branch instruction back to the store. The defined DATA is therefore stored repeatedly into the defined location in rapid succession.
PPCBug Firmware Package User’s Manual Part 2 of 2 PPCBUGA2/UM4
Notice While reasonable efforts have been made to assure the accuracy of this document, Motorola, Inc. assumes no liability resulting from any omissions in this document, or from the use of the information obtained therein. Motorola reserves the right to revise this document and to make changes from time to time in the content hereof without obligation of Motorola to notify any person of such revision or changes.
Preface The PPCBug Firmware Package UserÕs Manual provides information on the PPCBug Þrmware, the start-up and boot routines, the debugger commands, the one-line assembler/disassembler, and the debugger system calls.
Conventions The following conventions are used in this document: bold is used for user input that you type just as it appears. Bold is also used for commands, options and arguments to commands, and names of programs, directories, and files. italic is used for names of variables to which you assign values. Italic is also used for comments in screen displays and examples. courier is used for system output (e.g., screen displays, reports), examples, and system prompts.
Safety Summary Safety Depends On You The following general safety precautions must be observed during all phases of operation, service, and repair of this equipment. Failure to comply with these precautions or with speciÞc warnings elsewhere in this manual violates safety standards of design, manufacture, and intended use of the equipment. Motorola, Inc. assumes no liability for the customer's failure to comply with these requirements.
The computer programs stored in the Read Only Memory of this device contain material copyrighted by Motorola Inc., 1995, 1996, and 1997, and may be used only under a a license such as those contained in MotorolaÕs software licenses. The software described herein and the documentation appearing herein are furnished under a license agreement and may be used and/or disclosed only in accordance with the terms of the agreement. The software and documentation are copyrighted materials.
4One-Line Assembler/ Disassembler 4 Introduction The PPCBug one-line assembler is an interactive assembler/editor in which the source program is not saved. Each source line is translated into the proper PowerPC machine language code and is stored in memory on a line-by-line basis at the time of entry. In order to display an instruction, the machine code is disassembled, and the instruction mnemonic and operands are displayed. All valid PowerPC instructions are translated.
Comparison with the Standard Assembler Machine-Instruction Operation Codes Refer to PowerPC 603 RISC Microprocessor UserÕs Manual, PowerPC 604 RISC Microprocessor UserÕs Manual, or the PowerPC MCP750 RISC Microprocessor UserÕs Manual for information on the mnemonic machine instruction operation codes. 4 Directives The PPCBug one-line assembler recognizes only two mnemonic directives: to define a word constant (WORD), and system call (SYSCALL).
One-Line Assembler/ Disassembler ❏ No conditional assembly is used. ❏ Several symbols recognized by the resident assembler are not included in the PPCBug one-line assembler character set. ❏ Depending on the context, the ampersand (&) has multiple meanings to the resident assembler (refer to Addressing Modes on page 4-8). The & is either the AND logical operator or a decimal number prefix.
Source Program Coding Operation Field Because there is no label field, the operation field may begin in the first available column. It may also follow one or more spaces. Entries can consist of one of two categories: ❏ Operation codes which correspond to the MPC60x instruction set. ❏ Define Constant directive -- WORD is recognized to define a constant in a word location. 4 The size of the data field affected by an instruction is determined by the data size codes.
One-Line Assembler/ Disassembler Mnemonics and Delimiters The assembler recognizes all PowerPC instruction mnemonics. Numbers are recognized as binary, octal, decimal, and hexadecimal, with hexadecimal the default case. Numbers may be represented only as integers; floating point representations are not supported.
Source Program Coding Instructions The following is a list of the instruction fields and their default number bases: 4 4-6 CRBA Decimal CRBB Decimal BD Signed Hexadecimal CRFD Decimal CRFS Decimal BI Decimal BO Decimal CRBD Decimal D Signed Hexadecimal DS Signed Hexadecimal FM Hexadecimal FRA Decimal FRB Decimal FRC Decimal FRS Decimal FRD Decimal CRM Hexadecimal L Decimal LI Signed Hexadecimal MB Decimal ME Decimal NB Decimal RA Decimal RB Decimal RS Dec
One-Line Assembler/ Disassembler SPR Decimal TO Decimal IMM Decimal UIMM Hexadecimal The assembly/disassembly format of the instruction mnemonics and operands follow the syntax specified in the PowerPC 603 RISC Microprocessor UserÕs Manual or PowerPC 604 RISC Microprocessor UserÕs Manual. The required fields are in boldface type, and the variable fields are not, fields being one or more characters in length.
Source Program Coding Addressing Modes Effective address modes, combined with operation codes, define the particular function to be performed by a given instruction. Effective addressing and data organization are described in detail in the section on Addressing Modes and Instruction Set in the PowerPC 603 RISC Microprocessor User's Manual or PowerPC 604 RISC Microprocessor User's Manual. 4 You may use an expression in any numeric field of these addressing modes.
One-Line Assembler/ Disassembler The order of evaluation is strictly left to right with no precedence granted to some operators over others. The only exception to this is when you force the order of precedence through the use of parenthesis. The order of parsing algebraic expressions is: 4 OPERAND OPERATOR OPERAND OPERATOR... with a possible left or right parenthesis. The parsing order allows the assembler to properly interpret characters.
Source Program Coding An ASCII string which contains spaces may not be used as an argument to the WORD directive, even if the string is enclosed inside single quotes. In this case, the mm command may be used in place of the assembler's WORD directive. Note that to use mm, the one-line assembler must be exited. The following example illustrates the Assembler Error which will occur if the user attempts to enter a string containing spaces using the WORD directive.
One-Line Assembler/ Disassembler Refer to Chapter 5, System Calls, for information on the system call routines. Entering and Modifying Source Programs User programs are entered into the memory using the one-line assembler/ disassembler. The program is entered in assembly language statements on a line-by-line basis. The source code is not saved as it is converted immediately to machine code upon entry. This imposes several restrictions on the type of source line that can be entered.
Entering and Modifying Source Programs (always hexadecimal) is returned. Because the disassembler gives precedence to instructions, a word of data that corresponds to a valid instruction will be returned as the instruction.
One-Line Assembler/ Disassembler Entering Branch Operands In the case of forward branches, the absolute address of the destination may not be known as the program is being entered. You may temporarily enter an asterisk (*) for branch to self in order to reserve space. After the actual address is discovered, the line containing the branch instruction can be re-entered using the correct value. Branch operands are interpreted as signed hexadecimal numbers.
Entering and Modifying Source Programs Assembler Error Messages The following is a list of the assembler error messages: An Operand has a Length of Zero Unknown Mnemonic 4 Excessive Operand(s) Missing Operand(s) Operand Type Not Found Operand Prefix Operand Address Misalignment Operand Displacement Operand Sign Extension Operand Data Field Overflow Operand Conversion 4-14
5System Calls 5 Introduction This chapter describes the PPCBug System Call handler, which allows system calls from user programs. The system calls can be used to access selected functional routines contained within the debugger, including input and output routines. The System Call handler may also be used to transfer control to the debugger at the end of a user program (refer to .RETURN on page 5-62).
System Call Routines String Formats for I/O Within the context of the System Call handler there are two formats for strings: Pointer/Pointer Format The string is defined by a pointer to the first character and a pointer to the last character + 1. Pointer/Count Format 5 The string is defined by a pointer to a count byte, which contains the count of characters in the string, followed by the string itself. A line is defined as a string followed by a carriage return and a line feed ().
System Calls Table 5-1. System Call Routines -- Hex Code Order (Continued) Code $0012 $0014 $0015 $0018 $0019 $001A $001B $001C $001D $0020 $0021 $0022 $0023 $0024 $0025 $0026 $0027 $0028 $0029 $0043 $0050 $0051 $0052 $0053 $0060 $0061 $0062 $0063 $0064 $0067 $0068 Routine .DSKCFIG .DSKFMT .DSKCTRL .NETRD .NETWR .NETCFIG .NETFOPN .NETFRD .NETCTRL .OUTCHR .OUTSTR .OUTLN .WRITE .WRITELN .WRITDLN .PCRLF .ERASLN .WRITD .SNDBRK .DELAY .RTC_TM .RTC_DT .RTC_DSP .RTC_RD .REDIR .REDIR_I .REDIR_O .RETURN .BINDEC .
System Call Routines Table 5-1. System Call Routines -- Hex Code Order (Continued) Code $0069 $006A $006B $0070 $0071 $0073 $0074 $0090 $0100 $0101 $0110 $0120 $0124 $0128 $012C $0130 $0131 5 Routine .MULU32 .DIVU32 .CHK_SUM .BRD_ID .ENVIRON .PFLASH .DIAGFCN .SIOPEPS .FORKMPU .FORKMPUR .IDLEMPU .IOINQ .IOINFORM .IOCONFIG .IODELETE .SYMBOLTA .
System Calls Table 5-2. System Call Routines -- Alphabetical Order (Continued) Routine .DSKCFIG .DSKCTRL .DSKFMT .DSKRD .DSKWR .ENVIRON .ERASLN .FORKMPU .FORKMPUR .IDLEMPU .INCHR .INLN .INSTAT .IOCONFIG .IODELETE .IOINFORM .IOINQ .MULU32 .NETCFIG .NETCTRL .NETFOPN .NETFRD .NETRD .NETWR .OUTCHR .OUTLN .OUTSTR .PCRLF .PFLASH .READLN .
System Call Routines Table 5-2. System Call Routines -- Alphabetical Order (Continued) Routine .REDIR .REDIR_I .REDIR_O .RETURN .RTC_DSP .RTC_DT .RTC_RD .RTC_TM .SIOPEPS .SNDBRK .STRCMP .SYMBOLTA .SYMBOLTD .WRITD .WRITDLN .WRITE .
5System Calls .INCHR .INCHR Name .INCHR - Input character routine Code $0000 Description 5 .INCHR reads a character from the default input port. The character is returned in the LSB of R03. Entry Conditions None Exit Conditions Different From Entry R03: bits 7 through 0 contain the character returned R03: bits 31 through 8 are zero.
.INSTAT .INSTAT Name .INSTAT - Input serial port status routine Code $0001 5 Description .INSTAT is used to see if there are characters in the default input port buffer. R03 is set to indicate the result of the operation. Entry Conditions No arguments required Exit Conditions Different From Entry R03: Bit 3 (ne) = 1; Bit 2 (eq) = 0 if the receiver buffer is not empty. R03: Bit 3 (ne) = 0; Bit 2 (eq) = 1 if the receiver buffer is empty.
.INLN .INLN Name .INLN - Input line routine Code $0002 Description 5 .INLN is used to read a line from the default input port. The buffer size should be at least 256 bytes. Entry Conditions R03: 32-bit address of string buffer Exit Conditions Different From Entry R03: Address of last character in the string+1 Note A line is a string of characters terminated by a . The maximum allowed size is 254 characters.
.READSTR .READSTR Name .READSTR - Read string into variable-length buffer Code $0003 5 Description .READSTR is used to read a string of characters from the default input port into a buffer. On entry, the Þrst byte in the buffer indicates the maximum number of characters that can be placed in the buffer. The buffer size should at least be equal to that number+2. The maximum number of characters that can be placed in a buffer is 254 characters.
.READSTR Note This routine allows the caller to dictate the maximum length of input to be less than 254 characters. If more characters are entered, then the buffer input is truncated. Use the control characters described in Disk I/O Support on page 1-23.
.READLN .READLN Name .READLN - Read line to Þxed-length buffer Code $0004 5 Description .READLN is used to read a string of characters from the default input port. Characters are echoed to the default output port. A string consists of a count byte followed by the characters read from the input. The count byte indicates the number of characters in the input string, excluding the sequence. A string may be up to 254 characters.
.CHKBRK .CHKBRK Name .CHKBRK - Check for break Code $0005 Description 5 .CHKBRK alters R03 according to a break status being detected at the default input port. Entry Conditions No arguments required Exit Conditions Different From Entry R03: Bit 3 (ne) = 1; Bit 2 (eq) = 0 if break status is not detected. R03: Bit 3 (ne) = 0; Bit 2 (eq) = 1 if break status is detected.
.DSKRD .DSKWR .DSKRD .DSKWR Name .DSKRD - Disk read routine .DSKWR - Disk write routine Codes 5 $0010 $0011 Description These routines are used to read and write blocks of data from/to the speciÞed disk or tape device. Information about the data transfer is passed in a command packet which has been built somewhere in memory. (The user program must Þrst manually prepare the packet.) The address of the packet is passed as an argument to the routine. The same command packet format is used for .DSKRD and .
.DSKRD .DSKWR Field descriptions: Controller LUN Logical Unit Number (LUN) of controller to use Device LUN Logical Unit Number (LUN) of device to use Status Half-Word This status half-word reßects the result of the operation. It is zero if the command completed without errors. Refer to Appendix F for meanings of returned error codes. Memory Address Address of buffer in memory. On a disk read, data is written starting at this address. On a disk write, data is read starting at this address.
.DSKRD .DSKWR Bit 1 Ignore File Number (IFN) ßag. If 0, the Þle number Þeld is used to position the tape before any reads or writes are done. If 1, the Þle number Þeld is ignored, and reads or writes start at the present tape position. Bit 0 End of File ßag. If 0, reads or writes are done until the speciÞed block count is exhausted. If 1, reads are done until the count is exhausted or until a Þlemark is found. If 1, writes are terminated with a Þlemark.
.DSKCFIG .DSKCFIG Name .DSKCFIG - disk conÞgure routine Code $0012 Description 5 This routine allows you to change the conÞguration of the speciÞed device. It effectively performs the IOT command under program control. Refer to Table E-2 for information on formatting ßoppy disks. All the required parameters are passed in a command packet which has been built somewhere in memory. The address of the packet is passed as an argument to the routine. Refer to Command Packet on page 5-18.
.DSKCFIG Command Packet The command packet format is as follows: F 5 $00 $02 $04 $06 $08 $0A $0C $0E E D C B A Controller LUN Memory Address 0 9 8 7 6 5 4 3 2 Device LUN 1 0 Status Half-Word Most SigniÞcant Half-Word Least SigniÞcant Half-Word 0 0 0 Address ModiÞer Field descriptions: 5-18 Controller LUN Logical Unit Number (LUN) of controller to use Device LUN Logical Unit Number (LUN) of device to use Status Half-Word This status half-word reßects the result of the operation.
.DSKCFIG Device Descriptor Packet The Device Descriptor Packet is as follows: F $00 $02 $04 $06 $08 $0A $0C $0E $10 E D C B A Controller LUN 9 8 7 6 5 4 3 2 Device LUN 1 0 0 Parameters Mask Attributes Mask Attributes Flags Upper (Most SigniÞcant) Half-Word Lower (Least SigniÞcant) Half-Word Upper (Most SigniÞcant) Half-Word Lower (Least SigniÞcant) Half-Word Upper (Most SigniÞcant) Half-Word Lower (Least SigniÞcant) Half-Word Parameters Most of the Þelds in the Device Descriptor Packet are eq
.DSKCFIG Attributes Flags Equivalent to the IOSATW and IOSEATW Þelds, with the lower half-word equivalent to IOSATW, and the upper half-word equivalent to IOSEATW Parameters The parameters used for device reconÞguration are speciÞed in this area. Most parameters have an exact CFGA equivalent. The Disk Packet Parameters are shown in the following table. The parameters that do not have an exact equivalent CFGA field are indicated with an asterisk (*). 5 Table 5-3.
.DSKCFIG Table 5-3. Disk Packet Parameters Parameter P_DBS* Offset (Bytes) Length (Bytes) $13 1 CFGA Equivalent IOSREC Description Record (Block) size, encoded as follows (IOSREC is a two-byte Þeld containing the actual block size): $00 128 bytes $01 256 bytes $02 512 bytes $03 1024 bytes 5 P_DST* $14 2 IOSSPT Sectors per track; P_DST is a two byte Þeld, IOSSPT is a one-byte Þeld.
.DSKCFIG Configuration Area Block CFGA Fields Attribute Mask -- IOSATM and IOSEATM The IOSATM field bits are defined in the following table: A 1 in a particular bit position indicates that the corresponding attribute from the attributes (or extended attributes) word should be used to update the configuration. A 0 in a bit position indicates that the current attribute should be retained. 5 Table 5-4.
.DSKCFIG Table 5-5. IOSPRM Fields (CFGA) Label IOSRECB IOSSPTB IOSHDSB IOSTRKB IOSILVB IOSSOFB IOSPSMB IOSSHDB IOSPCOMB IOSSRB IOSRWCCB Bit Position 0 4 5 6 7 8 9 10 12 14 15 Description Operating system block size Sectors per track Number of heads Number of cylinders Interleave factor Spiral offset Physical sector size Starting head number Precompensation cylinder number Step rate code Reduced write current cylinder number and ECC data burst length Table 5-6.
.DSKCFIG Table 5-7.
.DSKCFIG Table 5-8. CFGA Fields IOSREC Parameter Record (Block) size IOSSPT IOSHDS Sectors per track Number of heads IOSTRK IOSILV Number of cylinders Interleave factor IOSPSM IOSSOF Physical sector size Spiral offset IOSSHD Starting head number IOSPCOM Precompensation cylinder IOSSR Step Description Number of bytes per record (block). Must be an integer multiple of the physical sector size. Number of sectors per track. Number of recording surfaces for the speciÞed device.
.DSKCFIG Table 5-8. CFGA Fields Parameter IOSRWCC Reduced write current cylinder 5 Description The cylinder number at which the write current should be reduced when writing to the drive. This parameter is normally speciÞed by the drive manufacturer. IOSECC ECC data burst length The number of bits to correct for an ECC error when supported by the disk controller. IOSGPB1 Gap byte 1 The number of words of zeros that are written before the header Þeld in each sector during format.
.DSKFMT .DSKFMT Name .DSKFMT - Disk format routine Code $0014 Description 5 This routine allows you to send a format command to the speciÞed device. The parameters required for the command are passed in a command packet which has been built somewhere in memory. The address of the packet is passed as an argument to the routine.
.DSKFMT Memory Address Address of buffer in memory. On disk read, data is written starting at this address. On disk write, data is read starting at this address. On disk format, this Þeld does not apply. Block Number For disk devices, when doing a format track, the track that contains this block number is formatted. This Þeld is ignored for streaming tape devices. Flag Byte Contains additional information.
.DSKFMT Exit Conditions Different From Entry Status half-word of command packet is updated. R03: Bit 3 (ne) = 1; Bit 2 (eq) = 0 if errors. R03: Bit 3 (ne) = 0; Bit 2 (eq) = 1 if no errors.
.DSKCTRL .DSKCTRL Name .DSKCTRL - Disk control routine Code $0015 5 Description This routine is used to implement any special device control routines that cannot be accommodated easily with any of the other disk routines. At the present, the only deÞned routine is SEND packet, which allows you to send a packet in the speciÞed format of the controller. The required parameters are passed in a command packet which has been built somewhere in memory.
.DSKCTRL Status Half-Word This status half-word reßects the result of the operation. It is zero if the command completed without errors. Refer to Appendix F for meanings of returned error codes. Memory Address Contains a pointer to the controller packet to send. Note that the controller packet to send (as opposed to the command packet) is controller and device dependent. Information about this packet should be found in the user's manual for the controller and device being accessed.
.NETRD .NETWR .NETRD .NETWR Name .NETRD - Read/get from host .NETWR - Write/put to host Code 5 $0018/$0019 Description This routine is used to get Þles from the destination host over the speciÞed network interface. The .NETWR system call is used to send Þles to the host. Information about the Þle transfer is passed in a command packet which has been built in memory. (The user program must Þrst manually prepare the packet.) The address of the packet is passed as an argument to the routine.
.NETRD .NETWR Field descriptions: Controller LUN Logical Unit Number (LUN) of controller to use Device LUN Logical Unit Number of device to use Status Word This status word reßects the result of the operation. It is zero if the command completed without errors. Refer to Appendix H for meanings of returned error codes. Data Transfer Address Address of buffer in memory. On a read, data is read to (received to) starting at this address. On a write, data is written (sent) starting at this address.
5System Calls .NETCFIG .NETCFIG Name .NETCFIG - ConÞgure network parameters Code $001A 5 Description This routine allows you to change the conÞguration parameters of the speciÞed network interface. The .NETCFIG system call effectively performs a NIOT command under program control. All the required parameters are passed in a command packet which has been built in memory. The address of the packet is passed as an argument to the routine.
.NETCFIG Field descriptions: Controller LUN Logical Unit Number (LUN) of controller to use Device LUN Logical Unit Number of device to use Status Word This status word reßects the result of the operation. It is zero if the command completed without errors. Refer to Appendix H for meanings of returned error codes. Network ConÞguration Parameters Pointer The location in memory of the network conÞguration parameters.
.NETCFIG F 5 $0C $0E $10 $12 $14 $16 $18 $1A $1C $1E $20 $22 $24 $26 $28 $2A $2C $2E $30 $32 $34 $36 $38 E D C B A 9 8 7 6 5 4 3 2 BOOTP/RARP Retry BOOTP/RARP Control Most SigniÞcant Word Least SigniÞcant Word Most SigniÞcant Word Least SigniÞcant Word Most SigniÞcant Word Least SigniÞcant Word Most SigniÞcant Word Least SigniÞcant Word Most SigniÞcant Word Least SigniÞcant Word Most SigniÞcant Word Least SigniÞcant Word Most SigniÞcant Word Least SigniÞcant Word Most SigniÞcant Word Least
.NETCFIG Field descriptions: Node Control The starting address of the necessary memory Memory Address needed for the transmit and receive buffers. 256KB are needed for the speciÞed Ethernet driver (transmit/receive buffers). Client IP Address The IP address of the client. The Þrmware is considered to be the client. Server IP Address The IP address of the server. The Þrmware is considered to be the server. 5 Subnet IP Address Mask The subnet IP address mask.
.NETCFIG Boot File The delay, in seconds, before control is passed to Execution Delay the loaded Þle (program). Boot File Length The number of bytes from the data transfer address to transfer. A length of 0 speciÞes to transfer the entire Þle on a read. On a write the length must be set to the number of bytes to transfer. Boot File Offset The offset into the Þle on a read. This permits users to wind into a Þle.
.NETCFIG ) ARP reply - Unsupported RARP type { RARP request } RARP reply ^ Unsupported TFTPtype \ TFTP read request / TFTP write request < TFTP acknowledgment > TFTP data | TFTP error , Unsupported ICMP type : ICMP echo request ; ICMP echo reply 5 BOOTP/RARP The BOOT/RARP request control during the boot Request Control process. Control can be set either to always (A) or to when needed (W).
.NETFOPN .NETFOPN Name .NETFOPN - Open Þle for reading Code $001B 5 Description This routine allows the user to open a Þle for reading. The Þrmware basically transmits a TFTP Read Request for the speciÞed Þle and returns to the user. It is your responsibility to retrieve the forthcoming Þle blocks; you would use the .NETFRD system call to do this. You must also perform the Þle block retrievals in a timely fashion, else the TFTP server will time-out.
.NETFOPN Field descriptions: Controller LUN Logical Unit Number (LUN) of controller to use Device LUN Logical Unit Number of device to use Status Word This status word reßects the result of the operation. It is zero if the command completed without errors. Refer to Appendix H for meanings of returned error codes. Filename String The name of the Þle to load. The Þlename string must be null terminated. The maximum length of the string is 64 bytes, inclusive of the null terminator.
.NETFRD .NETFRD Name .NETFRD - Retrieve speciÞed Þle blocks Code $001C Description 5 This routine allows you to retrieve the speciÞed Þle blocks. You would use this routine multiple times to retrieve the entire Þle. Prior to using this routine a .NETFOPN system call must have been performed. For each Þle block retrieved the Þrmware will transmit a TFTP ACK packet to acknowledge the receipt of data. The end of data will be signiÞed when the number of bytes transferred is smaller than the block size.
.NETFRD Field descriptions: Controller LUN Logical Unit Number (LUN) of controller to use Device LUN Logical Unit Number of device to use Status Word This status word reßects the result of the operation. It is zero if the command completed without errors. Refer to Appendix H for meanings of returned error codes. Data Transfer Address Address of buffer in memory to which to transfer the Þle block. Transfer Byte Count This Þeld is status only and will be updated only on a successful data transfer.
.NETCTRL .NETCTRL Name .NETCTRL - Implement special control routines Code $001D 5 Description This routine is used to implement any special control routines that cannot be accommodated easily with any of the other network routines. At the present, the only deÞned packet is SEND packet, which allows you to send a packet in the speciÞed format to the speciÞed network interface driver. The required parameters are passed in a command packet which has been built somewhere in memory.
.NETCTRL Field descriptions: Controller LUN Logical Unit Number (LUN) of controller to use Device LUN Logical Unit Number of device to use Status Word This status word reßects the result of the operation. It is zero if the command completed without errors. Refer to Appendix H for meanings of returned error codes. Command IdentiÞer The command operation type.
.NETCTRL Memory Address The memory address in which the data transfer operation (types 1, 2, and 3) would take place from/to. Number of Bytes The number of bytes of the data transfer. Status/Control Flags This parameter speciÞes control and status ßags as needed by the operation types. Bit #16 - Receive data transferred to user's memory.
.OUTCHR .OUTCHR Name .OUTCHR - Output character routine Code $0020 Description 5 This routine outputs a character to the default output port. Entry Conditions R03: Bits 7 through 0: Character (byte) Exit Conditions Different From Entry Character is sent to the default I/O port.
.OUTSTR .OUTLN .OUTSTR .OUTLN Names .OUTSTR - Output string to default output port .OUTLN - Output string with a sequence Codes 5 $0021 $0022 Description .OUTSTR outputs a string of characters to the default output port. .OUTLN outputs a string of characters followed by a sequence.
.WRITE .WRITELN .WRITE .WRITELN Names .WRITE - Output string without a or .WRITELN - Output string with a sequence Codes 5 $0023 $0024 Description These output routines are designed to output strings formatted with a count byte followed by the characters of the string. The user passes the starting address of the string. The output goes to the default output port.
.PCRLF .PCRLF Name .PCRLF - Print a sequence Code $0026 5 Description .PCRLF sends a sequence to the default output port. Entry Conditions No arguments required.
.ERASLN .ERASLN Name .ERASLN - Erase Line Code $0027 Description 5 .ERASLN is used to erase the line at the present cursor position. If a printer is used (hardcopy mode), a sequence is issued instead. Entry Conditions No arguments required. Exit Conditions Different From Entry The cursor is positioned at the beginning of a blank line.
.WRITD .WRITDLN .WRITD .WRITDLN Names .WRITD - Output string with data .WRITDLN - Output string with data and a sequence Codes 5 $0028 $0025 Description These trap routines take advantage of the monitor I/O routine which outputs a user string containing embedded variable Þelds. The user passes the starting address of the string and the address of a data list containing the data which is inserted into the string. The output goes to the default output port.
.WRITD .WRITDLN Notes 1. The string must be formatted such that the first byte (the byte pointed to by the passed address) contains the count (in bytes) of the string (including the data field specifiers, described in Note 2 below). 2. Any data fields within the string must be represented as follows: |radix,fieldwidth[Z]| 5 where: radix is the hexadecimal value for the base in which the data will be displayed (for example, A is base 10, and 10 is base 16.
.SNDBRK .SNDBRK Name .SNDBRK - Send break Code $0029 5 Description .SNDBRK is used to send a break to the default output port. Entry Conditions No arguments required Exit Conditions Different From Entry The current default output port has sent break.
.DELAY .DELAY Name .DELAY - Timer delay routine Code $0043 Description 5 .DELAY is used to generate accurate timing delays that are independent of the processor frequency and instruction execution rate. This routine uses the onboard timer for operation. You specify the desired delay count in milliseconds. The .DELAY system call returns to the caller after the speciÞed delay count is exhausted.
.RTC_TM .RTC_TM Name .RTC_TM - Time initialization for RTC Code $0050 5 Description .RTC_TM initializes Real-Time Clock with the time that is located in a user-speciÞed buffer. The data input format can be either ASCII or unpacked BCD.
.RTC_DT .RTC_DT Name .RTC_DT - Date initialization Code $0051 Description 5 .RTC_DT initializes Real-Time Clock with the date that is located in a user-speciÞed buffer. The data input format can be either ASCII or unpacked BCD.
.RTC_DSP .RTC_DSP Name .RTC_DSP - Display time from RTC Code $0052 5 Description .RTC_DSP displays the date and time on the console from the current cursor position. The format is as follows: DAY MONTH DD, YYYY hh:mm:ss.s DAY MONTH DD YYYY hh mm ss.s Day Month Day of month Year Hour Minute Second (to nearest tenth) Entry Conditions No arguments required Exit Conditions Different From Entry The cursor is left at the end of the string.
.RTC_RD .RTC_RD Name .RTC_RD - Read the RTC registers Code $0053 Description .RTC_RD is used to read the Real-Time Clock registers. The data returned is in packed BCD.
.REDIR .REDIR Name .REDIR - Redirect I/O routine Code $0060 5 Description .REDIR is used to select an I/O port and at the same time invoke a particular I/O routine. The invoked I/O routine reads or writes to the selected port.
.REDIR_I .REDIR_O .REDIR_I .REDIR_O Name .REDIR_I - Redirect input .REDIR_O - Redirect output Codes 5 $0061 $0062 Description The .REDIR_I and .REDIR_O system calls are used to change the default port number of the input and output ports, respectively. This is a permanent change, that is, it remains in effect until a new .REDIR command is issued.
.RETURN .RETURN Name .RETURN - Return to PPCBug Code $0063 5 Description .RETURN is used to return control to PPCBug from the target program in an orderly manner. First, any breakpoints inserted in the target code are removed. Then, the target state is saved in the register image area. Finally, the routine returns to PPCBug. Entry Conditions No arguments required. Exit Conditions Different From Entry Control is returned to PPCBug. Note 5-62 .
.BINDEC .BINDEC Name .BINDEC - Calculate the Binary Coded Decimal (BCD) equivalent of the binary number speciÞed Code $0064 5 Description .BINDEC takes a 32-bit unsigned binary number and changes it to an equivalent BCD number.
5System Calls .CHANGEV .CHANGEV Name .CHANGEV - Parse value, assign to variable Code $0067 5 Description Attempt to parse value in user-speciÞed buffer. If user's buffer is empty, prompt user for new value, otherwise update integer offset into buffer to skip value. Display new value and assign to variable unless user's input is an empty string.
.STRCMP .STRCMP Name .STRCMP - Compare two strings (pointer/count) Code $0068 Description 5 Comparison for equality is made and Boolean ßags are returned to caller. Entry Conditions R03: Address of string 1 R04: Address of string 2 Exit Conditions Different From Entry R03: Bit 3 (ne) = 1; Bit 2 (eq) = 0, if strings are not equal. R03: Bit 3 (ne) = 0; Bit 2 (eq) = 1, if strings are equal.
.MULU32 .MULU32 Name .MULU32 - Unsigned 32-bit x 32-bit multiply Code $0069 5 Description Two 32-bit unsigned integers are multiplied and the product is returned as a 32-bit unsigned integer. No overßow checking is performed.
.DIVU32 .DIVU32 Name .DIVU32 - Unsigned 32-bit x 32-bit divide Code $006A Description 5 Unsigned division is performed on two 32-bit integers and the quotient is returned as a 32-bit unsigned integer. The case of division by zero is handled by returning the maximum unsigned value $FFFFFFFF.
.CHK_SUM .CHK_SUM Name .CHK_SUM - Generate checksum for address range Code $006B 5 Description This routine generates a checksum for an address range that is passed in as arguments. Entry Conditions R03: Beginning address R04: Ending address + 1 R05: Scale indicator. Values are: 0 Default setting (WORD) 1 BYTE 2 HALF-WORD 4 WORD Exit Conditions Different From Entry R03: Checksum Notes 1.
.BRD_ID .BRD_ID Name .BRD_ID - Return pointer to board ID packet Code $0070 Description 5 This routine returns a pointer in R03 to the board identiÞcation packet. The packet is built at initialization time and contains information about the PowerPC board and peripherals it supports. The format of the board identiÞcation packet is shown below: 31 $00 $04 $08 $0C $10 $14 $18 $1C 24 23 Rev.
.BRD_ID Board Number Half-Word containing the board number (in BCD) Board SufÞx Half-Word containing the ASCII board sufÞx (e.g.
.BRD_ID Device Type Device 00 Direct-Access Device (e.g., magnetic disk) 01 Sequential-Access Device (e.g., magnetic tape) 02 Printer Device 03 Processor Device 04 Write-Once Read-Multiple Device (e.g., some optical devices) 05 CD-ROM Device 06 Scanner Device 07 Optical Memory Device (e.g., some optical devices) 08 Medium Changer Device (e.g.
.ENVIRON .ENVIRON Name .ENVIRON - Read/write environment parameters Code $0071 5 Description The purpose of the TRAP is to allow a user program access to certain debugger environmental parameters. These parameters include default boot devices and start-up conÞgurations.
.ENVIRON For operation 0 R03: The number of bytes required to store the debugger information. Description Of Parameter Packets The data contained in the parameter storage area is organized as a set of data packets.
.ENVIRON 2 Disk Auto Boot Information 2 $15 Disk Auto Boot Enable Disk Auto Boot at power-up only Disk Auto Boot Controller Logical Unit Number Disk Auto Boot Device Logical Unit Number 5 Disk Auto Boot Abort Delay Disk Auto Boot String to be passed to load program ($10 bytes in length) 3 ROM Boot Information 3 $C ROM Boot Enable ROM Boot at power-up only ROM Boot from VME bus ROM Boot Abort Delay ROM Boot Starting Address (4 bytes in length) ROM Boot Ending Address (4 bytes in length) 4 NetBoot Info
.ENVIRON 5 Memory Size Information 5 $9 Memory Size Enable ($4E or $59) Memory Size Starting Address (4 bytes) Memory Size Ending Address (4 bytes) 5 For an explanation of each entry and deÞnition of options, refer to the ENV command. The debugger will return all parameter packets on a read. During a write you may return only the packets that need to be updated; however, the packet may not be returned out of order. During an update, entries that have speciÞc values will be veriÞed.
.PFLASH Function .PFLASH Function Name .PFLASH - Program Flash memory Code $0073 5 Description The purpose of this TRAP is to program Flash memory under program control. The address of the packet is passed as an argument to the function. The address of the packet is passed in the longword memory location pointed to by the current stack pointer. The packet contains the necessary arguments/data to program the Flash memory.
.PFLASH Function Field descriptions: Control/Status Word SpeciÞes control and status of the various phases of the Flash memory programming. This parameter has two 16-bit parts: bits #31 to #16 specify status and bits #15 to #0 specify control. Source Starting Address Specifies the source starting address of the data with which to program the Flash memory. Word (32-bit) address alignment is required for this parameter.
.PFLASH Function The next table describes the definitions of the control and status bits in the Control/Status Word field. Type 5 DeÞnition Control 0 Execution address valid. Control 1 Execute address on error as well. Control 2 Execute local reset. Control 3 Execute local reset on error as well. Control 4 Non-verbose, no display messages. (NOTE) Control 5-15 Unused, Reserved Status 16 Error of some type, see remaining status bits. Status 17 Address/Range alignment error.
.DIAGFCN .DIAGFCN Name .DIAGFCN - Diagnostic routine Code $0074 Description 5 .DIAGFCN is a system-call-like routine, for the diagnostics. This system call provides the debugger and external software (operating systems) with a single-point-of-entry to information maintained by the Þrmware diagnostics. The .DIAGFCN system call requires a single argument, which is a pointer to a diagfcn struct.
.DIAGFCN 02: .TESTSTAT (output test status report) This diagcfn call allows access to selftest diagnostic results.
.DIAGFCN The caller will then typically allocate the number of bytes of memory requested for the report, and call the TESTSTAT function again. This time, the ÔsizeÕ passed in should be at least as large as the count returned by the previous call to TESTSTAT.
.DIAGFCN The B status indicates a test has decided not to run, due to some conÞguration limitation (an example would be when the MCECC tests report bypassed on a CPU that only contains parity-type RAM). The B status will overwrite the M, N, and E status. The P status will only ever be saved, if the previous status for the test was B, M, N, or E. A P status will never overwrite an F status.
.DIAGFCN if ( 4 < size < count ) write ‘count’ to ‘bufptr’ location in RAM return -1; if ( count <= size ) write ‘count’ to ‘bufptr’ location in RAM write status report to ‘bufptr + sizeof(int)’ in RAM return 0; The result is returned in R03 03: .MEMSTAT (memory status) 5 This function implements a report mechanism for main memory diagnostics. This report is always of a Þxed size, and can therefore be called by higher level software that can not dynamically allocate buffer space.
.DIAGFCN This report may return: N not executed B bypassed P passed F failed 1. Walk down through the diag directory, looking for test groups that match our list. 5 2. When a match is found, walk down through the tests, ignore any functions that are not of the type T_TEST, check the status for each test (using the test index to look in the diagctl teststat array). 3.
.DIAGFCN The argument pointer in the diagfcn struct points to the report buffer. This buffer is 452 bytes long, and has the structure: Entry 1 Entry 2 Entry 16 unsigned int unsigned int unsigned int unsigned int char[16] unsigned int unsigned int unsigned int char[16] . . .
.DIAGFCN The caller must provide a pointer to a structure when calling this function. The structure Þrst contains an ÕintÕ (4 bytes) giving the size of an available buffer to be used for output from this function. This ÕintÕ is immediately followed by the address (4 bytes) of the start of the buffer.
.DIAGFCN Examples Example 1: .CHKFCN PPC1-Bug>MM 10100;DI 00010100 59200074 SYSCALL .DIAGFCN 00010108 59200063 SYSCALL .RETURN PPC1-Bug>RM R02 (pointer to DIAGFCN struct) R03 =00000000? 20000 . PPC1-Bug>MM 20000 00020000 00000000? 1 (DIAGFCN #1, .CHKFCN) 00020004 00000000? 20008 (pointer to variable arguments) 00020008 00000000? 3 .
.DIAGFCN PPC1-Bug>RM R02 (pointer to DIAGFCN struct) R03 =00000000? 20000 . PPC1-Bug>MM 20008 (size of buffer) 00020008 00000000? 13B5 . PPC1-Bug>BF 20100:800 FFFFFFFF Effective address: 00020100 Effective count : &8192 PPC1-Bug>GO 10100 (generate a report) Effective address: 00010100 5 PPC1-Bug>RM R02 (check return status, 0=OK) R03 =00000000? .
.DIAGFCN PPC1-Bug>MD 20100:40 (display report) 00020100 00000005 00000000 00000000 0000004E 00020110 72616D00 00000000 00000000 00000000 00020120 00000000 00000000 0000004E 6D636563 00020130 63000000 00000000 00000000 00000000 00020140 00000000 0000004E 6D636563 63000000 00020150 00000000 00000000 00000000 00000000 00020160 0000004E 6D656D63 31000000 00000000 00020170 00000000 00000000 00000000 0000004E 00020180 6D656D63 32000000 00000000 00000000 00020190 00000000 00000000 00000000 00000000 00020
.DIAGFCN PPC1-Bug>MM 20008 (size of buffer) 00020008 00000000? AFE . PPC1-Bug>BF 20100:800 FFFFFFFF Effective address: 00020100 Effective count : &8192 PPC1-Bug>GO 10100 (generate a report) Effective address: 00010100 PPC1-Bug>RM R02 (check return status, 0=OK) R03 =00000000? .
.SIOPEPS .SIOPEPS Name .SIOPEPS - Retrieve SCSI pointers Code $0090 Description 5 The purpose of this TRAP is to allow a user program to access the SCSI I/O Processor package contained in the PPCBug ROMs. This TRAP returns a list of pointers and table sizes that the user program uses to move the SCSI I/O Processor package from ROM to RAM. The SIOP package cannot be executed by a user program without being moved and edited.
.SIOPEPS 5 5-92 script_ptr Pointer to the NCR scripts index pointer array script_ptr_sz Size of the NCR scripts index pointer array script_array_sz Size of the scripts array
5System Calls .FORKMPU Function .FORKMPU Function Note This is a PPC1Bug system call for MVME4600 series or Dual Processor MTX motherboards. Name .FORKMPU - Fork MPU (Multiple MPU Configuration) 5 Code $0100 Description .FORKMPU allows you to Fork (execute target code) on an MPU that is idle. The MPU register R1 is set to the user stack space. Interrupts are also disabled at the processor MSR register. Entry Conditions R03 ==> MPU number (i.e.
.FORKMPUR Function .FORKMPUR Function Note This is a PPC1Bug system call for MVME4600 or dual processor MTX motherboards. Name .FORKMPUR - Fork Idle MPU with Register Set 5 Code $0101 Description This routine loads the user register set into the specified MPU (load and go). This command is analogous to the BUG command FORKWR. Refer to Chapter 3 for the command description. Read only registers are not restored but are present in the list.
.FORKMPUR Function 31 $054 $058 $05C $060 $064 $068 $06C $070 $074 $078 $07C $080 $088 $090 $098 $0A0 $0A8 $0B0 $0B8 $0C0 $0C8 $0D0 $0D8 $0E0 $0E8 $0F0 $0F8 $100 $108 $110 $118 $120 $128 $130 $138 $140 $148 $150 $158 $160 $168 $170 $178 $180 $184 $188 $18C $190 24 23 16 15 GPR21 GPR22 GPR23 GPR24 GPR25 GPR26 GPR27 GPR28 GPR29 GPR30 GPR31 FPR00 FPR01 FPR02 FPR03 FPR04 FPR05 FPR06 FPR07 FPR08 FPR09 FPR10 FPR11 FPR12 FPR13 FPR14 FPR15 FPR16 FPR17 FPR18 FPR19 FPR20 FPR21 FPR22 FPR23 FPR24 FPR25 FPR26 FPR27
.FORKMPUR Function 31 5 $194 $198 $19C $1A0 $1A4 $1A8 $1AC $1B0 $1B4 $1B8 $1BC $1C0 $1C4 $1C8 $1CC $1D0 $1D4 $1D8 $1DC $1E0 $1E4 $1E8 $1EC $1F0 $1F4 $1F8 $1FC $200 $204 $208 $20C $210 $214 $218 $21C $220 $224 $228 $22C $230 $234 $238 $23C $240 $244 $248 $24C $250 $254 5-96 24 23 16 15 SR05 SR06 SR07 SR08 SR09 SR10 SR11 SR12 SR13 SR14 SR15 SPR00 SPR01 SPR04 SPR05 SPR06 SPR08 SPR09 SPR18 SPR19 SPR20 SPR21 SPR22 SPR25 SPR26 SPR27 SPR268 SPR269 SPR272 SPR273 SPR274 SPR275 SPR282 SPR283 SPR285 SPR287 SPR5
.FORKMPUR Function 31 $258 $25C $260 $264 $268 $26C $270 $274 $278 $27C $280 $284 $288 $28C $290 $294 $298 $29C $2A0 $2A4 $2A8 $2AC $2B0 $2B4 $2B8 $2BC $2C0 $2C4 $2C8 $2CC $2D0 $2D4 $2D8 $2DC $2E0 $2E4 $2E8 $2EC $2F0 $2F4 $2F8 $2FC $300 $304 24 23 16 15 SPR541 SPR542 SPR543 SPR936 SPR937 SPR938 SPR939 SPR940 SPR941 SPR942 SPR952 SPR953 SPR954 SPR955 SPR956 SPR957 SPR958 SPR976 SPR977 SPR978 SPR979 SPR980 SPR981 SPR982 SPR984 SPR986 SPR987 SPR990 SPR991 SPR1008 SPR1009 SPR1010 SPR1013 SPR1017 SPR1019 SPR
.FORKMPUR Function Field descriptions: GPR00 to GPR31 FPR00 to FPR31 SR00 to SR15 SPR0 to SPR1023 IP MSR CR FPSCR CPUIEN general purpose registers floating point registers segment registers special purpose registers instruction pointer machine state register Condition register floating point status and control register CPU interrupt enable 5 Refer to the microprocessor and CPU user manuals for a detailed description for each of these registers. Entry Conditions R03 ==> MPU number (i.e.
.IDLEMPU Function .IDLEMPU Function Name .IDLEMPU - Idle MPU (Multiple MPU Configuration) Code $0110 Description 5 .IDLEMPU is used to idle the processor executing this system call. Entry Conditions R03 ==> MPU number (i.e.
.IOINQ .IOINQ Name .IOINQ - Port Inquire Code $0120 5 Description Writes the Port Control Structure at the user-speciÞed address. The Port Control Structure contains I/O Port Concurrent Mode and Port Control information about the named port. Entry Conditions R0: Pointer to Port Control Structure as defined below. The Port Number, Board Name Pointer, and I/O Control Structure Pointer members of the Port Control Structure must be USER initialized before calling .IOINQ.
.IOINQ 31 0 24 $10 $14 $18 $1C $20 $24 $28 23 16 15 8 7 Concurrent Mode Modem ID I/O Control Structure Pointer Error Code Reserved Reserved Reserved 5 Field descriptions: Port Number The Port Number as used here is analogous to the port number as required by the PF (Port Format) command.
.IOINQ Concurrent Mode Nonzero Value ßags concurrent mode operation of this port. Zero ßags normal operation for this port. Modem ID Modem identiÞcation code for the modem associated with this port. The Modem ID code is ONLY valid if Concurrent Mode Operation is true for this port. The following modems are currently supported: Modem ID 5 5-102 Modem Type 1 Non-intelligent modem 2 Terminal - Refer to the Using the Service Call section in Appendix B.
.IOINQ Reserved 6 No info available on CM port because CM not active 7 All legal Port Numbers are currently in use 8 All device driver Control Structures are currently in use - can't deÞne any more Port Numbers. 9 Synchronization Error - cannot turn off CM. CM is already off. 10 Contradictory Request. CM port number speciÞed but user's CM ßag is clear and no PPCBug port is currently operating in CM. 11 Illegal Port number for .IODELETE trap call 12 Alias for Error #11 13 .
.IOINQ Field descriptions: ctrlbits The bits of this 32-bit wide integer are deÞned as high true ßags with the following meanings: Bit 00 odd parity Bit 01 even parity Bit 028 bit character word Bit 037 bit character word 5 Bit 046 bit character word Bit 055 bit character word Bit 062 stop bits Bit 071 stop bit 5-104 Bit 08 data terminal equipment Bit 09 data computer equipment Bit 10 cts control Bit 11 rts control Bit 12 xon/xoff control Bit 13 hard copy ßag baud Baud rate value for
.IOINQ Note Only the asynchronous protocol is supported by PPCBug.
.IOINFORM .IOINFORM Name .IOINFORM - Port Inform Code $0124 5 Description This trap will inform the PPCBug about change in I/O Port operation. The PPCBug updates its internal I/O control structures and writes Error Code and (possibly) Port Number in your Port Control Structure. If you wish to inform the PPCBug that you are turning on Concurrent Mode, you must set the Concurrent Mode field of the Port Control Structure. It is permissible to use a Port number of -2 when turning on Concurrent Mode.
.IOINFORM Port Control Structure The Port Control Structure is of the form: 31 0 $00 $04 $08 $0C $10 $14 $18 $1C $20 $24 $28 24 23 16 15 8 7 Port Number Board Name Pointer Channel Device Address Concurrent Mode Modem ID I/O Control Structure Pointer Error Code Reserved Reserved Reserved 5 5-107
.IOCONFIG .IOCONFIG Name .IOCONFIG - Port Configure Code $0128 Description 5 This trap will instruct the PPCBug to access the I/O device to change port operation and to update its internal I/O Control structures. The PPCBug writes ERROR CODE and (possibly) PORT NUMBER in your Port Control Structure. If you wish to inform the PPCBug that you are turning on Concurrent Mode, you must set the Concurrent Mode field of the Port Control Structure.
.IODELETE .IODELETE Name .IODELETE - Port Delete Code $012C Description 5 Causes the PPCBug to delete the named I/O port from its internal port list. The routine of this call is analogous to the PPCBug NOPF command. Note that .IODELETE cannot delete the Concurrent port. You must first use the .IOINFORM trap and then you may delete the port. Entry Conditions R03: Pointer to Port Control Structure as defined above.
.IODELETE 31 0 5 $00 $04 $08 $0C $10 $14 $18 $1C $20 $24 $28 5-110 24 23 16 15 8 Port Number Board Name Pointer Channel Device Address Concurrent Mode Modem ID I/O Control Structure Pointer Error Code Reserved Reserved Reserved 7
.SYMBOLTA .SYMBOLTA Name .SYMBOLTA - Attach Symbol Table Code $0130 Description 5 This routine attaches a symbol table to the debugger. Once a symbol table has been attached, all displays of physical addresses are first looked up in the symbol table to see if the address is in range of any of the symbols (symbol data). If the address is in range, it is displayed with the corresponding symbol name and offset (if any) from the symbol base address (symbol data).
.SYMBOLTA Field descriptions: Number of Entries The number of entries in table in Symbol Table Symbol Data 32-bit hexadecimal value. The symbol data Þelds must be ascending in value (sorted numerically). Upon execution of the system call, the debugger performs a sanity check on the symbol table with the above rules. The symbol table is not attached if the check fails.
.SYMBOLTD .SYMBOLTD Name .SYMBOLTD - Detach Symbol Table Code $0131 Description 5 This routine detaches a symbol table from the debugger. This command is analogous to the debugger command NOSYM. Refer to Chapter 3 for the command description.
ARelated Documentation A Motorola Computer Group Documents The publications listed below are on related products, and some may be referenced in this document.
A Related Documentation Table A-1.
Microprocessor and Controller Documents Microprocessor and Controller Documents For additional information, refer to the following table for manufacturersÕ data sheets or userÕs manuals. As an additional help, a source for the listed document is also provided. Please note that in many cases, the information is preliminary and the revision levels of the documents are subject to change without notice.
A Related Documentation Table A-2. Microprocessor and Controller Documents (Continued) Document Title and Source Publication Number MPC750TM RISC Microprocessor UserÕs Manual Motorola Literature Distribution Center Telephone: (800) 441-2447 or (303) 675-2140 FAX: (303) 675-2150 E-mail: ldcformotorola@hibbertco.com INTERNET: http://motorola.com/sps INTERNET: http://www.mot.
Microprocessor and Controller Documents Table A-2. Microprocessor and Controller Documents (Continued) Document Title and Source Publication Number MPC2604GA Integrated Secondary Cache for PowerPC Microprocessors Data Sheets Literature Distribution Center for Motorola Telephone: (800) 441-2447 FAX: (602) 994-6430 or (303) 675-2150 E-mail: ldcformotorola@hibbertco.com MPC2604GA AlpineTM VGA Family - CL-GD543X/Õ4X Technical Reference Manual Fourth Edition Cirrus Logic, Inc.
A Related Documentation Table A-2. Microprocessor and Controller Documents (Continued) Document Title and Source Publication Number PC87303VUL (Super I/OTM Sidewinder Lite) Floppy Disk Controller, Keyboard Controller, Real-Time Clock, Dual UARTs, IEEE 1284 Parallel Port, and IDE Interface National Semiconductor Corporation Customer Support Center (or nearest Sales OfÞce) 2900 Semiconductor Drive P.O.
Microprocessor and Controller Documents Table A-2. Microprocessor and Controller Documents (Continued) Document Title and Source Publication Number MK48T559 Address/Data Multiplexer 8K x 8 TIMEKEEPERTM SRAM Data Sheet SGS-Thomson Microelectronics Group Faxback (Document-on-Demand) system Carrollton, TX Telephone: (972) 4667-7788 M48T559 SYM 53CXX (was NCR 53C8XX) Family PCI-SCSI I/O Processors Programming Guide Symbios Logic Inc.
A Related Documentation Table A-2. Microprocessor and Controller Documents (Continued) Document Title and Source Publication Number Digital Semiconductor 21154 PCI-to-PCI Bridge Data Sheet Digital Equipment Corporation Maynard, MA Telephone (United States and Canada): 1-800-332-2717 Telephone (Outside North America): +1-508-628-4760 EC-R24JA-TE Z8536 CIO Counter/Timer and Parallel I/O Unit Product SpeciÞcation and UserÕs Manual (in Z8000® Family of Products Data Book) Zilog, Inc.
Related Specifications Related Specifications For additional information, refer to the following table for related specifications. As an additional help, a source for the listed document is also provided. Please note that in many cases, the information is preliminary and the revision levels of the documents are subject to change without notice. Table A-3.
A Related Documentation Table A-3. Related Specifications (Continued) Document Title and Source VME64 SpeciÞcation VITA (VMEbus International Trade Association) 7825 E. Gelding Drive, Suite 104 Scottsdale, Arizona 85260-3415 Telephone: (602) 951-8866 FAX: (602) 951-0720 Publication Number ANSI/VITA 1-1994 NOTE: An earlier version of this speciÞcation is available as: Versatile Backplane Bus: VMEbus Institute of Electrical and Electronics Engineers, Inc.
Related Specifications Table A-3. Related Specifications (Continued) Document Title and Source Publication Number Bidirectional Parallel Port Interface SpeciÞcation Institute of Electrical and Electronics Engineers, Inc. Publication and Sales Department 345 East 47th Street New York, New York 10017-21633 Telephone: 1-800-678-4333 IEEE Standard 1284 Peripheral Component Interconnect (PCI) Local Bus SpeciÞcation, Revision 2.1 PCI Special Interest Group 2575 NE Kathryn St.
A Related Documentation Table A-3.
BSystem Menu B Introduction Enter the MENU command at either the PPC1-Bug> or PPC1-Diag> prompt to display the System Menu, which is shown below. 1) 2) 3) 4) 5) 6) Continue System Start Up Select Alternate Boot Device Go to System Debugger Initiate Service Call Display System Test Errors Dump Memory to Tape Menu Items Continue System Start-up Enter 1 to continue the system start-up and boot sequence.
Menu Items *Enter Alternate Boot Device: Controller: Drive : File :". B The devices supported by the PPCBug are listed in Appendix E. After entry of a selected device and a carriage return, the menu is redisplayed for another selection (normally Continue System Start Up). Go to System Diagnostics Enter 3 to go to the PPCBug diagnostics directory. You may return to the System Menu by entering the MENU command at the PPC1-Diag> prompt. Initiate Service Call Enter 4 to initiate a service call.
System Menu about the Tape Dump Utility that created the tape, certain hardware specific information, and, an array of Tape Dump File Map Entries. Other files (files 1 through n) written by the Tape Dump Utility are simply image(s) of memory at the time the Tape Dump Utility was invoked. This implementation of the Tape Dump Utility allows you to define multiple blocks of memory, each block written as a separate file on the tape.
Menu Items The first member of the Tape Dump File Map Entry structure is File Number (fileno). The normal range of values for fileno is from 1 to MAXFILES. The value $FFFFFFFF in fileno flags an invalid and unused File Map Entry.
System Menu 1) Continue System Start Up 2) Select Alternate Boot Device 3) Go to System Debugger 4) Initiate Service Call 5) Display System Test Errors 6) Dump Memory to Tape Enter Menu #: B Using the Service Call Function Operation The service call function displays a series of interactive prompts. Any question requiring a Y or N answer defaults to N if only Return is entered.
Using the Service Call Function When an option is selected, the system asks: B Do you want to change the baud rate from 1200 (Y/N)? If you answer Y (the default is N), the system prompts: Baud rate [300, 1200, 2400, 4800, 9600] 1200? Enter a baud rate from the and press Return. If you do not enter a value, the baud rate remains as previously set.
System Menu Enter the number, including area code if required. Do not use any separators except for a comma (,) or equal sign (=) if required to search for a dial tone (depending on which modem protocol was selected), such as when dialing out of a location having an internal switchboard. Additionally, preface the number with one of the dialing selections.
Using the Service Call Function Either the console or the remote console may terminate the concurrent mode at any time by typing CTRL-a. The phone line is hung up by the PPC ROM code and a message is displayed indicating the end of the concurrent mode. B The most likely command sequence at this point is a message command to indicate connection to the remote system, followed by a request for concurrent mode operation.
System Menu To exit the conversation mode as well as to terminate the concurrent mode and hang up the modem, type Ctrl-a. B The system then redisplays the selection menu for further operator action. You may terminate the concurrent connection by selecting menu item 4 (Initiate Service Call) while a call is underway.
Using the Service Call Function When manual modem control is attempted, the user terminal is in effect connected directly to the modem for control purposes. This is called transparent mode. When in transparent mode, you must take responsibility for modem control, and for informing the system of when connection has taken place.
System Menu Terminal Connection B Enter Terminal mode by selecting Terminal as the modem type. Operation with the terminal mode is similar to system mode, except that after the Baud rate prompt, the system automatically enters concurrent mode. Additionally, exiting concurrent mode does not give prompts and messages referring to the hang up sequence. All other system operation is the same as other modes of connection.
CPPCBug Messages C Introduction This section lists the PPCBug messages. Refer to the PPC1Bug Diagnostics UserÕs Manual for error messages displayed while running various diagnostics commands. Error Messages Table C-1.
Other Messages Table C-1. Debugger Error Messages (Continued) Debugger Error Message C *** Invalid LUN *** *** Invalid Range *** *** Missing Argument *** NON-EXISTENT MNEMONIC NON-EXISTENT OPERAND part of S-record data RAM FAIL AT $nnnnnnnn STRING POOL FULL, LAST LINE DISCARDED The following record(s) did not verify S . . . . . . . . ZZ . . . . . . . .
PPCBug Messages Table C-2.
Other Messages Table C-2. Other Messages (Continued) Message C -not foundOK to proceed (y/n)? Press “RETURN” to continue WARM Start C-4 Meaning String not found in BS command Interlock prompt before writing macros in the MAW command or before conÞguring port in PF command.
DS-Record Format D Introduction The S-record format for output modules was devised for the purpose of encoding programs or data files in a printable format for transfer between computer systems. The transfer process can thus be visually monitored and the S-records can be edited more easily. S-Record Content When viewed by the user, S-records are essentially character strings made of five fields: the record type, record length, memory address, code/data, and checksum.
S-Record Types Table D-1. S-Record Fields Field Checksum D Printable Contents Characters 2 The least signiÞcant byte of the one's complement of the sum of the values represented by the pairs of characters making up the record length, address, and the code/data Þelds Each record may be terminated with a carriage return, line feed, or null. Additionally, an s-record may have an initial field to accommodate other data such as line numbers generated by some time-sharing system.
S-Record Format An S-record-format module may contain S-records of the following types: S0 The header record for each block of S-records. The code/data Þeld may contain any descriptive information identifying the following block of S-records. Under the operating system, a resident linker command can be used to designate module name, version number, revision number, and description information which will make up the header record. The address Þeld is normally zeroes.
Creating S-Records Only one termination record is used for each block of S-records. S7 and S8 records are usually used only when control is to be passed to a 3- or 4-byte address. Normally, only one header record is used, although it is possible for multiple header records to occur. D Creating S-Records S-record-format programs may be created with the DU command. You may also use dump utilities, debuggers, the operating system resident linkage editor, or several cross-assemblers or cross-linkers.
S-Record Format The S0 record is explained as follows: S0 S-record type S0, indicating that it is a header record for this block of S-records 0A Hexadecimal 0A (decimal 10), indicating that 10 character pairs (or ASCII bytes) follow 0000 Four-character 2-byte address Þeld; hexadecimal address 0000 (the address Þeld is not used by the debugger, the debugger ignores this record) 6765745F727463 Module name in ASCII, get_rtc 0D The checksum of this header record The first S2 record is explained as fo
Example Address Opcode Instruction 00040018 65040000 ORIS R4,R8,$0 0004001C 65040024 ORIS R4,R8,$24 00040020 00000000 WORD $00000000 00040024 00000000 WORD $00000000 D 42 The checksum of this S2 record. The second S2 record is explained as follows: S2 S-record type S2, indicating that it is a code/data record to be loaded/veriÞed at a 3-byte address. 0C Hexadecimal 0C (decimal 12), indicating that 12 character pairs, representing 12 bytes of binary data, follow.
S-Record Format Each printable character in an S-record is encoded in a hexadecimal representation of the binary bits which are actually transmitted.
EDisk and Tape Controllers E Disk and Tape Support PPCBug supports the disk and tape controller devices listed in Table E-1. The controller addresses listed are the base addresses for each controller. The controller can be addressed by the CLUN during the PBOOT or IOP commands, or during system calls .DSKRD or .DSKWR. Table E-1.
Floppy Drive Configuration Parameters Floppy Drive Configuration Parameters The following table lists the parameters used for configuring floppy disk drives with the IOT command and the .DSKCFIG system call. Table E-2. Floppy Drive Configuration Parameters ConÞguration Parameter E Sector Size 0- 128 1- 256 2- 512 3-1024 4-2048 5-4096 = Block Size: 0- 128 1- 256 2- 512 3-1024 4-2048 5-4096 = Sectors/Track Number of Heads = Number of Cylinders = Precomp.
Disk and Tape Controllers Note 1.All numerical parameters are in hexadecimal unless otherwise noted. 2. PS2 is the default format for PPCBug. 3. The SHD format is supported effective with PPC1Bug version 1.2.
FDisk Status Codes F Introduction The status word returned by the disk system call routine flags an error condition if it is nonzero. The most significant byte of the status word reflects controller independent errors, and they are generated by the disk trap routines. The least significant byte reflects controller dependent errors, and they are generated by the controller.
Introduction ATA (Hard Disks/CD-ROM Drives) 15 8 7 ATA Command 0 Error Register Contents The ATA command is the byte that identifies the command creating the error condition reported in the error register. For the definition of the error register contents, refer to the AT Attachment Interface with Extensions (ATA-2) specification (X3T10-948D).
Disk Status Codes Controller-Independent Status Codes The definitions for the controller-independent errors are defined in Table F-1, shown below. Table F-1.
SCSI Firmware Status Codes If the SCSI Bus Status byte returned by the firmware is non-zero, this byte is returned as the Controller-Dependent code, and the SIOP Status byte is thrown away. If the SCSI Bus Status is zero, the SIOP Status byte is returned. Therefore, there is dual use of the Controller-Dependent error code byte for error code bytes $02, $04, $08, $10, $14, and $18.
Disk Status Codes Table F-2.
ATA/ATAPI Firmware Status Codes ATA/ATAPI Firmware Status Codes Note F The marketing terms IDE and EIDE are often used when describing the ATA and ATAPI interface and protocol. The underlying technologies behind these are defined by the ATA and ATAPI standards proposed by the Accredited Standards Committee (ASC) and the Small Form Factor Committee (SFFC) respectively.
Disk Status Codes Table F-3.
GNetwork Controller Devices G PPCBug supports the DEC21040 and DEC21140 devices for Ethernet network control. The default address is $80804000. Use CLUN $00 and DLUN $00 with the debugger commands NBH, NBO, NIOC, NIOP, NIOT, NPING, and NAB, and with the debugger system calls .NETRD, .NETWR, .NETFOPN, .NETFRD, .NETCFIG, and .NETCTRL.
HNetwork Communication Status Codes H There are two types of network communication status codes, controller independent and controller (DEC21040 orDEC21140) dependent. The controller independent error codes are independent of the specified network interface. These errors are normally some type of operator error. The controller dependent error codes relate directly to the specified network interface. These errors occur at the driver level out to and including the network.
Network Communication Status Codes Table H-1. Controller-Independent Status Codes (Continued) Code $07 $08 $09 $0A $81 $82 $83 $84 $85 $86 $87 Description NVRAM write failure Illegal IPL load address User abort, break key depressed Time-out expired TFTP, File not found TFTP, Access violation TFTP, Disk full or allocation exceeded TFTP, Illegal TFTP operation TFTP, Unknown transfer ID TFTP, File already exists TFTP, No such user Table H-2.
Network Communication Status Codes Table H-2.
Glossary Abbreviations, Acronyms, and Terms to Know This glossary defines some of the abbreviations, acronyms, and key terms used in this document. 10Base-5 An Ethernet implementation in which the physical medium is a doubly shielded, 50-ohm coaxial cable capable of carrying data at 10 Mbps for a length of 500 meters (also referred to as thicknet). Also known as thick Ethernet.
Glossary G L O S S A R Y ASIC Application-Specific Integrated Circuit AUI Attachment Unit Interface BBRAM Battery Backed-up Random Access Memory bi-endian Having big-endian and little-endian byte ordering capability. big-endian A byte-ordering method in memory where the address n of a word corresponds to the most significant byte. In an addressed memory word, the bytes are ordered (left to right) 0, 1, 2, 3, with 0 being the most significant byte. BIOS Basic Input/Output System.
Glossary instructions that the CPU is most likely to use over and over again and avoids accessing the slower hard or floppy disk drive. CAS Column Address Strobe. The clock signal used in dynamic RAMs to control the input of column addresses. CD Compact Disc. A hard, round, flat portable storage unit that stores information digitally. CD-ROM Compact Disk Read-Only Memory CFM Cubic Feet per Minute CHRP See Common Hardware Reference Platform (CHRP).
Glossary G L O S S A R Y CPU Central Processing Unit. The master computer unit in a system. DCE Data Circuit-terminating Equipment. DLL Dynamic Link Library. A set of functions that are linked to the referencing program at the time it is loaded into memory. DMA Direct Memory Access. A method by which a device may read or write to memory directly without processor intervention. DMA is typically used by block I/O devices.
Glossary EPROM Erasable Programmable Read-Only Memory. A memory storage device that can be written once (per erasure cycle) and read many times. ESCC Enhanced Serial Communication Controller ESD Electro-Static Discharge/Damage Ethernet A local area network standard that uses radio frequency signals carried by coaxial cables. Falcon The DRAM controller chip developed by Motorola for the MVME2600 and MVME3600 series of boards.
Glossary G L O S S A R Y hardware A computing system is normally spoken of as having two major components: hardware and software. Hardware is the term used to describe any of the physical embodiments of a computer system, with emphasis on the electronic circuits (the computer) and electromechanical devices (peripherals) that make up the system. HCT Hardware Conformance Test. A test used to ensure that both hardware and software conform to the Windows NT interface.
Glossary ISDN Integrated Services Digital Network. A standard for digitally transmitting video, audio, and electronic data over public phone networks. LAN Local Area Network LED Light-Emitting Diode LFM Linear Feet per Minute little-endian A byte-ordering method in memory where the address n of a word corresponds to the least significant byte. In an addressed memory word, the bytes are ordered (left to right) 3, 2, 1, 0, with 3 being the most significant byte.
Glossary G L O S S A R Y MTBF Mean Time Between Failures. A statistical term relating to reliability as expressed in power on hours (poh). It was originally developed for the military and can be calculated several different ways, yielding substantially different results. The specification is based on a large number of samplings in one place, running continuously, and the rate at which failure occurs.
Glossary PCI (local bus) Peripheral Component Interconnect (local bus) (Intel). A high-performance, 32-bit internal interconnect bus used for data transfer to peripheral controller components, such as those for audio, video, and graphics. PCMCIA (bus) Personal Computer Memory Card International Association (bus). A standard external interconnect bus which allows peripherals adhering to the standard to be plugged in and used without further system modification.
Glossary unified (instruction and data) cache. It provides a 64-bit data bus and a separate 32-bit address bus. PowerPC 601 is used by Motorola, Inc. under license from IBM. PowerPC 603™ The second implementation of the PowerPC family of microprocessors. This CPU incorporates a memory management unit with a 64-entry buffer and an 8KB (instruction and data) cache. It provides a selectable 32-bit or 64-bit data bus and a separate 32-bit address bus. PowerPC 603 is used by Motorola, Inc.
Glossary Raven The PowerPC-to-PCI local bus bridge chip developed by Motorola for the PowerPlus architecture (8+ boards). It provides the necessary interface between the PowerPC 60x, or 750x bus and the PCI bus, and acts as interrupt controller. Reduced-Instruction-Set Computer (RISC) A computer in which the processorÕs instruction set is limited to constant-length instructions that can usually be executed in a single clock cycle.
Glossary G L O S S A R Y SMP Symmetric MultiProcessing. A computer architecture in which tasks are distributed among two or more local processors. SMT Surface Mount Technology. A method of mounting devices (such as integrated circuits, resistors, capacitors, and others) on a printed circuit board, characterized by not requiring mounting holes. Rather, the devices are soldered to pads on the printed circuit board. Surface-mount devices are typically smaller than the equivalent through-hole devices.
Glossary UV UltraViolet UVGA Ultra Video Graphics Array. An improved VGA monitor standard that provides at least 256 simultaneous colors and a screen resolution of 1024 x 768 pixels. Vertical Blanking Interval (VBI) The time it takes the beam to fly back to the top of the screen in order to retrace the opposite field (odd or even). VBI is in the order of 20 TV lines. Teletext information is transmitted over 4 of these lines (lines 14-17).
Glossary Windows NT™ The trademark representing Windows New Technology, a computer operating system developed by the Microsoft Corporation. XGA EXtended Graphics Array. An improved IBM VGA monitor standard that provides at least 256 simultaneous colors and a screen resolution of 1024 x 768 pixels. Y Signal Luminance. This determines the brightness of each spot (pixel) on a CRT screen either color or B/W systems, but not the color.
Index Symbols .BINDEC routine 5-63 .BRD_ID routine 5-69, B-3 .CHANGEV routine 5-64 .CHK_SUM routine 5-68 .CHKBRK routine 5-13 .DELAY routine 5-55 .DIAGFCN routine 5-79 .DIVU32 routine 5-67 .DSKCFIG routine 5-17 .DSKCTRL routine 5-30 .DSKFMT routine 5-27 .DSKRD routine 5-14 .DSKWR routine 5-14 .ENVIRON routine 5-72 .ERASLN routine 5-51 .FORKMPU function 5-93 .FORKMPUR function 5-94 .IDLEMPU function 5-99 .INCHR routine 5-7 .INLN routine 5-9 .INSTAT routine 5-8 .IOCONFIG routine 5-108 .
Index Address Resolution Protocol (ARP) 1-30 address sizes 1-33 alternate boot device B-1 arguments 2-2 ADDR 2-4 EXP 2-2 PORT 2-6 ARP 1-30 AS command 3-4, 4-11 assembler 3-130, 4-1, 4-2, 4-11 assembler error messages 4-14 assembly language 1-2, 4-1 assert SYSFAIL* 1-22 assign port 3-178, 3-181 serial port as console 3-220 assign value to variable 5-64 ATA (hard disks/CD-ROM drives) F-2 ATA/ATAPI controller-dependent errors F-7 ATA/ATAPI firmware status codes F-6 ATAPI (CD-ROM drives) F-2 attach printer to
checksum CS command 3-33 generate 5-68 clock real-time 5-58 clock speed calculation 1-22 clock, real-time 5-57 CLUN 1-24, 3-87, 3-90, 3-101, 3-146, 5-15, 5-18, 5-19, 5-27, 5-30 CM command 3-25 CNFG command 3-29 code execution 3-76, 3-79 code execution.
Index I N D E X default output port 5-1 define macros 3-114 delay timer 5-55 delete I/O port 5-109 delete macros 3-114 detach port 3-168, 3-178 symbol table 3-212, 5-113 device descriptor packet 5-19 device descriptor table 1-24, 3-90, 3-100 Device Logical Unit Number (DLUN) 1-24, 3-87, 3-90, 3-101, 3-146, 5-15, 5-18, 5-19, 5-27, 5-30 device parameters default 1-27 device probe 1-24 diagnostic directory 1-12, 3-207 diagnostic function 5-79 diagnostics return from System Menu B-2 Direct Memory Access (DMA)
erase line 5-51 error codes disk I/O 1-27 disk system calls F-1 network I/O 1-31 network system calls H-1 SCSI F-1 error correction code (ECC) 3-103 error messages C-1 assembler 4-14 errors system test B-2 errors, controller-dependent ATA/ATAPI F-7 Ethernet controller 1-28, G-1 Ethernet driver 1-28 Ethernet network booting 1-18, 1-28 Ethernet packets 1-28 exception handler 5-68 exception handler semaphore 3-206 exception vectors 2-10 execute debugger 3-205 execute instruction 3-216 execute program 3-76 EXP
Index H half-word 1-33 hardcopy mode 2-7, 3-130, 5-51, 5-104 HE command 3-82 help 3-82 host read/write 5-32 I I/O I N D E X disk 1-23 network 1-28 I/O control disk 3-87 network 3-146 I/O control structure 5-103 I/O error codes disk 1-27 network 1-31 I/O function 5-60 I/O inquiry 1-24, 3-90 I/O physical network 3-152 I/O port change 5-106 I/O, disk debugger commands 1-24 system calls 1-26 I/O, redirect 5-60 idle processor 5-93 IDLE command 3-86 Idle Master MPU 3-86 Idle MPU Register Display/Modify/Set 3-
LO command 2-8, 3-108 load control program 3-140 load FLASH memory 3-184 load macros 3-120 load operating system 3-140 load S-records 3-108, 3-109 logical blocks 1-23 loop read 3-199 M MA command 3-114 macros 3-119 define 3-114 delete 3-114 edit 3-117 load 3-120 save 3-122 MAE command 3-114, 3-117 main processor registers 4-5 MAL command 3-119 manual modem connection B-9 MAR command 3-120 MAW command 3-122 MD command 2-13, 3-124, 4-13 MDS command 3-124 memory 3-129 dump to tape B-2 write 3-136 Memory Displ
Index I N D E X NBO command 3-138, 3-142 negate SYSFAIL* 1-22 network auto boot 1-18, 3-138 network boot control module 1-30 Network Boot Operating System 3-142 Network Boot Operating System and Halt 3-140 network communication status codes H-1 network configuration 3-156 network control routine 5-44 network controllers G-1 network file open 5-40 network file retrieve 5-42 network I/O 1-28, 3-146 network I/O error codes 1-31 network I/O physical 3-152 network I/O teach 3-156 network parameters configure 5
pointer/count format 5-2 pointer/pointer format 5-2 port assign 3-178, 3-181 attach printer 3-168 change 5-106 configure 3-178, 3-180, 5-108 connecting 3-222 delete 5-109 detach 3-178, 3-182 detach printer 3-168 inquire 5-100 number 5-106, 5-108, 5-109 PORT argument 2-6 port control structure 5-100, 5-107, 5-109 port status input 5-8 power save mode 3-187 print 5-50 print line feed 5-50 printer attach to a port 3-168 detach from port 3-168 probe a network 3-163 processor, idling 3-86 program FLASH memory 3-
Index RTC 5-58, 5-59 RTC chip start 3-208 stop 3-187 RTC power save mode 3-187 RTC time initialization 5-56 RUN command 3-205 S I N D E X save macros 3-122 SC instruction 2-9, 4-10, 5-1 scientific notation 2-15 SCSI bus status codes F-4 SCSI command F-1 SCSI commands Inquiry 1-24 Mode Sense 1-24 SCSI error codes F-1 SCSI firmware status codes F-4 SCSI pointers retrieve 5-91 SD command 1-12, 3-207 search symbol table 3-214 sectors 1-23 select alternate boot device B-1 self tests 1-5 selftest name list 5-
string output 5-48, 5-49 string formats 5-2 string with data output 5-52 strings compare 5-65 switch directories 3-207 SYM command 3-211 symbol base address 5-111 symbol table attach 5-111 attach to the debugger 3-211, 5-111 detach 3-212, 5-113 display 3-214 search 3-214 SYMS command 3-214 SYSCALL directive 4-2, 4-10 SYSFAIL* 1-22 system call 4-2 system call directive 4-10 System Call handler 2-9, 5-1 System Call instruction 2-9, 5-1 System Call routines 5-2 system calls 2-8, 5-1 disk I/O 1-26 disk, error c
Index W warm reset 3-197 WL command 3-235 word 1-33 WORD directive 4-2, 4-9 write blocks (IOP command) 1-25 data 3-136 data loop 3-235 disk 3-93, 5-14 environment parameters 5-72 memory 3-136 tape 3-93 to host 5-32 write data to memory 3-135 write loop 3-235 I N D E X IN-12