Home
EPPCBug Firmware Package User's Manual - ps
Contents
1. 20 superset information may be used in the 40 manufacturer information optional 80 unused storage locations standard FPM fast page mode DRAM extended data out pipelined nibble DRAM synchronous DRAM T n redundant addressing number of row addresses mask TIL 5V tolerant LVITL not 5V tolerant HSTL 1 5 SSTL 3 3 SSTL 2 5 none parity ECC self refresh flag refresh rate mask PowerPC EPPCBug Firmware Package User s Manual Vital Product Data define DIMM_RRT_NRML 0x00 normal 15 625us define DIMM RRI R3 9 0x01 reduced 25x 3 9us define DIM RRI R7 8 0x02 reduced 5x 7 8us define DIM _RRT_F 31 3 0x03 extended 2x 31 3us define DIM RRT_E 62_5 0x04 extended 4x 62 5us define DIM RRI_F_125 0x05 extended 8x 125us SROM_CRC C srm crc generate CRC data for the passed buffer description This function s purpose is to generate the CRC for the passed buffer X Call argument 1 buffer pointer argument 2 number of elements return CRC data x unsigned int srm crc elements p elements n register unsigned char elements_p buffer pointer register unsigned int elements_n number of elements register unsigned int crc register unsigned int crc
2. JO G O GO FORO O O R5 RO 0 CRF 6 0 R4 0 12 26 0003001C R5 0 R3 00000000 R4 R4 EFFFFFFF R3 R3 1 00030004 20 0 Execute up to the BL instruction PowerPC EPPCBug Firmware Package User s Manual 4 43 Command Descriptions EPPC Bug gt RM IP lt CR gt IP 00020020 20000 lt CR gt EPPC Bug gt EPPC Bug gt GT 20010 lt CR gt Effective address 00020010 Effective address 00020000 At Breakpoint IP 00020010 MSR 00003030 CR 00000020 FPSCR 00000000 RO 00000000 R1 00020000 R2 FFF0178C R3 00041000 R4 000000FE R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R1 00000000 R15 00000000 R16 00000000 R17 00000000 R1 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPRL 00000000 SPR8 00020014 SPR9 00000000 00020010 4800FFF1 BL 00030000 EPPC Bug gt Use the GN command to trace through the subroutine call and display the results EPPC Bug gt GN lt CR gt Effective address 00020014 Effective address 00020010 At Breakpoint IP 00020014 MSR 00003030 CR 00000020 FPSCR 00000000 R
3. EPPC Bug gt Initialize IP and R3 R4 EPPC Bug gt RM IP lt CR gt IP 0000E000 30000 lt CR gt EPPC Bug gt EPPC Bug gt RM R3 lt CR gt R3 00000000 41000 lt cR gt R4 00000000 100 lt CR gt EPPC Bug gt Display target registers and trace to temporary breakpoint EPPC Bug gt RD lt CR gt IP 00030000 MSR 00003030 CR 00000020 FPSCR 00000000 RO 00000000 RI 00020000 R2 FFF0178C R3 00041000 R4 00000100 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPRI 00000000 SPR8 00020014 SPR9 00000000 00030000 3CA00000 ADDIS R5 RO 0 EPPC Bug gt EPPC Bug gt TT 30008 lt CR gt IP 00030004 MSR 00003030 CR 00000000 FPSCR 00000000 RO 00000000 RI 00020000 R2 00000000 R3 00041000 R4 00000100 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28
4. Code Description 07 NVRAM write failure 08 Illegal IPL load address 09 User abort break key depressed 0A Time out expired 81 TFTP File not found 82 TFTP Access violation 83 TFTP Disk full or allocation exceeded 84 TFTP Illegal TFTP operation 85 TFTP Unknown transfer ID 86 TFTP File already exists 87 TFTP No such user Table C 2 MPC8xx Controller Dependent Status Codes Code Description 01 256KB buffer not 16 byte aligned 02 Shared memory buffer limit exceeded software 03 Invalid data length MIN lt LNGTH lt MAX 10 Transmitter unknown error debug 11 Transmitter late collision error 12 Transmitter retransmission limit error 13 Transmitter underrun error 14 Transmitter carrier sense lost error 15 Transmitter timeout error 18 Receiver frame length violation error 19 Receiver nonoctet aligned frame error 1A Receiver short frame error 1B receiver CRC error 1C Receiver overrun error 1D Receiver collision error PowerPC EPPCBug Firmware Package User s Manual History Buffer Overview The history buffer stores all the input and output of the firmware This I O is from the perspective of the user interface The history buffer is split into two buffers which are stored in read write memory One buffer is for the user interface input and the other for the user interface output The input buffer is further divided into two bu
5. Configuration Floppy Types and Formats Parameter PCXTs PCXT9 PCXT9_3 PCAT PS2 SHD Sector Size 2 2 2 2 2 2 0 128 1 256 2 512 3 1024 4 2048 5 4096 Block Size 1 1 1 1 1 1 0 128 1 256 2 512 3 1024 4 2048 5 4096 Sectors Track 8 9 9 F 12 24 Number of Heads 2 2 2 2 2 2 Number of 28 28 50 50 50 50 Cylinders Precomp Cylinder 28 28 50 50 50 50 Reduced Write 28 28 50 50 50 50 Current Cylinder Step Rate Code 0 0 0 0 0 0 Single Double D D D D D D DATA Density Single Double D D D D D D TRACK Density PowerPC EPPCBug Firmware Package User s Manual B 3 Floppy Drive Configuration Parameters Table B 2 Floppy Drive Parameters Configuration Floppy Types and Formats Parameter PCXTS8 PCXT9 PCXT9_3 PCAT PS2 SHD Single Equal in all E E E E E E Track Zero Density Slow Fast Data S S S F F F Rate Other Characteristics Number of 0280 02D0 05A0 0960 0B40 1680 Physical Sectors Number of Logical 0500 05A0 0B40 12C0 1680 2D00 Blocks in hundreds Number of Bytes 327680 368460 737280 1228800 1474560 2949120 Decimal Media Size Density 5 25 DD 5 25 DD 3 5 DD 5 25 HD 3 5 HD 3 5 ED B 4 PowerPC EPPCBug Firmware Package User s Manual Network Communication C Status Codes EPPCBug supports the SCC1 channel for use as the network controller on the MBX board Future releases of EPPCBug will
6. Offset Description 0x0 CLUN of device 0x4 DLUN of device 0x8 Data Transfer Address 0xC The number of bytes from the data transfer address to transfer A length of zero specifies to transfer the entire file on a read On a write the length must be set to the number of bytes to transfer 0x10 Byte offset into the file 0x14 The name of the file to load store On a write the file must exist on the host system and also be writable write permission The filename string must be null terminated The maximum length of the string is 64 bytes inclusive of the null terminator R4 points to the output parameter block Offset 0x0 Description System call return status 0x4 Device specific error code If the system call failed due to an error at the device interface level additional device specific error status will be returned in this location 0x8 Number of bytes actually received PowerPC EPPCBug Firmware Package User s Manual 7 31 System Call Routines Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing 7 32 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls NIO_CNFG Code 0402 Description NIO_CNFG allows you to change and or query the configuration parameters of the specified network interface The NIO_CNFG system call effectively performs a NIOT command under program control
7. Note that winding indexing into a file is possible on a read get but there is a drawback in this feature due to the nature of TFTP the entire file is transferred across the network Only the desired section of the file is written to the user memory Refer to the DARPA Internet Request for Comments RFC 783 for the description of the TFTP protocol Prior to the TFTP session an ARP request is transmitted for the hardware Ethernet address of the server At time out conditions the file transfer process can be aborted by pressing the BREAK key on the console keyboard or by pressing the abort switch on the front panel The clock must be running in order for this command to work properly Use TIME L to see if the clock is running Use the SET command to start and initialize the clock The field prompts are shown below Controller LUN 00 The Logical Unit Number LUN of the controller to access Device LUN 00 The LUN of the device to access Get Put G G Read get from host P Write put to host PowerPC EPPCBug Firmware Package User s Manual 4 103 Command Descriptions File Name The name of the file to load store On a write the file must exist on the host system and also be writable write permission The filename string must be null terminated The maximum length of the string is 64 bytes inclusive of the null terminator Memory Address 00004000 Address of buffer in memory On a read data is read to
8. Offset Description 0x0 CLUN of device 0 selects current output device 0x4 DLUN of device 0 selects current output device 0x8 Current configuration pointer 0xC New configuration pointer Note EPPCBug 1 1 supports only CLUN and DLUN of 0 Configuration pointers point to a structure with the following entries Offset Description 0x0 Baud rate 0x4 Control bits 0x8 Reserved must be 0 Control bits are as follows Bit If Set Selects 0 Odd parity 1 Even parity 8 bit character 7 bit character 7 12 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls Bit If Set Selects 4 6 bit character 5 5 bit character 6 2 stop bits 7 1 stop bit Note Bit 0 and bit 1 cannot be set at the same time R4 points to the output parameter block Description 0x0 System call return status Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing If the current configuration pointer entry in the input parameter block is nonzero then the current port settings prior to any change are saved at the area specified by the pointer If the new configuration pointer entry in the input parameter block is nonzero then the port has been modified to operate at the settings described by the area pointed to by the pointer PowerPC EPPCBug Firmware Package User s Manual 7
9. 00020004 9ABC 8765 lt CR gt 00020002 4321 lt CR gt 00020000 1234 ABCD lt CR gt EPPC Bug gt Example 2 Word access to location 20004 with alternate location access option enabled modify and reopen location and exit memory modify EPPC Bug gt MM 10004 WA lt CR gt 00020004 CD432187 lt CR gt 0002000 00068010 68010 10 lt CR gt 0002000 00068020 lt CR gt 0002000 00068020 lt CR gt EPPC Bug gt The DI option enables the one line assembler disassembler All other options are invalid if DI is selected The contents of the specified memory location are disassembled and displayed and you are prompted with a question mark for input At this point you have three choices PowerPC EPPCBug Firmware Package User s Manual MM Memory Modify 1 Press RETURN This closes the present location and continues with disassembly of next instruction 2 Enter a new source instruction followed by RETURN This invokes the assembler which assembles the instruction and generates a listing file of one instruction 3 Enter RETURN This closes the present location and exits the MM command If a new source line is entered the present line is erased and replaced by the new source line entered In the hardcopy mode a line feed is done instead of erasing the line If an error is found during assembly an error message such as non EXISTENT OPERAND OF NON EXISTENT MNEMONIC appears The loca
10. ARP Request ARP Reply Unsupported RARP Type RARP Request RARP Reply A Unsupported TFTP Type TFTP Read Request 4 108 PowerPC EPPCBug Firmware Package User s Manual NIOT I O Teach for Configuring Network Controller TFTP Write Request TFTP Acknowledgment TFTP Data TFTP Error j Unsupported ICMP Type ICMP Echo Request ICMP Echo Reply 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 IP addresses of 0 null boot file 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 PowerPC EPPCBug Firmware Package User s Manual 4 109 Command Descriptions NPING Network Ping Command Input Arguments Description NPING CLUN DLUN Source IP Destination IP N Packets 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 It defaults to infinity The NPING command probes the network Th
11. 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 To specify a null filename the string NULL must be used this resets the filename buffer to a null character string PowerPC EPPCBug Firmware Package User s Manual 4 107 Command Descriptions BOOTP RARP Request Retry 00 TFTP ARP Request Retry 00 The number of retries that should be attempted prior to giving up A retry value of zero specifies always to retry not give up 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 nonzero value enables tracing Tracing would only be used in a debug environment and normally should be disabled Care should be taken when enabling this feature you need to ensure that adequate memory exists The following characters are defined for tracing Unknown amp Unsupported Ethernet Type Unsupported IP Type Unsupported UDP Type Unsupported BOOTP Type BOOTP Request BOOTP Reply Unsupported ARP Type
12. Input data ready flag nonzero true 0x8 Output channel ready nonzero true 0xC Break received flag nonzero true 0x10 Modem line status Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing Input data ready flag indicates whether or not at least one character is available for reading A nonzero flag indicates data is available Output channel empty indicates whether or not the transmitter section of the device can accept at least one more character 7 10 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls Break received flag indicates whether or not a break was detected on the serial line Modem control status indicates the state of the modem control inputs at this serial port Bit 31 is true if DCD is asserted to the serial interface chip Bit 30 is true if CTS is asserted to the serial interface chip Note that not all serial ports have a predefined DCD or CTS pin In those cases where EPPCBug cannot determine the actual state of the modem control bit a false 0 value for that line is returned to the caller PowerPC EPPCBug Firmware Package User s Manual 7 11 System Call Routines ClO_CNFG Code 0203 Description CIO_CNFG provides a means of reading the current serial port configuration and changing it Entry Conditions R3 points to the input parameter block
13. 01 ASCII 1 W3269F01B 03 Variable Serial Number 2718944 ASCII 1 04 10 Product Configuration Options Data Binary The data contained within this packet shall contain data which further describes board configuration header population I O routing etc Its exact contents is dependent upon the product configuration type A table found later in this document further describes this packet 05 04 MPU Internal Clock Frequency in Integer 3 Hertz 4 byte 06 04 MPU External Clock Frequency in Integer 3 Hertz This is also considered the local 4 byte processor bus frequency 07 04 Reference Clock Frequency in Hertz Integer 3 4 byte 08 06 Ethernet Address e g 08003E20002 Binary 2 4 09 Variable MPU Type 801 821 823 860 860DC ASCII 1 860DE 860DH 860EN 860MH etc 0A 4 EEPROM CRC Integer 3 This packet is optional This packet 4 byte would be utilized in environments where CRC protection is required When computing the CRC this field i e 4 bytes is set to zero PowerPC EPPCBug Firmware Package User s Manual A 3 A VPD Data Definitions Table A 1 VPD Packet Types i deco Dat Z Identifier Size Description an e Type p 0B 9 FLASH Memory Configuration Binary A table found later in this document further describes this packet 0D BF Reserved C0 FE User Defined An example of an user defined could be the type of LCD panel connected in an
14. CSAR PCI Configuration Space READ Access CSAR PCI Configuration Space READ Access Command Input CSAR Bus NO Device NO Function NO OFFSET B H W Options B Byte H Half word W Word default Description The CSAR command reads the PCI configuration space of the device specified by the BUS NUMBER DEVICE NUMBER and FUNCTION NUMBER The register to be read is specified by its OFFSET into the PCI configuration space Example Reads 32 bit PCI configuration register offset 0 from device function 0 on PCI bus 0 EPPC Bug gt esar 0 13 0 0 w lt cr gt Read Data 056510AD EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 27 Command Descriptions CSAW PCI Configuration Space WRITE Access Command Input Options Description Example CSAW B NO D NO F NO OFFSET WRITE DATA GBIHIW B Byte H Half word W Word default The CSAW command writes to the PCI configuration space of the device specified by the BUS NUMBER DEVICE NUMBER and FUNCTION NUMBER The register to be written to is specified by its OFFSET into the PCI configuration space The value to be written is specified by DATA Note CSAW does not do a read verify of the data written to the device If the device does not accept the written data no notice is given to the user Writes a zero byte to register offset 0x3c on device 0x13 function 0 on PCI bus 0 EPPC Bug gt csaw 0 13 0 3c 0 b lt cr
15. Sunsoft 1 4 PowerPC EPPCBug Firmware Package User s Manual Introduction to PowerPC EPPCBug Firmware Product Structure The overall product structure of the PowerPC EPPCBug Firmware Package is the classic Operating System model The devices and hardware entities are abstracted via device and hardware drivers The user interfaces remote command and programmatic permit you to access the devices and or hardware through a set of device drivers The kernel monitor layer oversees all activities of the product The hardware and firmware initialization attachment is responsible for initialization of the hardware to enable a system boot System boot is the primary purpose of the firmware System boot can be viewed from loading a program for debugging purposes to loading an operating system which completely acquires control of the hardware PowerPC EPPCBug Firmware Package User s Manual 2 1 Product Structure User Interfaces Programmatic Interface Powerup A Reset Command Interface e Remote Interface INTERFACE LAYER A KERNEL MONITOR LAYER DEVICE DRIVERS LAYER H W amp F W INITIALIZATION HARDWARE LAYER Figure 2 1 Overall Product Structure 2 2 PowerPC EPPCBug Firmware Package User s Manual Introduction to PowerPC EPPCBug Firmware Firmware Debugger Overview The firmware for t
16. The actual chip select used is dependent upon the position of the Boot ROM jumper J 4 Chip select 0 is always utilized by the MPC821 860 as the source to the reset vector EPPCBug can be executed from either the onboard FLASH or the socketed FLASH the Boot ROM EPPCBug configures the reset FLASH device at the lower address and the nonreset FLASH device is configured at the higher address The DIMM is 64 data bits wide however it can only be accessed 32 bits at a time The 32 bit data width is a limitation of the MPC821 860 With this is mind the DIMM can be viewed as two contiguous banks of memory bank 0 and bank 1 The RASO signal is logically connected to the first chip selection and the RAS2 signal is logically connected to the second chip selection When installing DIMM modules ensure the jumpers J8 10 11 on the MBX Series board are configured to match the size of the DIMM being installed The MBX board supports only 4K refresh single bank DIMM modules Both the onboard DRAM and the DIMM DRAM share utilize the same UPM UPMA UPMB is used for PCI bus resource bursting when available PCMCIA decodes are enabled only if a PCMCIA card is present in the PCMCIA socket For more information on initialization values for various hardware components for the MBX Series boards please refer to the MBX Series Programmer s Guide PowerPC EPPCBug Firmware Package User s Manual Introduction to PowerPC EPPCBug Firmwa
17. The command function R Read blocks of data from the selected device into memory W __ Writes blocks of data from memory to the selected device F Formats the selected device If you start the IOP format procedure it must be allowed to complete EPPCBug gt prompt returns or else the disk drive may be totally disabled This format procedure may take as long as half an hour For disk devices either a track or the whole disk can be selected by a subsequent field This option only applies to SCSI Direct Access devices type 00 When the format operation is selected the Flag Byte prompt is displayed A flag byte of 08 specifies to ignore the PowerPC EPPCBug Firmware Package User s Manual 4 63 Command Descriptions grown defect list when formatting A flag byte of 00 specifies not to ignore the grown defect list when formatting Memory Address 00004000 The starting address for the 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 For disk track format operations the track that contains this block is formatted Number of Blocks 0002 The number of data blocks to be transferred on a read or write operation Tr
18. manufacturer s idenitfier manufacturer s device idenitfier device data width e g 8 bits 16 bits number of devices present number of columns colum width in bits write erase data width USHORT mid USHORT did UCHAR ddw UCHAR nod 7x UCHAR noc UCHAR cw ps UCHAR wedw pe VPD FMG DIMM H Module name Mis Description Serial Presenc Detect Definitions Module PowerPC EPPCBug Firmware Package User s Manual Vital Product Data A SCCS identification I Branch B Sequence S Date newest applied delta was created MM DD YY G Time newest applied delta was created HH MM SS U SCCS file name F Fully qualified SCCS file name SPS Copyright C COPYRIGHT MOTOROLA INC 1996 ALL RIGHTS RESERVED Notes X 1 All data was taken from an IM application note titled Serial Presence Detect Definitions History Date Who 10 24 96 Rob Baxter Initial release xs serial PD byte assignment address map 256 byte EEPROM typedef struct dim UCHAR n bytes 00 number of bytes written used UCHAR t_bytes 01 total number of bytes in serial PD device UCHAR fmt 02 fundamental memory type FPM EDO SDRAM UCHAR n_row 03 number of rows UCHAR n_col 04 number of colums UCHAR n_banks 05 number of banks
19. All the required parameters are passed in a command packet which has been built in memory Entry Conditions R3 points to the input parameter block Offset Description 0x0 CLUN of device 0x4 DLUN of device 0x8 Current configuration pointer 0xC Reserved must be 0 0x10 New configuration pointer 0x14 Reserved must be 0 0x18 Reserved must be 0 R4 points to the output parameter block Offset Description 0x0 System call return status 0x4 Device specific error code If the system call failed due to an error at the device interface level additional device specific error status will be returned in this location 0x8 Reserved Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing PowerPC EPPCBug Firmware Package User s Manual 7 33 System Call Routines If the current configuration pointer entry in the input parameter block is nonzero then the current port settings prior to any change are saved at the area specified by the pointer If the new configuration pointer entry in the input parameter block is nonzero then the port has been modified to operate at the settings described by the area pointed to by the pointer The configuration pointers point to a command packet with the following layout F E D C BA 9 8 7 6 5 4 3 2 10 00 i RS Most Significant Word Packet V
20. All valid PowerPC instructions are translated The assembler is an effective subset of an operating system assembler It has some limitations as compared with the operating system assembler for instance it does not allow line numbers pseudo ops instruction macros and labels However it is a powerful tool for creating modifying and debugging code written in PowerPC assembly PowerPC EPPCBug Firmware Package User s Manual 5 1 PowerPC Assembly Language PowerPC Assembly Language The symbolic language used to code source programs for processing by the assembler is PowerPC assembly language This language is a collection of mnemonics representing 1 Operations PowerPC machine instruction operation codes Directives pseudo ops 2 Operators 3 Special symbols Machine Instruction Operation Codes Machine instruction supported by the assembler disassembler are described in the PowerPC Microprocessor Family The Programming Environments Reference this manual for any question concerning operation codes Directives Normally assembly language can contain mnemonic directives which specify auxiliary actions to be performed by the assembler The EPPCBug assembler recognizes only two directives a Define a word constant WORD a System call SYSCALL These directives are used to define data within the program and to make calls on EPPCBug utilities Refer to The WORD Define Constant Directive on page 5 12 and The
21. BOOTP RFC 951 Protocol TFTP RFC 783 f User Datagram Protocol UDP RFC 768 Yy t Address Resolution Protocol Reverse Address Resolution Internet Protocol ARP RFC 826 Protocol IP RFC 791 S RARP RFC 903 Ethernet Driver MPC821 860 S Figure 6 1 Network Load Support Modules UDP IP Protocol Modules The Internet Protocol IP is designed for use in interconnected systems of packet switched computer communication networks The Internet protocol provides for transmitting of blocks of data called datagrams UDP from sources to destinations where sources and destinations are hosts identified by fixed length addresses 6 6 PowerPC EPPCBug Firmware Package User s Manual Program Loading The UDP IP protocols are necessary for the TFTP and BOOTP protocols TFTP and BOOTP require a UDP IP connection RARP ARP Protocol Modules The Reverse Address Resolution Protocol RARP consists of anode without identity that broadcasts a whoami packet onto the Ethernet and waits for an answer The RARP server fills an Ethernet reply packet with the target s Internet Address and returns the information packet to the node The Address Resolution Protocol ARP provides a method of converting protocol addresses IP addresses to local area network addresses such as Ethernet addresses The implementation of the RARP protocol module was necessary to support olde
22. Command 0x6C Move the cursor one position to the right forward a character Command 0x70 Put back the last deleted text to the character position following the current cursor position Command D 4 PowerPC EPPCBug Firmware Package User s Manual History Buffer Table D 1 History Input Buffer Recall Edit Key Hexadecimal Description Edit Sequence Code P Mode r 0x72 At the current cursor Command position replace the character This command enters the inert mode for one character duration and returns to the command mode s 0x73 At the current cursor Command position delete the character and enter the insert mode u 0x75 Undo the last change to the Command current line w 0x77 From the current cursor Command position move the cursor forward a word and position the cursor to the first character in this word x 0x78 Delete the character at the Command current cursor position 0x7E At the current cursor Command position invert the alpha character s case if possible and move the cursor one position to the right Delete Ox7F Move the cursor one position Command to the left back a character Delete Ox7F Erases the previous just Insert inserted character PowerPC EPPCBug Firmware Package User s Manual D 5 History Buffer Commands D 6 PowerPC EPPCBug Firmware Package User s Manual Disk Status Co
23. EPPC Bug gt This example handles a string with quotes 4 36 PowerPC EPPCBug Firmware Package User s Manual ENV Edit Environment ENV Edit Environment Command Input ENV D The ENV command allows you to view and configure all EPPCBug operational parameters that are kept in NonVolatile 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 EPPCBug uses a parameter from NVRAM the NVRAM contents are first tested by checksum to ensure the integrity of the NVRAM contents In the instance of NVRAM checksum failure certain default values are assumed The debugger operational parameters that are kept in NVRAM are not initialized automatically on power up warm reset You must invoke the ENV command Once the ENV command is invoked and executed without error debugger default and or user parameters are loaded into NVRAM along with checksum data If any of the operational parameters have been modified these new parameters will not be in effect until a reset or power up condition If the ENV command is invoked a With the D option ROM defaults are loaded into NVRAM a Without the D option you are prompted to configure all operational parameters You may change the displayed value by typing a new value followed by RETURN To leave the field unaltered press RETURN without typing a new value You ma
24. Example 2 EPPC Diag gt SD lt CR gt EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 141 Command Descriptions SET Set Time and Date Command Input SET mmddyyhhmm Description The SET command starts the RTC and sets the time as two digits each of month day year hour and minutes Hours should be in military 24 hour form The parameter is validated to ensure that it corresponds to a legal date and time If it is valid the time of day clock is updated to correspond and a formatted date and time message is displayed as a check If still incorrect the SET command may be repeated To display the current date and time of day refer to TIME Display Time and Date on page 4 154 Examples Example 1 SET a date and time of May 11 1993 2 05 PM EPPC Bug gt SET 0511931405 lt CR gt TUE MAY 11 14 05 00 00 1993 EPPC Bug gt 4 142 PowerPC EPPCBug Firmware Package User s Manual SYM Symbol Table Attach SYM Symbol Table Attach Command Input Description SYM ADDR Use the SYM command to attach a symbol table to the BUG 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 s base address symbol data In addition to
25. GT Go to Temporary Breakpoint GT ADDR Description GT allows you to set a temporary breakpoint and then start 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 0 count is encountered After setting the temporary breakpoint the sequence of events is similar to that of the GO command At this point control may be returned to EPPCBug by various conditions a A breakpoint with count 0 was found a The ABORT or RESET switch on the debugger host was pressed a An unexpected exception occurred Examples The following program resides at 20000 and 30000 EPPC Bug gt DS 20000 7 lt CR gt 00020000 3C600004 ADDIS R3 RO 4 00020004 60631000 ORI R3 R3 1000 00020008 3C800000 ADDIS R4 RO 0 0002000C 608400FE ORI R4 R4 SFE 00020010 4800FFF1 BL 00030000 00020014 80620000 LWZ R3 0 R2 FFF0178C 00020018 4BFFFFE8 B 00020000 EPPC Bug gt EPPC Bug gt DS 30000 8 lt CR gt 00030000 3CA00000 ADDIS R5 RO 0 00030004 2B040000 COMPLI CRF 6 0 R4 0 00030008 419A0014 BC 12 26 0003001C 0003000C 98A30000 STB R5 0 R3 00041004 00030010 3884FFFF ADDI R4 R4 SFFFFFFEE 4 48 PowerPC EPPCBug Firmware Package User s Manual GT Go to Temporary Breakpoint 00030014 38630001 ADDI R3 R3 1 000300
26. Internal Clock Speed Hertz External Clock Speed Hertz Reference Clock Speed Hertz Ethernet Address EPPC Bug gt MBX 01 W3269F 05A 2677405 00000000000000000000000000000000 017D7840 amp 25000000 017D7840 amp 25000000 00008000 amp 32768 08003E229470 PowerPC EPPCBug Firmware Package User s Manual 4 169 Command Descriptions WL Write Loop Command Input Options Description WL ADDR DATA B H W B Byte H Half word W Word WL establishes an infinite loop consisting of a processor store instruction targeted to the given address of the given length followed by a branch instruction back to the store The defined data is then stored repeatedly into the defined location in rapid succession The write loop can only be terminated by an external occurrence such as an abort reset a reset or power cycle 4 170 PowerPC EPPCBug Firmware Package User s Manual One Line Assembler Disassembler Overview Included as part of the debugger is an assembler disassembler utility The 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
27. R3 points to the input parameter block Offset Description 0x0 CLUN of device 0x4 DLUN of device 0x8 Pointer to controller packet R4 points to the output parameter block Offset Description 0x0 System call return status 0x4 Device specific error code If the system call failed due to an error at the device interface level additional device specific error status will be returned in this location Refer to Appendix E 0x8 Reserved OxC Reserved PowerPC EPPCBug Firmware Package User s Manual System Call Routines Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing 7 28 PowerPC EPPCBug Firmware Package User s Manual MSIO_FRMT EPPCBug System Calls Description Code 0304 Description MSIO_FRMT allows you to send a format command to the specified device Entry Conditions R3 points to the input parameter block Offset Description 0x0 CLUN of device 0x4 DLUN of device 0x8 Reserved must be 0 0xC Reserved must be 0 0x10 Block Number For disk devices when doing a format track the track that contains this block number is formatted This field is ignored for streaming tape devices 0x14 Flags Contains additional information Bit zero is interpreted as follows for disk devices If 0 it indicates a Format Track operation The track that contains the spe
28. UCHAR data_w_lo 06 data width UCHAR data_w_hi 07 data width UCHAR ifl 08 interface levels UCHAR a ras 09 RAS access UCHAR a cas OA CAS access UCHAR ct OB configuration type non parity parity ECC UCHAR refresh_rt OC refresh rate type UCHAR p_dram_o OD primary DRAM organization UCHAR s_dram_o OE secondary DRAM organization parity ECC checkbits UCHAR reserved 17 OF reserved fields for future offerings PowerPC EPPCBug Firmware Package User s Manual A 11 C Header Files UCHAR ss_info 32 future UCHAR m_info 64 UCHAR unused 128 DIM memory type definitions 7 define DIMM MI FPM 1 define DIMM MI_FDO 2 define DIMM MI_PN 3 define D MT_SDRAM 4 row addresses definitions define DIMM_RA_RDNDNT 1 lt lt 7 define DIMM RA MASK Ox7 module interface levels definitions a define DIMM IFL TTL 0 define DIMM IFL LVITL T define DIM IFL HSTL15 2 define DIMM IFL SSTL33 3 define DIM IFL SSTL25 4 D configuration type definitions Xj define DIMM _CT_NONE 0 define DIMM _CT_PARITY T define DIMM _CT_ECC 2 row addresses definitions A define DIMM RRT_SR 1 lt lt 7 define DIMM RRT MASK Ox7
29. ZO 00000000 00000000 z1 Z2 00000000 00000000 z3 Z4 00000000 00000000 z5 00000000 00000000 00000000 00000000 00000000 00000000 Z6 00000000 00000000 2Z7 00000000 00000000 EPPC Bug gt Modify some offset registers EPPC Bug gt Ok ZO lt CR gt ZO 00000000 00000000 20000 200FF lt CR gt Z1 00000000 00000000 25000 200 ZO 00020000 000200FF lt CR gt Look at 00000 00000 EPPC Bug gt location 20000 EPPC Bug gt M 20000 DI lt CR gt Z0 3C600004 ADDIS R3 RO 4 lt CR gt EPPC Bug gt EPPC Bug gt M Z0 DI lt CR gt Z0 3C600004 ADDIS R3 RO 4 lt CR gt EPPC Bug gt Set Z0 as the automatic register ZO0 0 EPPC Bug gt Ok Z0 A lt CR gt 0020000 000200FF lt CR gt EPPC Bug gt To look at location 20000 EPPC 00000 To look at location 0 override the automatic offset EPPC Bug gt M 0 Z27 DI lt CR gt 00000 Bug gt M 0 DI lt CR gt Z0 3C600004 ADDIS R3 RO S4 lt CR gt EPPC Bug gt 000 7FB143A6 MISPR 273 R29 lt CR gt EPPC Bug gt 4 114 PowerPC EPPCBug Firmware Package User s Manual PA NOPA Printer Attach Detach PA NOPA Printer Attach Detach Command Input PA n NOFA n Description These two commands either attach or detach a printer to the parallel serial port that you specify PA is used to attach and NOPA is used to detach Multiple printers may be attached When the printer is attached everything that
30. invoke NOMA followed by the name of the macro Invoking NOMA without specifying a valid macro name deletes all macros If NOMA is invoked with a valid macro name that does not have a definition an error message is printed Examples Example 1 Define macro ABC EPPC Bug gt MA ABC lt CR gt EMD 3000 lt CR gt EGO 0 lt CR gt H lt CR gt EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 79 Command Descriptions Example 2 Define macro DIS EPPC Bug gt MA DIS lt CR gt EMD 0 17 DI lt CR gt lt CR gt EPPC Bug gt Example 3 List all currently defined macros EPPC Bug gt MA lt CR gt ACRO ABC 010 MD 3000 020 GO O ACRO DIS 010 MD 0 17 DI EPPC Bug gt Example 4 List definition of macro ABC EPPC Bug gt MA ABC lt CR gt ACRO ABC 010 MD 3000 020 GO O EPPC Bug gt Example 5 Delete macro DIS EPPC Bug gt NOMA DIS lt CR gt EPPC Bug gt Example 6 Define macro ASM EPPC Bug gt MA ASM lt CR gt HM 0 DI lt CR gt lt CR gt EPPC Bug gt 4 80 PowerPC EPPCBug Firmware Package User s Manual MA NOMA Macro Define Display Delete Example 7 List all currently defined macros EPPC Bug gt MA lt CR gt ACRO ABC 010 MD 3000 020 GO 0 ACRO ASM 010 MM 0 DI EPPC Bug gt Example 8 Delete all defined macros EPPC
31. lt CR gt Effective address 00020000 Effective count amp 48 EPPC Bug gt EPPC Bug gt MD 20000 18 H lt CR gt 0020000 0000 0001 0002 0003 0004 0005 0006 0007 0020010 0008 0009 000A 000B 000C 000D 000E OOOF 0020020 0010 0011 0012 0013 0014 0015 0016 0017 EPPC Bug gt CI oO PowerPC EPPCBug Firmware Package User s Manual 4 9 Command Descriptions BI Block of Memory Initialize Command Input Options Description Examples BI RANGE B HW B Byte H Half word W Word The BI command may be used to initialize parity for a block of memory The BI command is nondestructive 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 The option field specifies the data size in which memory is initialized if RANGE is specified using a COUNT The option also specifies the size of data element to which the COUNT refers The length option is valid only when a COUNT is entered The default data type is word BI works through the memory block by reading from locations and checking parity If the parity is not correct then the data read is written back to the memory location in an attempt to correct the parity If the parity is not correct after the write then the message RAM FAIL is output and the ad
32. modification and exits the insert mode enter the command mode Insert Space Bar 0x20 Move the cursor one position to the right forward a character Command 0x24 Move the cursor to the last character in the line Command 0x2E Repeat the last change edit insert command Command 0x30 Move the cursor to the first character in the line Command 0x41 Move the cursor to one character past line end and enter the insert mode Command 0x42 From the current cursor position move the cursor back a blank delimited word and position the cursor to the first character in this word Command 0x43 From the current cursor position delete the remainder of the line and enter the insert mode Command PowerPC EPPCBug Firmware Package User s Manual History Buffer Table D 1 History Input Buffer Recall Edit Key Hexadecimal Description Edit Sequence Code P Mode D 0x44 From the current cursor Command position delete the remainder of the line E 0x45 From the current cursor Command position move the cursor forward a blank delimited word and position the cursor to the last character in this word P 0x50 Put back the last deleted text Command to the character position prior to the current cursor position R 0x52 At the current cursor Command position enter the insert mode and start replacing characters Note th
33. s Manual S Record Output Format S Record Types Eight types of S records have been defined to accommodate the several needs of the encoding transportation and decoding functions The various Motorola upload download and other record transportation control programs as well as cross assemblers linkers and other file creating or debugging programs utilize only those S records which serve the purpose of the program For specific information on which S records are supported by a particular program the user s manual for that program must be consulted An S record format module may contain S records of the following types SO The header record for each block of S records The code data field 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 makes up the header record The address field is normally zeroes S1 Arecord containing code data and the 2 byte address at which the code data is to reside S2 A record containing code data and the 3 byte address at which the code data is to reside S3 A record containing code data and the 4 byte address at which the code data is to reside S5 A record containing the number of S1 S2 and S3 records transmitted in a particular block This count appears in the address field There is no
34. s Manual GD Go Direct Ignore Breakpoints GD Go Direct Ignore Breakpoints Command Input GD ADDR Description GD is used to start target code execution If an address is specified it is placed in the target IP Execution starts at the target IP address As opposed to GO breakpoints are not inserted Once execution of the target code has begun control may be returned to EPPCBug by various conditions a The ABORT or RESET switch on the debugger host was pressed a An unexpected exception occurred Examples The following program resides at 20000 EPPC Bug gt DS 20000 10 lt CR gt 00020000 3C600004 ADDIS R3 RO 4 00020004 60631000 ORI R3 R3 1000 00020008 7C641B78 OR R4 R3 R3 0002000C 3CA00005 ADDIS R5 RO 5 00020010 60A51000 ORI R5 R5 1000 00020014 3cc00000 ADDIS R6 RO 0 00020018 90C40000 STW R6 0 R4 00041000 0002001C 38840004 ADDI R4 R4 4 00020020 7F042840 COMPL CRF 6 0 R4 R5 00020024 409AFFF4 BC 4 26 00020018 00020028 38C60001 ADDI R6 R6 1 0002002C 38E7FFFF ADDI R7 R7 SEFFFEEFE 00020030 7C641B78 OR R4 R3 R3 00020034 2B070000 CVPLI CRE 6 0 R7 0 00020038 409AFFEO BC 4 26 00020018 0002003C 00000000 WORD 00000000 EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 41 Command Descriptions Set breakpoint at 1003C EPPC Bug gt BR 20028 lt CR gt BREAKPOINTS 00020028 EPPC Bug gt Initialize R7
35. s Manual TT Trace to Temporary Breakpoint TT Trace to Temporary Breakpoint Command Input TT ADDR Description TT 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 EPPCBug Tracing starts at the target IP address Breakpoints are monitored but not inserted during tracing for all trace commands Instruction memory must be writable If a breakpoint with 0 count is encountered control is returned to EPPCBug The trace functions are implemented by inserting traps in the code Therefore the code must be writable and uncached for tracing to be effective Examples The following program resides at location 30000 and breakpoint is specified at location 30014 EPPC Bug gt DS 30000 lt CR gt 00030000 3CAQ0000 ADDIS R5 RO 0 00030004 2B040000 COMPLI CRF6 0 R4 0 00030008 419A0014 BC 12 26 0003001C 0003000C 98A30000 STB R5 0 R3 00041000 00030010 3884FFFF ADDI R4 R4 SEFFEFFFE 00030014 38630001 ADDI R3 R3 1 00030018 4BFFFFEC B 00030004 0003001C 4E 800020 BCLR 20 0 EPPC Bug gt EPPC Bug gt BR lt CR gt REAKPOINTS 00030014 WW PowerPC EPPCBug Firmware Package User s Manual 4 157 Command Descriptions
36. 0003001C 0003000C 98A30000 STB R5 0 R3 00041000 00030010 3884FFFF ADDI R4 R4 SEFFEFEFEE 00030014 38630001 ADDI R3 R3 1 00030018 4BFFFFEC B 00030004 0003001C 4E 800020 BCLR 20 0 EPPC Bug gt EPPC Bug gt BR lt CR gt BREAKPOINTS 00030014 EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 149 Command Descriptions Initialize IP and R3 R4 EPPC Bug gt RM IP lt CR gt IP 0000E000 30000 lt CR gt EPPC Bug gt EPPC Bug gt RM R3 lt CR gt R3 00000000 41000 lt CR gt R4 00000000 100 lt CR gt EPPC Bug gt Display target registers and trace one instruction EPPC Bug gt RD lt CR gt IP 00030000 MSR 00003030 CR 00000020 FPSCR 00000000 RO 00000000 R1 00020000 R2 FFFO178C R3 00041000 R4 00000100 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPR1 00000000 SPR8 00020014 SPR9 00000000 00030000 3CA00000 ADDIS R5 RO 0 EPPC Bug gt EPPC Bug gt T lt CR gt RO 00000000 R1 00020000 R2 FFFO178C R3 0004
37. 4 103 IN 8 initialization hardware 2 7 parity 4 10 values 2 14 Internet protocol 6 6 L load program from I O device 4 126 load program into FLASH memory 4 123 loading as boot process 6 1 interface support 6 1 loading user programs 6 1 loop establish infinite 4 170 loop write 4 170 machine instructions supported 5 2 macro define commands 4 78 delete 4 79 edit 4 82 mantissa field 3 12 mass storage configure device 7 18 file formats 6 8 read blocks 7 16 serial interfaces 6 8 memory compare content 4 5 4 163 compare range 4 22 copy address contents 4 12 display locations 4 85 display map 4 93 fill range 4 7 initialize parity 4 10 read locations 4 95 search range 4 17 memory comparison 4 162 memory change locations 4 89 modify memory 4 89 modify offset registers 4 112 modify source programs assembler 5 13 multiple key commands D 1 N network boot control module 6 7 network booting 6 5 network controllers C 1 network interface command type 4 100 network load support modules 6 6 Nonvolatile RAM NVRAM 4 37 O offset registers 3 6 operating system block size 7 23 output character to port 7 14 P parameter mask 7 22 parameters view configure 4 37 parameters for floppy drives B 3 PCI bus host bridge dependency 2 13 port baud rate for console 4 155 port baud rate host 4 155 port numbers valid 3 7 port assign new 4 120 port default for debug 2 6 PowerPC assembly language
38. 5 2 precision formats 3 12 printers attach detach 4 115 multiple 4 115 probe for device 4 60 4 67 probe non SCSI device 4 67 program load automatic 6 5 binary format 6 2 dependencies 6 3 ELF PPC 6 2 execution address 6 3 FAT 6 9 IN 9 Index features 6 2 file formats 6 10 6 12 FLASH memory 6 9 load point 6 3 Motorola ROM boot 6 2 PC cards 6 8 registers 6 12 ROM Boot 6 9 serial 6 8 S Records 6 2 support modules 6 6 programs debugging 3 7 downloading 3 7 entering 3 7 protocols BOOTP 4 126 6 7 ICMP 4 110 Internet 6 6 RARP 4 126 RARP ARP 6 7 TFTP 4 102 6 7 Q query attached devices 4 60 query configuration parameters 7 33 R ranges for offset registers 3 6 read blocks from mass storage device 7 16 read characters from device 7 15 read current serial port 7 12 read PCI configuration space 4 27 read RTC registers 7 39 read write memory requirements 2 11 Real Time Clock set 4 142 referencing addresses 1 3 registers MPU CPU 3 10 return control to EPPCBug 7 46 return pointer to info packet 7 48 return revision firmware value 7 50 Reverse Addresss Resolution Protocol 6 7 ROM modifying 2 5 RTC initialize 7 40 read registers 7 39 S SC instruction 7 1 SCSI bus status codes E 3 SCSI commands E 1 SCSI firmware status codes E 3 send command packet to disk controller 4 58 send command packet to Ethernet driver 4 100 send format command to device 7 29 sens
39. 5 4 EPPC Bug gt AS 20000 lt CR gt 00020000 3c600004 ADDIS R3 R0 4 ORI R3 RO 4 lt CR gt When RETURN is entered and terminates the line the old source line is erased from the terminal screen the new line is assembled and displayed and the next instruction in memory is disassembled and displayed 00020000 60030004 ORI R3 RO 4 00020004 60631000 ORI R4 R4 1000 lt CR gt Another program line can now be entered Program entry continues in this manner until all lines have been entered A period is used to exit the MM or AS command If an error is encountered during assembly of the new line an error message is displayed The location being accessed is redisplayed EPPC Bug gt AS 30000 lt CR gt 00030000 3CA00000 ADDIS R5 R0 0 ORU R5 R0 1 lt CR gt Assembler Error Unknown Mnemonic 00030000 3CA00000 ADDIS R5 RO 0 PowerPC EPPCBug Firmware Package User s Manual 5 15 How to Enter Branch Operands How to Enter 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 for branch to self in order to reserve space After the actual address is discovered the line containing the branch instruction can be reentered using the correct value Branch operands are interpreted as signed hexadecimal numbers Assembler Output Program Listings A listing of the program is obtained using the Memory Displ
40. A The optional port number n allows you to specify which port is the host port If omitted port 1 is assumed The ports do not have to be at the same baud rate but the console port baud rate should be equal to or greater than the host port baud rate for reliable operation To change the baud rate use the Port Format PF command The optional escape argument allows you to specify the character to be used as the exit character This can be entered in three different formats 03 Set escape character to C C Set escape character to C c Set escape character to c If the port number is omitted and the escape argument is entered as a numeric value precede the escape argument with a comma to distinguish it from a port number PowerPC EPPCBug Firmware Package User s Manual 4 155 Command Descriptions Examples Example 1 EPPC Bug gt IM lt CR gt Escape character 01 A lt Control A gt EPPC Bug gt Example 2 In this example the default port of 1 was specified by the NULL argument field and an escape character of CTRL G was specified EPPC Bug gt IM g lt CR gt Escape character S07 G lt Cont rol G gt EPPC Bug gt Example 3 In this example the port logical unit of 03 was specified and an escape character of CTRL B was specified EPPC Bug gt IM 3 2 lt CR gt Escape character 02 B lt Control B gt EPPC Bug gt 4 156 PowerPC EPPCBug Firmware Package User
41. BF Block of Memory Fill 4 7 BI Block of Memory Initialize 4 10 BM Block of Memory Move 4 12 BR Breakpoint insert delete 4 15 BS Block of Memory Search 4 17 BV Block of Memory Verify 4 22 CSAR PCI Configuration Space Read Access 4 27 CSAW PCI Configuration Space Write Access 4 28 CS Checksum a Block of Data 4 25 DC Data Conversion 4 29 DS One Line Disassembelr 4 31 DTT Display Temperature 4 32 DU Dump S Records 4 33 ECHO Echo String 4 35 ENV Edit Environment 4 37 GD Go Direct 4 41 GN Go to Next Instruction 4 43 GO Go Execute User Program 4 45 IN 6 GT Go to Temporary Breakpoint 4 48 HBD History Buffer Display 4 51 HBxX History Buffer Entry Execute 4 52 HE Help 4 53 12C I2C Device R W 4 56 IOC I O Control for Disk 4 58 IOI I O Inquiry 4 60 IOP I O Physical to Disk 4 62 IOT I O Teach for Configuring Disk Controller 4 66 LO Load S Records from Host 4 73 MAE Macro Edit 4 82 MAL Enable Macro Expansion List ing 4 84 MA Macro Define Display 4 78 MM Memory Modify 4 89 MMAP Memory Map Display 4 93 MMAP Memory Map Display 4 93 MMD Memory Map Diagnostic 4 95 MS Memory Set 4 97 MW Memory Write 4 98 NIOC Network I O Control 4 100 NIOP Network I O Physical 4 102 NIOT I O Teach for Configuring Network Controller 4 105 NOMAL Disable Macro Expansion Listing 4 84 NOMA Macro Delete 4 78 NOPA Printer DetachDetach 4 115 NOPF Port Detach 4 117 NOSYM Symbol Table Detach 4 146 NPING Network
42. Clock with the time that is located in a user specified buffer Entry Conditions R3 points to the input parameter block Offset Description 0x0 Pointer to RTC data Pointer to RTC data points at a structure with the following elements Offset Description 0x0 Year 2 nibbles packed BCD 0x1 Month 2 nibbles packed BCD 0x2 Day of month 2 nibbles packed BCD 0x3 Day of week 2 nibbles packed BCD 0x4 Hour of 24 hour clock 2 nibbles packed BCD 0x5 Minute 2 nibbles packed BCD 0x6 Seconds 2 nibbles packed BCD 0x7 Reserved must be 0 R4 points to the output parameter block Offset Description 0x0 System call return status Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing 7 40 PowerPC EPPCBug Firmware Package User s Manual FM_WRIT Code 0600 Description EPPCBug System Calls FM_WRIT is used to program flash memory Entry Conditions R3 points to the input parameter block Offset 0x0 Description Reserved must be 0 0x4 Reserved must be 0 0x8 Control word Contains bit flags with the following meaning Bit 0 Execution address valid Bit 1 Execute address on error as well Bit 2 Execute local reset Bit 3 Execute local reset on error as well Bit 4 Non verbose no display messages 0xC Specifies the source starting address of the d
43. Command Input 4 141 Description 4 141 Examples 4 141 SET Set Time and Date 4 142 Command Input 4 142 Description 4 142 Examples 4 142 SYM Symbol Table Attach 4 143 Command Input 4 143 Description 4 143 Examples 4 144 NOSYM Symbol Table Detach 4 146 Command Input 4 146 Description 4 146 Example 4 146 SYMS Symbol Table Display Search 4 147 Command Input 4 147 Description 4 147 Examples 4 147 T Trace 4 149 Command Input 4 149 Description 4 149 Examples 4 149 TA Terminal Attach 4 153 Command Input 4 153 Description 4 153 Examples 4 153 TIME Display Time and Date 4 154 Command Input 4 154 Description 4 154 Example 4 154 TM Transparent Mode 4 155 Command Input 4 155 Description 4 155 Examples 4 156 TT Trace to Temporary Breakpoint 4 157 Command Input 4 157 Description 4 157 Examples 4 157 UPM MPC8xx User Programmable Machine UPM Display Read Write 4 160 Command Input 4 160 Arguments 4 160 Description 4 160 Example 4 160 VE Verify S Records Against Memory 4 162 Command Input 4 162 Options 4 162 Arguments 4 162 Description 4 163 Examples 4 164 VER Revision Version Display 4 167 Command Input 4 167 Description 4 167 Examples 4 167 VPD Vital Product Data Display 4 169 Command Input 4 169 Description 4 169 Example 4 169 WL Write Loop 4 170 Command Input 4 170 Options 4 170 Description 4 170 Overview 5 1 PowerPC Assembly Language 5 2 Machine Instruction Operatio
44. DSADDR Destination starting address of the FLASH memory to program the binary image to IEADDR Instruction execution address i e PC IP This A sim address points to a reset vector for MPC60x architecture Byte Half word Word Allow the automatic reset local of the hardware on completion of programming the FLASH Memory only when the programming is completed error free Resetting is done only if the board supports it Allow the automatic reset local of the hardware on completion of programming the FLASH Memory Resetting is done only if the board supports it Allow the FLASH Memory driver to always execute the passed execution address even on error This option is valid only when you specify the instruction 4 122 PowerPC EPPCBug Firmware Package User s Manual PFLASH Program FLASH Memory Description The PFLASH command loads an application or program into FLASH memory The command line arguments are checked for instance 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 The element size is determined by the size B W or L option The default is B If the programming agent is the debugger and it is resident in the FLASH memory it may have to download
45. Description 4 98 Examples 4 98 NIOC Network I O Control 4 100 Command Input 4 100 Description 4 100 NIOP Network I O Physical 4 102 Command Input 4 102 Description 4 102 NIOT I O Teach for Configuring Network Controller 4 105 Command Input 4 105 Options 4 105 Description 4 105 NPING Network Ping 4 110 Command Input 4 110 Arguments 4 110 Description 4 110 OF Offset Registers Display Modify 4 112 Command Input 4 112 Command Use 4 112 Description 4 112 Offset Register Rules 4 113 Examples 4 114 PA NOPA Printer Attach Detach 4 115 Command Input 4 115 Description 4 115 Examples 4 115 PF NOPF Port Format Detach 4 117 Command Input 4 117 Description 4 117 Listing Current Port Assignments 4 118 Examples 4 118 Configuring a Port 4 118 Examples 4 119 PFLASH Program FLASH Memory 4 122 Command Input 4 122 Arguments 4 122 Options 4 122 Description 4 123 PL Program Load 4 125 Command Input 4 125 Arguments 4 125 Description 4 126 Examples 4 128 RD Register Display 4 130 Command Input 4 130 Arguments 4 130 Description 4 130 Examples 4 132 RESET Cold Warm Reset 4 135 Command Input 4 135 Description 4 135 Examples 4 135 RL Read Loop 4 137 Command Input 4 137 Options 4 137 Description 4 137 RM Register Modify 4 138 Command Input 4 138 Description 4 138 Examples 4 138 RS Register Set 4 140 Command Input 4 140 Description 4 140 Examples 4 140 SD Switch Directories 4 141
46. Entry Conditions R3 points to the input parameter block Offset Description 0x0 CLUN of device 0 selects current output device 0x4 DLUN of device 0 selects current output device 0x8 Pointer to input buffer 0xC Maximum number of bytes in buffer Note EPPCBug 1 1 supports only CLUN and DLUN of 0 R4 points to the output parameter block Offset Description 0x0 System call return status 0x4 Number of bytes actually received not including terminating NULL Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing The memory pointed to by the input buffer pointer contains the received string PowerPC EPPCBug Firmware Package User s Manual 7 15 System Call Routines MSIO_READ and MSIO_WRIT Code 0300 MSIO_READ Code 0301 MSIO_WRIT Description MSIO_READ reads blocks from the specified mass storage device MSIO_WRIT writes blocks to the specified mass storage device Entry Conditions R3 points to the input parameter block Offset 0x0 0x4 Description CLUN of device to use DLUN of device to use 0x8 Pointer to data buffer to read data into or write data from 0xC 0x10 0x14 0x18 Number of blocks requested Block Number disk devices or File Number tape devices For disk devices this is the block number where the transfer starts On a disk read data is read starti
47. Exponent sign From 1 to 3 decimal digits PowerPC EPPCBug Firmware Package User s Manual 3 13 Scientific Notation 3 14 PowerPC EPPCBug Firmware Package User s Manual Debugger Commands Command Descriptions This chapter contains descriptions of each debugger command with one or more examples of each The EPPCBug debugger commands are summarized in the following table Table 4 1 Debugger Commands Command Title Mnemonic AS One Line Assembler BC Block of Memory Compare BF Block of Memory Fill BI Block of Memory Initialize BM Block of Memory Move BR NOBR Breakpoint Insert Delete BS Block of Memory Search BV Block of Memory Verify CS Checksum a Block of Data CSAR PCI Configuration Space READ Access CSAW PCI Configuration Space WRITE Access DC Data Conversion DS One Line Disassembler DTT Display Temperature DU Dump S Records ECHO Echo String ENV Edit Environment GD Go Direct Ignore Breakpoints GN Go to Next Instruction GO Go Execute User Program GT Go to Temporary Breakpoint HBD History Buffer Display HBX History Buffer Entry Execute PowerPC EPPCBug Firmware Package User s Manual 4 1 Command Descriptions Table 4 1 Debugger Commands Command Title Mnemonic HE Help I2C I2C Device Read Write IOC I O
48. Firmware Package User s Manual 4 49 Command Descriptions R4 00000000 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPR1 00000000 SPR8 00020014 SPR9 00000000 00020014 80620000 Iwz R3 0 R2 FFF0178C EPPC Bug gt Note that a breakpoint from the breakpoint table was encountered before the temporary breakpoint 4 50 PowerPC EPPCBug Firmware Package User s Manual HBD History Buffer Display HBD History Buffer Display Command Input HBD N Entries Description The MBX board keeps track of the last 128 commands entered by the user since power up The HBD command allows you to retrieve a listing of these commands The number of entries to display is optional If present it limits the number of commands displayed Examples EPPC Bug gt ioi lt cr gt I O Inquiry Status CLUN DLUN CNIRL TYPE DADDR DTYPE RM Inquiry Data EPPC Bug gt hbd lt cr gt 1 ioi 2 hbd EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 51 Command Descriptions HBX History Buf
49. LF gt after the header record serves to break LO out of the loop so that data records are processed The other options more than one may be used have the following effects C Ignore checksum A checksum for the data contained within an S record 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 X Echo This option echoes the S records to your terminal as they are read in at the host port T Obsolete The T option has no effect on the operation of LO The S record format refer to Chapter Running H F 3 allows for an entry point to be specified in the address field of the termination record of an S record 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 G or GO instead of G addr or GO addr to execute the code that was downloaded 4 74 PowerPC EPPCBug Firmware Package User s Manual LO Load S Records from Host If anonhexadecimal character is encountered within the data field of a data record then the part of the record which had been received up to that time is printed to the screen and the EPPCBug error handler is invoked to point to the faulty ch
50. Memory Display Command Input MD S ADDR COUNT DEL ADDRI IBIHIWISI DIDI Options Integer Data Types B Byte H Half word W Word Floating Point Data Types S Single Precision D Double Precision This command displays the contents of multiple memory locations all at once The default data type is word Also for the integer data types the data is always displayed in hexadecimal along with its ASCII representation The DI option enables the Resident MC88100 disassembler and is identical to the DS command No other option is allowed if DI is selected later only The optional count argument in the MD command specifies the number of data items to be displayed or the number of disassembled instructions to display if the disassembly option is selected defaulting to 8 if none is entered The default count is changed to 128 if the S sector modifier is used Pressing RETURN at the prompt immediately after the command has completed causes the command to re execute and displays an equal number of data items or lines beginning at the next address PowerPC EPPCBug Firmware Package User s Manual 4 85 Command Descriptions Examples Example 1 EPPC Bug gt MD 22000 H lt CR gt 00022000 2800 1942 2900 1942 2800 1842 2900 2846 B B B F EPPC Bug gt lt CR gt 00022010 FC20 0050 EDO7 9F61 FFOO 000A E860 F060 Pm a h p EPPC Bug gt Example 2 Assume the following microprocessor register s
51. Ping 4 110 OF Offset Registers Display Modify 4 112 PA Printer Attach 4 115 PFLASH Program FLASH Memory 4 122 PF Port Format 4 117 PL Program Load 4 125 RD Register Display 4 130 RESET Cold 4 135 RESET Warm 4 135 RL Read Loop 4 137 RM Register Modify 4 138 RS Register Set 4 140 SD Switch Directories 4 141 SET Set Time and Date 4 142 SYMS Symbol Table Display Search 4 147 SYM Symbol Table Attach 4 143 TA Terminal Attach 4 153 TM Transparent Mode 4 155 T Trace 4 149 TT Trace to Temporary Breakpoint 4 157 UPM MPC8xx User Programmable Machine Dis play Read Write 4 160 VER Revision Version Display 4 167 VE Verify S Records Against Memo ry 4 162 VPD Vital Product Data Display 4 169 WL Write Loop 4 170 define command macro 4 78 define constant in memory assembler 5 12 define data address sizes 2 4 designating true valid signal 1 3 detach printer 4 115 device descriptor packet 7 19 Device Logical Unit Number DLUN 7 19 device device driver access B 1 diagnostics running 2 11 differences between assemblers 5 3 differences from other debuggers 2 4 DIMM 2 13 2 14 directory changing 4 141 debugger 2 4 IN 7 Index diagnostic 2 11 disk status codes E 1 disk configuration set up new 4 66 disk device R W or format 4 62 display addresses 4 95 board information 4 169 EPPCBug date revision 4 167 Floating Point Unit registers 4 130 hardware su
52. Pre write precompensation 1 Post read Bit 9 Floppy disk size 0 31 2 and 51 4 inch floppy 1 8 inch floppy Bit 13 Track zero density 0 Single density FM encoding 1 Same as remaining tracks 7 24 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls Table 7 7 CFGA Fields Parameter Description IOSREC Record Block size Number of bytes per record block Must be an integer multiple of the physical sector size IOSSPT Sectors per track Number of sectors per track IOSHDS Number of heads Number of recording surfaces for the specified device IOSTRK Number of Number of cylinders on the media cylinders IOSILV Interleave factor This field specifies how the sectors are formatted on a track Normally consecutive sectors in a track are numbered sequentially in increments of 1 interleave factor of 1 The interleave factor controls the physical separation of logically sequential sectors This physical separation gives the host time to prepare to read the next logical sector without requiring the loss of an entire disk revolution IOSPSM Physical sector Actual number of bytes per sector on media size IOSSOF Spiral offset Used to displace the logical start of a track from the physical start of a track The displacement is equal to the spiral offset times the head number assuming that the first head is 0 This displacement is used to give the controller
53. Revision Version Display VER Revision Version Display Command Input Description Examples VER E The VER command displays the various revisions and versions of the host s hardware subsystems The command displays the revision and date of EPPCBug that is running and hardware revision information The E option displays more detail which can be used for components subsystems that may have lengthy data arrays associated with their identification Such a data array would be displayed as amemory dump Example 1 g licroProcessor EPPC Bug gt ver lt cr gt Debugger Diagnostics Type Revision ebugger Diagnostics Revision Date licroProcessor Version Revision MicroProcessor Internal Clock Speed MHZ External Clock Speed MHZ Communication Processor Module CPM Part Mask Internal Memory Map Pointer Local Memory Size EPPC Bug gt Example 2 EPPC Bug gt ver e icroProcessor Debugger Diagnostics Type Revision Debugger Diagnostics Revision Date MicroProcessor Version Revision 01000000 16 B MicroProcessor Internal Clock Speed MHZ External Clock Speed MHZ Communication Processor Module CPM Part Mask VBXC 0 3 05 01 97 0050 0000 25 25 00 12 FA200000 IBXC 0 3 05 01 97 0050 0000 25 25 00 12 PowerPC EPPCBug Firmware Package User s Manual 4 167 Command Des
54. add support for PC104 based network controllers There are two types of network communication status codes a Controller independent a Controller MPC8xx PC104 card dependent The controller independent status codes are independent of the specified network interface These errors are normally some type of operator error The controller dependent status codes relate directly to the specified network interface These errors occur at the driver level out to and including the network The status word returned by the network system call routine flags an error condition if it is nonzero Bits 8 through 15 of the status word reflects controller independent errors and they are generated by the network trap routines The least significant byte reflects controller dependent errors and they are generated by the controller The status codes are returned by driver and are placed in the controller dependent field of the command packet status word All status codes must be nonzero a code of 00 signifies no error Table C 1 Controller Independent Status Codes Code Description 01 Invalid controller logical unit number 02 Invalid device logical unit number 03 Invalid command identifier 04 Clock RTC is not running 05 TFTP retry count exceeded 06 BOOTP retry count exceeded PowerPC EPPCBug Firmware Package User s Manual C 1 Table C 1 Controller Independent Status Codes
55. all address decode is the eight chip select banks located within the MPC821 860 The firmware initializes the system s address map as follows Table 2 1 System Address Map MPU View Start End Size Definition CS Note 00000000 OOXFFFFF 4 16M On Board DRAM 1 3 42 X 3 4M X EF 16M 00X00000 OXXXXXXX xM DIMM Slot Bank 0 and 1 2 3 1 10 11 12 8 16 32 64M 80000000 OFFFFFFF 512M PCI ISAI O Space 5 2 4 7 A0000000 BFFFFFFF 512M Reserved 6 C0000000 DFFFFFFF 512M PCI ISA Memory Space 5 2 4 7 E0000000 E3FFFFFF 64M PCMCIA Memory Space N A 5 13 E4000000 E7FFFFFF 64M PCMCIA DMA Memory N A 5 13 Space E8000000 EBFFFFFF 64M PCMCIA Attribute Space N A 5 13 EC000000 EFFFFFFF 64M PCMCIA I O Space N A 5 13 FOO00000 FOFFFFFF 160M Unused 6 FA000000 FAOFFFFF 1M NVRAM BBRAM 4 5 7 32 128 512K Internal Decode FA100000 FA1FFFFF 1M Status Control Register 4 7 1 2 FA200000 FA20FFFF 64K MPC821 860 Dual Port N A 5 RAM 16K Internal Decode FA210000 FA21FFFF 64K PCI Bus Bridge 6 2 4 Control Status Registers 4K Internal Decode FA220000 FBFFFFFF 30592K Unused 6 FC000000 FC7FFFFF 1 2 4 8 FLASH Memory Oor7 3 8 9 M 1 2 4 8M FC800000 FDFFFFFF 24M Reserved 6 2 12 PowerPC EPPCBug Firmware Package User s Manual Introduction to PowerPC EPPCBug Firmware Table 2 1 System Address Map MPU View Start End Size Definition CS Note FE000000 FE7FF
56. appears on the system console terminal is also echoed to the attached port If no port is specified PA does not attach any port but NOPA detaches all attached ports The specified port must be configured and functional When attaching to a parallel port the printer must be on line and functioning Due to the nature of a parallel port a potential hang condition could result if the printer device is not handshaking correctly If the port number specified is not currently assigned PA displays a message If NOPA is attempted on a port that is not currently attached a message is displayed The port being attached must already be configured This is done using the Port Format PF command see page page 4 117 This is done by executing the following sequence prior to PA n Examples EPPC Bug gt PF 3 lt CR gt Logical unit 03 unassigned ame of board FDC37C672 lpt lt CR gt ame of port LPT1 lt CR gt Port base address 800003BC lt CR gt OK to proceed y n Y lt CR gt EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 115 Command Descriptions For further details refer to PF NOPF Port Format Detach on page 4 117 Example 1 Attach logical unit 03 EPPC Bug gt PA 3 lt CR gt EPPC Bug gt Example 2 Display current attached printers EPPC Bug gt PA lt CR gt Printer 03 attached EPPC Bug gt Example 3 Detach device at logical unit 03 EPPC Bu
57. 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 text Is sent to the host before EPPCBug begins to look for S records at the host port This allows you to send a command to the host device to initiate the download The text should NOT be delimited by any kind of quote marks Text is understood to begin immediately following the equals sign and terminates by pressing 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 PowerPC EPPCBug Firmware Package User s Manual 4 73 Command Descriptions 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 After the entire command has been sent to the host LO keeps looking for a lt LF gt character from the host signifying the end of the echoed command No data records are processed until this lt LF gt is received If the host system does not echo characters LO still keeps looking fora lt LF gt character before data records are processed For this reason it is required in situations where the host system does not echo characters that the first record transferred by the host system be a header record The header record is not used but the lt
58. buffer Upon startup if BUG commands are present in the startup command buffer they will be executed as though a user was present and entering the commands from the keyboard 4 38 PowerPC EPPCBug Firmware Package User s Manual ENV Edit Environment If the startup buffer begins with a NULL character the firmware does not attempt to execute commands from the buffer In this case control simply goes to the command line prompt Firmware Command Buffer Size 00000200 Specifies the size of the startup command buffer Firmware Command Buffer Delay 5000 Defines the number of milliseconds to wait before firmware begins executing the startup commands in the startup command buffer During this delay you may press any key to prevent the execution of the startup command buffer The default value of this parameter causes a startup delay of 5 seconds Program Intermediate Load Address 00200000 This parameter defines the address of memory where the PL command initially loads the program image Once the image is loaded at the intermediate load address its contents are evaluated and repositioned in memory as appropriate for the load image type ELF ROMBOOT or binary Binary Program Load Address 00080000 This parameter defines the address where binary images are moved to for execution Binary images are images that are neither ELF or ROMBOOT images This parameter does not affect the load address for either ELF or RO
59. byte The five fields which comprise an S record are shown below Type Record Length Address Code Data Checksum Where the fields are composed as follows Table 8 1 S Record Composition Field Printable Contents Characters Type 2 S record type S0 S1 etc Record 2 The count of the character pairs in the record Length excluding the type and record length Address 4 6 or 8 The 2 3 or 4 byte address at which the data field is to be loaded into memory Code Data 0 2n From 0 to n bytes of executable code memory loadable data or descriptive information For compatibility with teletypewriters some programs may limit the number of bytes to as few as 28 56 printable characters in the S record PowerPC EPPCBug Firmware Package User s Manual 8 1 S Record Content Field Checksum Characters 2 Table 8 1 S Record Composition Printable Contents The least significant 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 fields Each record may be terminated with a CR LF NULL Additionally an S record may have an initial field to accommodate other data such as line numbers generated by some time sharing system Accuracy of transmission is ensured by the record length byte count and checksum fields PowerPC EPPCBug Firmware Package User
60. code data field S7 A termination record for a block of S3 records The address field may optionally contain the 4 byte address of the instruction to which control is to be passed There is no code data field S8 A termination record for a block of 2 records The address field may optionally contain the 3 byte address of the instruction to which control is to be passed There is no code data field PowerPC EPPCBug Firmware Package User s Manual 8 3 S Record Types S9 A termination record for a block of S1 records The address field may optionally contain the 2 byte address of the instruction to which control is to be passed Under the operating system a resident linker command can be used to specify this address If not specified the first entry point specification encountered in the object module input will be used There is no code data field 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 8 4 PowerPC EPPCBug Firmware Package User s Manual S Record Output Format Creation of S Records S record format programs may be produced by a Several dump utilities a Debuggers a The operating system resident linkage editor a Several cross assemblers or cross linkers On the operating system a build u
61. default and remains in effect until changed by entering one of the other special characters A Back up to the previous field register or memory location This remains in effect until changed by entering one of the other special characters Reopen the same field register or memory location Terminate the command and return to EPPC Bug gt prompt 3 2 PowerPC EPPCBug Firmware Package User s Manual Using the EPPCBug Debugger You may use the following control characters for limited editing while entering commands at the EPPC Bug gt prompt Additional command line history and editing control characters are described in Appendix D DEL Delete move the cursor back one position and erase the character at the new cursor position If a printer port is configured hardcopy mode a slash character is typed along with the deleted character CTRL h Performs the same function as DEL 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 EPPC Bug are CTRL s Wait halt console output XON CTRL q Resume console output XOFF Syntactic Variables The following syntactic variables are encountered in the command descriptions which follow In addition other syntactic variables may be used and are defined in the particular command description in which they occur
62. effectively disabled by setting Z7 as the automatic register Each offset register has two values base and top a Base is the absolute least address that is used for the range declared by the offset register a Top address is the absolute greatest address that is used When entering the base and top you may use either an address address format or an address count format If a count is specified it refers to bytes If the top address is omitted from the range then a count of 1MB is assumed The top address must equal or exceed the base address Wrap around is not permitted Offset Register Rules 1 2 At power up and cold start reset Z7 is the automatic register At power up and cold start reset all offset registers have both base and top addresses preset to 0 This effectively disables them Z7 always has both base and top addresses set to 0 it cannot be changed Any offset register can be set as the automatic register The automatic register is always added to every absolute address argument of every EPPCBug command where there is not an offset register explicitly called out There is always an automatic register To disable the effect of the automatic register set Z7 as the automatic register Note that this is the default condition PowerPC EPPCBug Firmware Package User s Manual 4 113 Command Descriptions Examples Display offset registers EPPC Bug gt OF lt CR gt
63. either a byte half word or word field as specified by the option selected The default field length is W word If data you entered does not fit into the data field size then leading bits are truncated to make it fit If truncation occurs then a message is printed stating the data pattern which was actually written or initially written if you specified an increment If the increment you entered does not fit into the data field size then leading bits are truncated to make it fit If truncation occurs then a message is printed stating the increment which was actually used 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 PowerPC EPPCBug Firmware Package User s Manual 4 7 Command Descriptions Examples Example 1 Assume memory from 20000 through 2002F is clear EPPC Bug gt BF 20000 2001F 4E71 lt CR gt Effective address 00020000 Effective address 0002001F EPPC Bug gt EPPC Bug gt MD 20000 18 H lt CR gt 00020000 0000 4 amp 71 0000 4E71 0000 4E71 0000 4E71 Nq Nq Ng Nq 00020010 0000 4E71 0000 4E71 0000 4E71 0000 4E71 Nq Nq Nq Nq 00020020 0000 0000 0000 0000 0000 0000 0000 0000s
64. gt ISR 00003030 lt CR gt EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 139 Command Descriptions RS Register Set Command Input RS REG DEL EXP DEL 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 mnemonic for the particular register Examples Example 1 Change register R5 EPPC Bug gt RS R5 12345678 lt CR gt R5 12345678 EPPC Bug gt Example 2 Examine register R5 EPPC Bug gt RS R5 lt CR gt R5 12345678 EPPC Bug gt 4 140 PowerPC EPPCBug Firmware Package User s Manual SD Switch Directories SD Switch Directories Command Input Description Examples SD Use SD to change from the debugger directory to the diagnostic directory or from the diagnostic directory to the debugger directory The commands in the current directory the directory that you are in at the particular time may be listed using the Help HE command The directories are structured so that the debugger commands are available from either directory but the diagnostic commands are only available from the diagnostic directory Example 1 Switch from debugger directory to diagnostic directory The prompt indicates what is the current directory a Bug Debugger a Diag Diagnostics EPPC Bug gt SD lt CR gt EPPC Diag gt
65. gt DC 55 gt gt 1 lt CR gt 0000002A 2A amp 42 EPPC Bug gt EPPC Bug gt DC 14 2 B lt CR gt DATA BIT 33222222222211111111110000000000 UMBER gt gt 10987654321098765432109876543210 BINARY 00000000000000000000000000000011 EPPC Bug gt EPPC Bug gt DC 1 2 BO lt CR gt DATA BIT 33222222222211111111110000000000 NUMBER gt gt 10987654321098765432109876543210 BINARY 00000000000000000000000000000011 OCTAL 00000000003 EPPC Bug gt EPPC Bug gt DC 14 2 BOA lt CR gt DATA BIT 33222222222211111111110000000000 NUMBER gt gt 10987654321098765432109876543210 BINARY 00000000000000000000000000000011 OCTAL 00000000003 ASCII ETX EPPC Bug gt The subsequent examples assume R2 00030000 and the following data resides in memory 00030000 11111111 22222222 33333333 44444444 3333DDDD EPPC Bug gt DC R2 lt CR gt 00030000 30000 amp 196608 EPPC Bug gt 4 30 PowerPC EPPCBug Firmware Package User s Manual DS One Line Disassembler DS One Line Disassembler Command Input DS ADDR COUNT DEL ADDR Description This is synonymous with the MD ADDR DI command and provides access to the disassembler Refer to MD Memory Display on page 4 85 for information PowerPC EPPCBug Firmware Package User s Manual 4 31 Command Descriptions DTT Display Temperature Command Input DTT Description This command reads and display
66. just as it appears Bold is also used for commands options and arguments to commands and names of programs directories and files italic Used for names of variables to which you assign values Italic is also used for comments in screen displays and examples courier Used for system output such as screen displays reports examples and system prompts RETURN Represents the Enter Return or Carriage Return lt CR gt key CTRL Represents the Control key Execute control characters by pressing the CTRL key and the letter simultaneously for example CTRL d Separates two or more items that you can select from one only Encloses an optional item that may occur zero or one time Encloses an optional item that may occur zero or more times 1 2 PowerPC EPPCBug Firmware Package User s Manual General Information Terminology Conventions Throughout this manual a convention has been maintained whereby data and address parameters are preceded by a character which specifies the numeric format as follows Dollar sign specifies a hexadecimal character Percent sign specifies a binary number amp Ampersand sign specifies a decimal number Unless otherwise specified all address references are in hexadecimal throughout this manual An asterisk following the signal name for signals which are level significant denotes that the signal is true or valid when the signal is low An asterisk following
67. parameter in configuration 0A Transfer data count mismatch error 0B Invalid status received in command packet 0C Command aborted via break SCSI Firmware Status Codes The SCSI firmware returns codes for the SCSI Bus status and the SCSI I O Processor NCR53C810 or NCR53C825 status Table E 2 lists the codes and a description of each The debugger returns a single word 16 bits for an error code The upper byte is Controller Independent and is assigned by the debugger The lower byte is Controller Dependent It is formed by selecting one of two bytes of error information returned by the firmware either the SIOP Status or the SCSI Bus Status If the SCSI Bus Status byte returned by the firmware is nonzero 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 For example if the Controller Dependent value returned by the debugger is 02 this code could have two possible meanings SCSI Bus Status Check Condition SIOP Status Command aborted SCSI bus reset E 2 PowerPC EPPCBug Firmware Package User s Manual Disk Status Codes Table E 2 SCSI Firmware Status Codes Code Description SCSI Bus Status
68. resident assembler Depending on the context refer to Addressing Modes on page 5 10 the ampersand can be either the AND logical operator or a decimal number prefix while the asterisk can be either the multiplication operator or the current value of the program counter PowerPC EPPCBug Firmware Package User s Manual 5 3 Source Program Coding Although functional differences exist between the two assemblers the one line assembler is a true subset of the resident assembler The format and syntax used with the EPPCBug assembler are acceptable to the resident assembler except as described above Source Program Coding A source program is a sequence of source statements arranged in a logical way to perform a predetermined task Each source statement occupies a line and must be either an executable instruction or a WORD assembler directive Source Line Format Each source statement is a combination of operation and as required operand fields Line numbers labels and comments are not used 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 1 Operation codes which correspond to the PowerPC instruction set 2 Define Constant directive WORD is recognized to define a constant in a word location The size of the data field affected by an instruction is determined by the data s
69. s Manual BS Block of Memory Search and a message is output stating that the last match does not lie entirely within the range You may search noncontiguous memory with this command without causing a Bus Error Examples Assume the following data is in memory 00030000 0000 0045 7272 6F72 2053 7461 7475 733D Error Status 00030010 3446 2F2F 436F 6E66 6967 5461 626C 6553 4F ConfigTables 00030020 7461 7274 3A00 0000 0000 0000 0000 0000 tart EPPC Bug gt BS 30000 3002F Task Status lt CR gt Effective address 00030000 Effective address 0003002F not found EPPC Bug gt Mode 1 The string is not found so a message is output EPPC Bug gt BS 30000 3002F Error Status lt CR gt Effective address 00030000 Effective address 0003002F 00030003 EPPC Bug gt Mode 1 The string is found and the address of its first byte is output EPPC Bug gt BS 30000 3001F ConfigTableStart lt CR gt Effective address 00030000 Effective address 0003001F last match extends over range boundary EPPC Bug gt 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 EPPC Bug gt BS 30000 30 t B lt CR gt Effective address 00030000 Effective count amp 48 0003000A 0003000C 00030020 00030023 EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4
70. the FLASH memory driver The downloaded driver uses the board s system fail LED MBX and NVRAM to communicate programming errors This hardware notification of a FLASH memory programming error is only necessary if you are reprogramming the programming agent s text and data space Otherwise errors are communicated by means of the programming terminal serial I O Upon error free completion of the FLASH memory programming control is passed back to the monitor If the instruction execution address argument is specified control is passed to this address If the programming agent is reprogrammed and the instruction execution address argument is not specified control remains within the FLASH memory driver do nothing wait for reset If the FLASH memory driver was downloaded messages are not displayed on the terminal If return from the downloaded driver is not possible and the instruction execution or the local reset option 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 If the FLASH memory driver was not downloaded one or more of the following messages may be displayed on the terminal FLASH Memory PreProgramming Error Address Alignment FLASH Memory PreProgramming Error Address Range FLASH Memory Programming Complete PowerPC EPPCBug Firmware Package User s Manual 4 123 Command Descripti
71. the signal name for signals which are edge significant denotes that the actions initiated by that signal occur on high to low transition In this manual assertion and negation are used to specify forcing a signal to a particular state In particular a Assertion and assert refer to a signal that is active or true a Negation and negate indicate a signal that is inactive or false These terms are used independently of the voltage level high or low that they represent Throughout this manual it is assumed that the MPU on the MBX is programmed to big endian byte ordering Any attempt to use little endian byte ordering immediately renders the EPPCBug debugger unusable PowerPC EPPCBug Firmware Package User s Manual 1 3 Related Documentation Related Documentation The following publications may provide additional helpful information If not shipped with this product they may be purchased by contacting your local Motorola sales office Document Title Motorola Publication Number MBX Series Embedded Controller MBXA IH Installation and Use MBX Series Programmer s Guide MBXA PG PowerPC Microprocessor Family MPCFPE AD The Programming Environments DARPA Internet Request for Comments RFC 792 ISO 9660 Information processing Volume and file structure of CD ROM for information interchange International Organization for Standardization System V Application Binary Interface PowerPC Processor Supplement
72. until this lt LF gt is received If the host system does not echo characters VE still keeps looking for an lt LF gt character before data records are processed For this reason it is required in situations where the host system does not echo characters that the first record transferred by the host system be a header record The header record is not used but the lt LF gt after the header record serves to break VE out of the loop so that data records are processed During a verify operation data from an S record is compared to memory beginning with the address contained in the S record address field plus the offset address if it was specified If the verification fails then the noncomparing record is set aside until the verify is complete and then it is printed out to the screen If three noncomparing records are encountered in the course of a verify operation then the command is aborted PowerPC EPPCBug Firmware Package User s Manual 4 163 Command Descriptions If a nonhexadecimal character is encountered within the data field of a data record then the part of the record which had been received up to that time is printed to the screen and the EPPCBug error handler is invoked to point to the faulty character As mentioned if the embedded checksum of a record does not agree with the checksum calculated by EPPCBug AND if the checksum comparison has not been disabled via the C option then an error condition exists A messag
73. updated with either zero no error or a nonzero error code listing The output parameter block contains the number of blocks actually read This may be less than the number requested in some cases The output parameter block contains a flag indicating whether and EOF mark was detected during the read This flag is only valid when using MSIO_READ with a streaming tape device PowerPC EPPCBug Firmware Package User s Manual 7 17 System Call Routines MSIO_CNFG Code 0302 Description MSIO_CNFG configures the specified mass storage device It effectively performs the IOT command under program control MSIO_CNFG also allows the caller to retrieve the current configuration of the mass storage device Entry Conditions R3 points to the input parameter block Offset Description 0x0 CLUN of device 0x4 DLUN of device 0x8 Current configuration pointer 0xC New configuration pointer R4 points to the output parameter block Offset Description 0x0 System call return status 0x4 Device specific error code If the system call failed due to an error at the device interface level additional device specific error status will be returned in this location Appendix E provides disk tape status error codes 0x8 Reserved 0xC Reserved Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing If the current configuration pointer entry i
74. 0 FA1FFFFF 80000000 DFFFFFFF FA210000 FA21FFFF FC000000 FC7FFFFF Press RETURN to continue S ADDR E ADDR E0000000 E3FFFFFF 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Press RETURN to con DRAM Memory Usage S ADDR E ADDR D ESCRIPTION 5 amp w O ESCRIPTIQ GPCM UPMA UPMA UPMA GPCM GPCM Local DRAM DIMM Memory DIMM Memory NVRAM amp BCS FLASH Memory Memory Bank 0 Bank 1 R PCI I O amp Memory GPCM GPCM QSpan Regis Boot ROM KKK K 22a kK KK KK ZAK KS DESCRIPTION Common Memory Space Common Memory Space Common Memory Space Common Memory Space Attribute Memory Space Reserved Common Memory Space 22222222 lt Common Memory Space Cers PowerPC EPPCBug Firmware Package User s Manual 4 93 Command Descriptions 00000000 OO0003FEF Vector Table 00004000 OOFBCFEF Available to User OOFBD000 OOFFFFFF F W Monitor 4 94 PowerPC EPPCBug Firmware Package User s Manual MMD Memory Map Diagnostic MMD Memory Map Diagnostic Command Input Options Description Examples MMD RANGE DEL INCREMENT B H W B Byte H Half word W Word Use this command 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 add
75. 00 3CA0 0000 2B04 0000 419A 0014 98A3 0000 lt A 00030010 3884 FFFF 3863 0001 4BFF FFEC 4E80 0020 8 8c K N 00030020 FEEF FEFF FEFF FEFF FFFF FFFF FFFF FFFF 00e 00030030 FEEF FEFF FEFF FEFF FFFF FFFF FFFF FFFF e0e 00030040 0000 0000 0000 0000 0000 0000 0000 0000 00030050 0000 0000 0000 0000 0000 0000 0000 0000 00030060 FEEF FEFF FEFF FEFF FFFF FFFF FFFF FFFF 00e 00030070 FEEF FEFF FFFF FEFF FFFF FFFF FFFF FFFF e eeee 00030080 0000 0000 0000 0000 0000 0000 0000 0000 00030090 0000 0000 0000 0000 0000 0000 0000 0000 000300A0 FEEF FEFF FEFF FEFF FFFF FFFF FFFF FFFF 00e 000300BO FEEF FEFF FEFF FEFF FFFF FFFF FFFF FFFF eeee 000300CO 0000 0000 0000 0000 0000 0000 0000 0000 000300D0 0000 0000 0000 0000 0000 0000 0000 0000 000300E0 FEEF FEFF FFFF FEFF FFFF FFFF FFFF FFFF 00e 000300FO FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF essscsocsoo EPPC Bug gt 4 88 PowerPC EPPCBug Firmware Package User s Manual MM Memory Modify MM Memory Modify Command Input Options Description MM ADDR B H W1 SIDILAJIN J DI Integer Data Types B Byte H Half word W Word Floating Point Data Types S Single Precision D Double Precision Use MM to examine and change memory locations MM accepts the both integer and floating point dat
76. 00 Good completion 02 Check condition 04 Condition met good 08 Busy 10 Intermediate good 14 Intermediate condition met good 18 Reservation conflict 22 Command terminated 28 Queue full SIOP Status 00 Good status 01 No operation bits were set 02 Cmd aborted SCSI bus reset 03 Cmd aborted bus device reset message 04 Cmd aborted abort message 05 Cmd aborted abort tag message 06 Cmd aborted clear queue message 07 Data overflow Too much data 08 Data underrun Not enough data 09 Clock faster than 75 MHz 0A Bad Clock parameter ASCII clock value Zero or NonASCII 0B Queue depth too large gt 255 0C Selection timeout 0D Reselection timeout 0E Bus error during a data phase 0F Bus error during a non data phase E 3 SCSI Firmware Status Codes Table E 2 SCSI Firmware Status Codes Continued Code Description 10 Illegal NCR script instruction 11 Command aborted unexpected disconnect 12 Command aborted unexpected phase change 13 SCSI bus hung during command 14 Data phase not expected by user 15 Data phase was in wrong direction 16 Incorrect phase following select 17 Incorrect phase following message out 18 Incorrect phase following data 19 Incorrect phase following command 1A Incorrect phase following status 1B Incorrect phase following rptr message 1C Incorrect phase following sdptr message 1D No
77. 00 R30 00000000 R31 00000000 SPRL 00000000 SPR8 00000000 SPR9 00000000 00100000 4F424D44 WORD S4F424D44 EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 129 Command Descriptions RD Register Display Command Input Arguments Description RD 1 lt DNAME gt lt REG1 gt lt REG2 gt E A qualifier indicating that a device or register range is to be added U n A qualifier indicating that a device or register range is to be removed except when used between two register names In this case it indicates a register range un A qualifier indicating that a device or register range is to be set This character followed by DEF restores the register mask to select those registers originally displayed DNAME A device name or DEF This is used to quickly enable or disable all the registers of a device or functional grouping Use the RD command to display the target state that is the register state associated with the target program Refer to GO Go Execute User Program on page 4 45 The instruction pointed to by the target IP is disassembled and displayed also Internally a register mask specifies which registers are displayed when RD RETURN is executed At reset time this mask is set to display the DEF registers only This register mask can be changed with the RD command The optional arguments allow you to enable or disable the display of any regi
78. 000 EPPC Bug gt 7 U Fh fh PowerPC EPPCBug Firmware Package User s Manual 4 145 Command Descriptions NOSYM Symbol Table Detach Command Input NOSYM Description The NOSYM command allows you to detach a symbol table from the BUG This command is analogous to the system call SYMBOLTD Refer to Chapter Running H F 3 for the description of the system call Example Detach symbol table EPPC Bug gt NOSYM lt CR gt EPPC Bug gt 4 146 PowerPC EPPCBug Firmware Package User s Manual SYMS Symbol Table Display Search SYMS Symbol Table Display Search Command Input Description Examples SYMS symbol name S Use the SYMS command to a Display the attached symbol table a Search the attached symbol table for a particular symbol name a Search the attached symbol table for a set of symbols a Display the attached symbol table in lexicographic ascending ASCII order by using the S option A symbol table must be attached for this command to execute Refer to SYM Symbol Table Attach on page 4 143 Example 1 Display attached symbol table EPPC Bug gt SYMS lt CR gt _stchar 00001020 _ldchar 000028A0 _sizmemory 00004930 EPPC Bug gt Example 2 Search attached symbol table for specified symbol EPPC Bug gt SYMS _ldchar lt CR gt _ldchar 0000280 Bug gt PowerPC EPPCBug Firmware Package User s Manual 4
79. 000 0000 0000 66 EPPC Bug gt EPPC Bug gt EM 21000 2100F 20000 lt CR gt Effective address 00021000 Effective address 0002100F Effective address 00020000 EPPC Bug gt 4 12 PowerPC EPPCBug Firmware Package User s Manual BM Block of Memory Move EPPC Bug gt MD 20000 10 H lt CR gt 0020000 5448 4953 2049 5320 4120 5445 5354 2121 THIS IS A TEST 0020010 0000 0000 0000 0000 0000 0000 0000 0000 EPPC Bug gt Cy oO Example 2 This utility is very useful for patching assembly code in memory Suppose you had a short program in memory at address 20000 EPPC Bug gt MD 20000 2000F DI lt CR gt 00020000 3C401000 ADDIS R2 RO 1000 00020004 60420001 ORI R2 R2 1 00020008 7C631378 OR R3 R3 R2 0002000C 7CA53214 ADD R5 R5 R6 EPPC Bug gt Now you would like to insert an ANDC between the OR instruction and the ADD instruction You should Block Move the object code down four bytes to make room for the ANDC EPPC Bug gt EM 20008 20010 2000C lt CR gt Effective address 00020008 Effective address 0002000F Effective address 0002000C EPPC Bug gt EPPC Bug gt MD 20000 20014 DI lt CR gt 00020000 3C401000 ADDIS R2 RO 1000 00020004 60420001 ORI R2 R2 1 00020008 7C631378 OR R3 R3 R2 0002000C 7C631378 OR R3 R3 R2 00020010 7CA53214 ADD R5 R5 R6 EPPC Bug gt Now you need to simply enter the ANDC at a
80. 0000 00030160 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFE 00030170 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFE 00030180 00000000 00000000 00000000 00000000 00030190 00000000 00000000 00000000 00000000 000301A0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFE MD Memory Display PowerPC EPPCBug Firmware Package User s Manual 4 87 Command Descriptions 000301B0 000301C0 000301D0 FEFEEEEY FEEEEETE FEREEEEE FREEEEEE 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000301E0 FEEEEEEY FREEEETE FEREEEEEE FREEEEEE 000301F0 EPPC Bug gt Example 7 FEEEEEEY FREEEETE FREEEEEE FREEEEEE EPPC Bug gt MDS 30000 B lt CR gt 00030000 3C AO 00 00 2B 04 00 00 41 9A 00 14 98 A3 00 00 lt A 00030010 38 84 FF FF 38 63 00 01 4B FF FF EC 4E 80 00 20 8 8c K N 00030020 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00030030 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF eee eee eee ee 00030040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00030060 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ow ee eee ee eens 00030070 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF eeeeeee EPPC Bug gt Example 8 EPPC Bug gt MDS 30000 H lt CR gt 000300
81. 0000 SPRO 00000000 SPR1 00000000 SPR8 00020014 SPR9 00000000 00030018 4BFFFFEC B 00030004 EPPC Bug gt Remove breakpoint at this location current instruction pointer EPPC Bug gt NOBR lt CR gt BREAKPOINTS 0003001C EPPC Bug gt Continue target program execution EPPC Bug gt G lt CR gt Effective address 00030018 At Breakpoint TP 0003001C MSR 00003030 CR 00000020 FPSCR 00000000 4 46 PowerPC EPPCBug Firmware Package User s Manual GO Go Execute User Program RO 00000000 RI 00020000 R2 FFF0178C R3 00068034 R4 00000000 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPRI 00000000 SPR8 00020014 SPR9 00000000 0003001C 4E800020 BCIR 20 0 EPPC Bug gt Remove breakpoints and restart the target code EPPC Bug gt NOBR lt CR gt BREAKPOINTS EPPC Bug gt EPPC Bug gt GO 30000 lt CR gt Effective address 00030000 The outcome is dependent on the loaded application PowerPC EPPCBug Firmware Package User s Manual 4 47 Command Descriptions
82. 0000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRL 00000000 SPR8 00000000 SPR9 00000000 00100000 4F424D44 WORD 4F424D44 EPPC Bug gt Example 2 EPPC Bug gt plh 20 0 usr tmp ta bin 144 191 24 252 144 191 24 105 144 191 24 252 elvislives lt CR gt Network Booting from MPC860 Controller 20 Device 0 Loading usr tmp ta bin Client IP Address 144 191 24 105 Server IP Address 144 191 24 252 Gateway IP Address 144 191 24 252 Subnet IP Address Mask 255 255 255 0 Boot File Name usr tmp ta bin Argument File Name elvislives 4 128 PowerPC EPPCBug Firmware Package User s Manual PL Program Load Bytes Received amp 524288 Bytes Loaded amp 524288 Bytes Second amp 131072 Elapsed Time 4 Second s IP 00100000 MSR 00003000 CR 00000000 RO 00000000 R1 003B9000 R2 00000000 R3 003F4228 R4 00000000 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 000000
83. 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPRI 00000000 SPR8 00000000 SPR9 00000000 00030004 2B040000 CMPLI CRF6 0 R4 0 At Breakpoint IP 00030008 MSR 00003030 CR 00000040 FPSCR 00000000 RO 00000000 RI 00020000 R2 00000000 R3 00041000 4 158 PowerPC EPPCBug Firmware Package User s Manual TT Trace to Temporary Breakpoint R4 00000100 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPR1 00000000 SPR8 00000000 SPR9 00000000 00030008 419A0014 BC 12 26 0003001C EPPC Bug gt Notice that in the last example that the temporary breakpoint was reached the message at Breakpoint PowerPC EPPCBug Firmware Package User s Manual 4 159 Command Descriptions UPM MPC8xx User Programmable Machine UPM Display Read Write Command Input UPM A B ADDR R W Arguments The first argument to the command specifies which UPM is to be affected The MPC8xx has two UPM machines designated as A and B ADDR Description Specifies the a
84. 0B 0C 1E 1F Direct access magnetic disk Sequential access magnetic tape Printer Processor Write once some optical disks CD ROM Scanner Optical Memory some optical disks Medium Changer jukeboxes 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 4 68 PowerPC EPPCBug Firmware Package User s Manual IOT I O Teach for Configuring Disk Controller 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 The device that has been selected may have any combination of the following parameters and attributes Removable Media N Y N This value should be set to Y if the media is removable floppy CDROM otherwise set the value to N Sector Size 0 128 1 256 2 512 3 1024 4 2048 5 4096 01 0 5 The number of data bytes per sector Block Size 0 128 1 256 2 512 3 1024 4 2048 5 4096 01 0 5 The units in which a transfer count is specified when doing a disk tape block transfer The block size can be smaller equal to or greater than the physical sector size as long as Block Size Number of Blocks Physical Sector Size is an integer Sectors Track 0020 The number of data sectors per track and is a function of the device being accessed an
85. 0_A4 194155 1 0_27_3BFC7C 4 1_E8_005800 4 1_80_00D2A5 2 0_56_3BFF25 6 1_70_031E80 3 0_8F_497EC3 1 0_80_22A8D5 2 5415546894073486_1 6455652147200000_E 0011 7454405384196168_E 0027 0673757930760459_E 0031 0128567218780518_E 0000 6789829960070541_E 0013 1261239200830460_E 0005 0316552343750000_E 0005 E 0000 EPPC Bug gt MDS 30000 lt CR gt 00030000 3CA00000 2B040000 419A0014 00030010 3884FFFF 38630001 4BEFFFEC 4E800 00030020 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00030030 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFE 00030040 00000000 00000000 00000000 00000000 00030050 00000000 00000000 00000000 00000000 00030060 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00030070 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFE 00030080 00000000 00000000 00000000 00000000 00030090 00000000 00000000 00000000 00000000 000300A0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 000300BO FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 000300C0 00000000 00000000 00000000 00000000 000300D0 00000000 00000000 00000000 00000000 000300E0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 000300FO FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00030100 00000000 00000000 00000000 00000000 00030110 00000000 00000000 00000000 00000000 00030120 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00030130 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00030140 00000000 00000000 00000000 00000000 00030150 00000000 00000000 00000000 0000
86. 1000 R4 00000100 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPR1 00000000 SPR8 00020014 SPR9 00000000 00030004 2B040000 CMPLI CRF6 0 R4 0 EPPC Bug gt Trace next instruction EPPC Bug gt lt CR gt IP 00030008 MSR 00003030 CR 00000040 FPSCR 00000000 RO 00000000 R1 00020000 R2 FFFO178C R3 00041000 4 150 PowerPC EPPCBug Firmware Package User s Manual T Trace R4 00000100 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R1 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R2O 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPR1 00000000 SPR8 00020014 SPR9 00000000 00030008 419A0014 BC 12 26 0003001C EPPC Bug gt Trace the next two instructions EPPC Buo gt
87. 13 System Call Routines ClO_ PUTS Code 0204 Description CIO_PUTS outputs a string of characters to the specified port The string must be NULL terminated CIO_PUTS waits until the entire string has been written to the output device before returning CIO_PUTS does not translate transmitted characters Characters are sent to the device exactly as they exist in the buffer No CR to LF or other canonical processing is provided Entry Conditions R3 points to the input parameter block Offset Description 0x0 CLUN of device 0 selects current output device 0x4 DLUN of device 0 selects current output device 0x8 Pointer to string to be sent Note EPPCBug 1 1 supports only CLUN and DLUN of 0 R4 points to the output parameter block Offset Description 0x0 System call return status Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing 7 14 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls ClO_GETS Code 0205 Description CIO_GETS is used to read a string of characters from the specified device into a buffer Input terminates when a RETURN is received CIO_GETS does not write the terminating RETURN into the buffer but instead terminates the string with a NULL character Up until the terminating RETURN is received you may edit and correct input characters using the line editing features of the BUG
88. 147 Command Descriptions Example 3 A Search attached symbol table for all symbols starting with _s EPPC Bug gt SYMS _s lt CR gt _stchar 00001020 _sizmemory 00004930 EPPC Bug gt Example 4 Display attached symbol table in lexicographical order EPPC Bug gt SYMS S lt CR gt _ldchar 000028A0 _sizmemory 00004930 _stchar 00001020 EPPC Bug gt 4 148 PowerPC EPPCBug Firmware Package User s Manual T Trace T Trace Command Input 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 field which defaults to 1 if none entered specifies the number of instructions to be traced before returning control to EPPCBug Breakpoints are monitored but not inserted during tracing for all trace commands Instruction memory must be writable In all cases if a breakpoint with 0 count is encountered control is returned to EPPCBug The trace functions are implemented by inserting traps in the code Therefore the code must be writable and uncached for tracing to be effective Examples The following program resides at location 30000 and breakpoint is specified at location 30014 EPPC Bug gt DS 30000 lt CR gt 00030000 3CAQ0000 ADDIS R5 RO 0 00030004 2B040000 CMPLI CRF6 0 R4 0 00030008 419A0014 BC 12 26
89. 15 BS Block of Memory Search 4 17 Command Input 4 17 Options 4 17 Description 4 17 Examples 4 19 BV Block of Memory Verify 4 22 Command Input 4 22 Options 4 22 Description 4 22 Examples 4 23 CS Checksum a Block of Data 4 25 Command Input 4 25 Options 4 25 Description 4 25 CSAR PCI Configuration Space READ Access 4 27 Command Input 4 27 Options 4 27 Description 4 27 Example 4 27 CSAW PCI Configuration Space WRITE Access 4 28 Command Input 4 28 Options 4 28 Description 4 28 Example 4 28 DC Data Conversion 4 29 Command Input 4 29 Options 4 29 Description 4 29 Examples 4 29 DS One Line Disassembler 4 31 Command Input 4 31 Description 4 31 DTT Display Temperature 4 32 Command Input 4 32 Description 4 32 Example 4 32 DU Dump S Records 4 33 Command Input 4 33 Description 4 33 Examples 4 34 ECHO Echo String 4 35 Command Input 4 35 Description 4 35 Examples 4 35 ENV Edit Environment 4 37 Command Input 4 37 ENV Command Parameters 4 38 GD Go Direct Ignore Breakpoints 4 41 Command Input 4 41 Description 4 41 Examples 4 41 GN Go to Next Instruction 4 43 Command Input 4 43 Description 4 43 Examples 4 43 GO Go Execute User Program 4 45 Command Input 4 45 Description 4 45 Examples 4 45 GT Go to Temporary Breakpoint 4 48 Description 4 48 Examples 4 48 HBD History Buffer Display 4 51 Command Input 4 51 Description 4 51 Examples 4 51 HBX History Buffer Entry Exec
90. 18 4BFFFFEC B 00030004 0003001C 4800020 BCLR 20 0 EPPC Bug gt Set a breakpoint EPPC Bug gt BR 20014 lt CR gt BREAKPOINTS 00020014 EPPC Bug gt Set IP to start of program set temporary breakpoint and start target code EPPC Bug gt RM IP lt CR gt IP 00020010 20000 lt CR gt EPPC Bug gt EPPC Bug gt GT 20010 lt CR gt Effective address 00020010 Effective address 00020000 At Breakpoint IP 00020010 MSR 00003030 CR 00000040 FPSCR 00000000 RO 00000000 RL 00020000 R2 FFFO178C R3 00041000 R4 000000FE R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPRL 00000000 SPR8 00020014 SPR9 00000000 00020010 4800FFF1 BL 00030000 EPPC Bug gt Set another temporary breakpoint at 20000 and continue the target program execution EPPC Bug gt GT 20000 lt CR gt Effective address 00020000 Effective address 00020010 At Breakpoint IP 00020014 MSR 00003030 CR 00000020 FPSCR 00000000 RO 00000000 RL 00020000 R2 FFFO178C R3 000410FE PowerPC EPPCBug
91. 19 Command Descriptions Mode 1 using RANGE with count and size option count is displayed in decimal and address of each occurrence of the string is output EPPC Bug gt BS 30000 18 2F2F H lt CR gt Effective address 00030000 Effective count amp 48 00030012 2F2F EPPC Bug gt Mode 2 using RANGE with count count is displayed in decimal bytes and the data pattern is found and displayed EPPC Bug gt BS 30000 3002F 3D34 lt CR gt Effective address 00030000 Effective address 0003002F not found EPPC Bug gt Mode 2 the default size is word and the data pattern is not found so a message is output EPPC Bug gt BS 30000 3002F 3D34 HN lt CR gt Effective address 00030000 Effective Address 0003002F 0003000F 3D34 EPPC Bug gt Mode 2 the size is half word and non aligned option is used so the data pattern is found and displayed EPPC Bug gt BS 30000 30 60 F0 B lt CR gt Effective address 00030000 Effective count amp 48 00030006 6F 0003000B 61 00030015 6F 00030016 6E 00030017166 00030018 69 00030019 67 00030018B 61 0003001C 62 0003001D 6C 0003001E 65 00030021 61 EPPC Bug gt 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 EPPC Bug gt BS 3000 1FFFF 0000 OO0F VH lt CR gt Effective address 00003000 Effective address 0001FFFF 0000C000 E501 0001E224 A
92. 30E 4 20 PowerPC EPPCBug Firmware Package User s Manual BS Block of Memory Search EPPC Bug gt Mode 3 on a different block of memory mask option scan for words with low nibble nonzero two locations failed to verify PowerPC EPPCBug Firmware Package User s Manual 4 21 Command Descriptions BV Block of Memory Verify Command Input Options Description BV RANGE DEL data increment B H W Where data and increment are both expression parameters B Byte H Half word W Word The BV command compares the specified range of memory against a data pattern If an increment is specified then data is incremented by this value following each comparison otherwise data remains a constant value A decrementing pattern may be accomplished by entering a negative increment The data you entered is right justified in either a byte half word or word field as specified by the option selected The default field length is Word If the user entered data or increment if specified do not fit into the data field size then leading bits are truncated to make them fit If truncation occurs then a message is printed stating the data pattern and if applicable the increment value actually used If the range is specified using a count then the count is assumed to be in terms of the data size If the upper address of the range is not on the correct boundary for an integer multiple of the data to
93. 3FF2COC O8FF2C00 O3FF2COC 28 O8FF2CO0 33FF6COF FEFFECO7 FFEFECO7 2C FFFFECO7 FEFFECO7 FEFFECO7 FFEFECO7 Periodic Timer Expired 30 COFFECO4 O7FFECO4 3EFFECO7 FFFEECO7 34 FFFFECO7 FEFFECO7 FEFFECO7 FFEFECO7 38 FFFFECO7 FEFFECO7 FEFFECO7 FFEFECO7 Exception 3C FFFFECO7 FEFFECO7 FEFFECO7 FFEFECO7 EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 161 Command Descriptions VE Verify S Records Against Memory Command Input VE n ADDR X C text Ignore checksum A checksum for the data contained within an S Record 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 Echo Echoes the S records to your terminal as they are read in at the host port Allows you to specify which port is to be used for the downloading It is optional If the port number is not specified but the ADDR option is specified VE must be separated from ADDR by two commas If this number is omitted port 1 is assumed An offset address that is added to the address contained in the address field of each record It is optional This causes the records to be compared to memory at different locations than would normally occur The contents of the automatic offset register are not add
94. 4 SPR9 00000000 00040000 7C8402A6 MFSPR R4 4 EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 77 Command Descriptions MA NOMA Macro Define Display Delete Command Input Description MA NAME L NOMA NAME The NAME can be any combination of 1 8 alphanumeric characters The MA command defines a complex command consisting of any number of debugger primitive commands with optional parameter specifications Use the NOMA command to delete either a single macro or all macros Entering MA without specifying a macro name causes the debugger to list all currently defined macros and their definitions When MA is invoked with the name of a currently defined macro that macro definition is displayed Line numbers are shown when displaying macro definitions to facilitate editing via the MAE command If MA is invoked with a valid name that does not currently have a definition then the debugger enters the macro definition mode In response to each macro definition prompt Ms enter a debugger command and press RETURN Commands entered are not checked for syntax until the macro is invoked To exit the macro definition mode enter only a RETURN null line in response to the prompt If the macro contains errors it can either be deleted and redefined or it can be edited with the MAE command A macro containing no primitive debugger commands i e no definition is not accepted Macro definitions are stored in a strin
95. 5_E 10 4 876E 34 lt CR gt 2 1 023E101 lt CR gt 044 E 99 1_7FF_FFFFFFFFFFFFF lt CR gt O E OE O 00020020 9 876230000000 00020028 1 00008764231_F 00020030 4 578900000000 EPPC Bug gt ow oO EPPC Bug gt MD 20000 7 D lt CR gt 00020000 0_3FF_3333333333333 1 2000000000000000_E 0000 00020008 O_400_0000000000000 2 0000000000000000_E 0000 00020010 0_422_449F2EOFFFFFEF 4 3569999999999992_F 0010 00020018 0_2B7_830E4EB15FA1B 2 7650000000000032_E 0099 00020020 1_390_4410D74F66DA5 4 8760000000000030_E 0034 00020028 1_54F_762B1924BFDD5 1 0230000000000001_E 0101 00020030 1_7FF_FFFFFFFFFFFFF 0 FFFFFFFFFFFFF000_E 0OFFF EPPC Bug gt 4 92 PowerPC EPPCBug Firmware Package User s Manual MMAP Memory Map Display Command Input MMAP Description MMAP Memory Map Display MMaAP displays information about the memory map of the MPC8xx as configured by EPPCBug Examples EPPC Bug gt mmap lt cr gt IMR FA200000 YAO BP WN FEF OO YAO BP WN EF OO PC8xx Address Decode CS PS PE 32 32 0 32 32 22222222 ee PC8xx PCMCIA Interface Decode PS 16 H 5 D A D A a a A 5 D PP SP PP PP co Oo 09 tinue S ADDR E ADDR FE000000 FEVFEFEF 00000000 OOFEFEEFF 00000000 FFFFFFFF 00000000 FFFFFFFF FA00000
96. 7 49 System Call Routines SCREV Code 0F03 Description SCREV returns a value which describes which revision of the system call interface the firmware adheres to Initially the revision number will be 1 As new system calls are added or program visible changes are made to the system call interface the revision number will be updated to allow programs to dynamically determine which features of the system call interface are available Entry Conditions R4 points to the output parameter block Offset Description 0x0 System call return status 0x4 System call interface revision number Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing 7 50 PowerPC EPPCBug Firmware Package User s Manual S Record Output Format The S record format for output modules specifically supports the encoding of programs or data files in a printable format for transportation between computer systems The transportation process can then be visually monitored and the S records can be more easily edited S Record Content When you view S records they appear as character strings made of several fields which identify the record type record length memory address code data and checksum Each byte of binary data is encoded as a two character hexadecimal number a The first character representing the high order 4 bits a The second the low order 4 bits of the
97. A 0002002F F EPPC Bug gt ook fw WW Mismatches are printed out PowerPC EPPCBug Firmware Package User s Manual 4 23 Command Descriptions Example 3 Assume memory from 20000 to 2002F is as indicated EPPC Bug gt MD 20000 18 H lt CR gt 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 EPPC Bug gt EPPC Bug gt BV 20000 18 0 1 H lt CR gt Effective address 00020000 Effective count amp 48 00020012 FFFF EPPC Bug gt Size is half word mismatches are printed out 4 24 PowerPC EPPCBug Firmware Package User s Manual CS Checksum a Block of Data CS Checksum a Block of Data Command Input CS RANGE B H W Options B Byte H Half word W Word Description The Checksum command provides access to the same checksum routine used by the power up self test firmware This routine is used in two ways within the firmware monitor The option field serves both as a data size identifier and scale factor if a COUNT is specified as part of the RANGE The size option is byte half word or word for the items checked The default data size is Word At power up the power up confidence test is executed One of the items verified is the checksum contained in the firmware monitor EPROM If for any reason the contents of the EPROM were to change from the factory version the checksu
98. Bug gt NOMA lt CR gt EPPC Bug gt Example 9 List all currently defined macros EPPC Bug gt MA lt CR gt O MACROS DEFINED EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 81 Command Descriptions MAE Macro Edit Command Input Options Description MAE NAME LINE STRING NAME Any combination of 1 8 alphanumeric characters LINE The line number 1 999 of the macro to be replaced or inserted STRING The character line to be inserted or replaced The MAE command modifies the macro named in the command line MAE is line oriented and supports the following actions insertion deletion and replacement To insert a line specify a line number between the numbers of the lines that the new line is to be inserted between The text of the new line to insert must also be specified on the command line following the line number To replace a line specify its line number and enter the replacement text after the line number on the command line A line is deleted if its line number is specified and the replacement line is omitted Attempting to delete a nonexistent line results in an error message being displayed MAE does not permit deletion of a line if the macro consists only of that line NOMA must be used to remove a macro To define new macros use MA the MAE command operates only on previously defined macros Line numbers serve one purpose spec
99. C Bug gt LoO 65000000 X cat test mx lt CR gt F 80002000000000650400006504002412 The S records are echoed to the terminal because of the X option The offset address of 65000000 was added to the addresses of the records in TEST MX and caused the program to be loaded to memory starting at 40000 The text cat test mx is a SYSTEM V command line that caused the file to be copied by SYSTEM V to the port which is connected with the debugger host s host port e lt e 15 EPPC Bug gt EPPC Bug gt DS 40000 40014 lt CR gt 0040000 7C8402A6 MESPR 0040004 90830000 SIW 0040008 7C8502A6 MESPR 004000C 90830004 SIW 0040010 4 amp 800020 BCLR R4 4 R4 0 R3 R4 5 00041000 R4 4 R3 00041004 20 0 The target IP now contains the entry point of the code in memory 40000 EPPC Bug gt RD lt CR gt IP 00040000 MSR 00003030 CR 00000020 FPSCR 00000000 RO 00000000 R1 00020000 R2 FFF0178C R3 00041000 R4 00000000 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPR1 00000000 SPR8 0002001
100. CA00000 ADDIS 00030004 28040000 CMPLI 00030008 419A0014 BC 0 0 003000C 98A30000 STB 0030010 3884FEFFF ADDI a A breakpoint with 0 count was found a The ABORT or RESET switch on the debugger host was a An unexpected exception occurred at 30000 R5 RO 0 CRF 6 0 R4 0 12 26 0003001C R5 0 R3 000410FE R4 R4 SEFFFFFFE PowerPC EPPCBug Firmware Package User s Manual 4 45 Command Descriptions 00030014 38630001 ADDI R3 R3 1 00030018 4BFEFFEC B 00030004 0003001C 4800020 BCLR 20 0 EPPC Bug gt Initialize R3 R4 set some breakpoints and start the target program EPPC Bug gt PM R3 lt CR gt R3 000410FE 68000 lt CR gt R4 00000000 34 lt CR gt EPPC Bug gt EPPC Bug gt BR 30018 3001C lt CR gt BREAKPOINTS 00030018 0003001C EPPC Bug gt EPPC Bug gt GO 30000 lt CR gt Effective address 00030000 At Breakpoint IP 00030018 MSR 00003030 CR 00000040 FPSCR 00000000 RO 00000000 R1 00020000 R2 FFF0178C R3 00068001 R4 00000033 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R1 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R1 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 0000
101. Control for Disk IOI I O Inquiry IOP I O Physical to Disk IOT I O Teach for Configuring Disk Controller LO Load S Records from Host MA NOMA Macro Define Display Delete MAE Macro Edit MAL NOMAL Enable Disable Macro Expansion Listing MD MDS Memory Display MM Memory Modify MMAP MPC8xx Memory Map Display MMD Memory Map Diagnostic MS Memory Set MW Memory Write NIOC Network I O Control NIOP Network I O Physical NIOT I O Teach for Configuring Network Controller NPING Network Ping OF Offset Registers Display Modify PA NOPA Printer Attach Detach PF NOPF Port Format Detach PFLASH Program FLASH Memory PL Program Load PLH Program Load and Halt RD Register Display RESET Cold Warm Reset RL Read Loop RM Register Modify RS Register Set SD Switch Directories SET Set Time and Date 4 2 PowerPC EPPCBug Firmware Package User s Manual Table 4 1 Debugger Commands Command Title Mnemonic SYM NOSYM Symbol Table Attach Detach SYMS Symbol Table Display Search T Trace TA Terminal Attach TIME Display Time and Date TM Transparent Mode TT Trace to Temporary Breakpoint UPM MPC8xx User Programmable Memory UPM Display Read Write VE Verify S Records Against Memory VER Revision Version Display VPD VPD Vital Product Data Display WL Write Loop Each of the individual commands is described in the following pages The command syntax is sho
102. DEL Delimiter either a comma or a space EXP Expression described in detail in a following section ADDR Address described in detail in a following section COUNT Count the syntax is the same as for EXP RANGE A range of memory addresses which may be specified either by ADDR DEL ADDR or by ADDR COUNT TEXT An ASCII string of up to 255 characters delimited at each end by the single quote mark PowerPC EPPCBug Firmware Package User s Manual 3 3 How to Enter Debugger Command Lines Expression as a Parameter An expression can be one or more numeric values separated by the arithmetic operators plus minus multiplied by divided by logical AND amp shift left lt lt or shift right gt gt Numeric values may be expressed in either hexadecimal decimal octal or binary by immediately preceding them with the proper base identifier Data Type Base Identifier Examples Integer Hexadecimal FFFFFFFF Integer Decimal amp amp 1974 amp 10 amp 4 Integer Octal 456 Integer Binary 1000110 If no base identifier is specified then the numeric value is assumed to be hexadecimal A numeric value may also be expressed as a string literal of up to four characters The string literal must begin and end with the single quote mark The numeric value is interpreted as the concatenation of the ASCII values of the characters This value is right justified as any ot
103. D_FMC 0x0B define VPD_PID VLSI Ox0C define VPD_PID_TERM OxEF VPD structure format ay define VPD_EYE SIZE 8 typedef struct vpd_header UCHAR eyecatcher VPD_EYE_SIZE USHORT size VPD_HEAD ER define VPD_DATA SIZI Vital Product Data serial number ASCII product configuration options binary internal clock speed in HZ integer external clock speed in HZ integer reference clock speed in HZ integer ethernet address binary microprocessor type ASCII ROM CRC integer FLASH memory configuration binary VLSI revisions versions binary termination T eyecatcher size eyecatcher MOTOROLA size of EEPROM Gl VPD F typedef struct ved VPD_HEADFR header UCHAR packets VPD_DATA_SIZE VPD r packet tuple structure format g4 typedef struct vpq packet UCHAR identifier UCHAR size UCHAR data 1 VPD_PACKI Notes 9b SR E ET ROM_SIZE sizeof VPD_HEADER header data identifier PIDs above size of the following data area data size is dependent upon PID BX product configuration options bit definitions 1 The bit mumbering is reversed in perspec
104. EPPCBug Firmware Package User s Manual Version 1 1 EPPCBUGA1 UM1 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 No part of this material may be reproduced or copied in any tangible medium or stored in a retrieval system or transmitted in any form or by any means radio electronic mechanical photocopying recording or facsimile or otherwise without the prior written permission of Motorola Inc It is possible that this publication may contain reference to or information about Motorola products machines and programs programming or services that are not announced in your country Such references or information must not be construed to mean that Motorola intends to announce such Motorola products programming or services in your country Restricted Rights Legend If the documentation contained herein is supplied directly or indirectly to the U S Government the following notice shall apply unless otherwise agreed to in writing by Motorola Inc Use duplication or disclosure by the Government is subject to restrictions as set forth in subparagraph c 1 i
105. FF FF FF FF FF EF FF FF FF FF FF FF FF FF ow eee eee enone ODO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF on wee ee ee ee ees OEO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF on ee ee ee ee ees OFO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FPF FF on ee ee ee ee eee 100 80 08 02 OA OA 01 20 00 01 3C OF 00 00 10 00 00 Kiser 110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 IBO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1cO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 IDO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 IEO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 IFO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 The optional DIMM module socket does not suppo
106. FFF 8M Boot ROM Oor7 5 8 9 128 256 512K FE800000 FFFFFFFF 24M Reserved 6 Notes 1 Dependent upon the size of memory installed plugged into the DIMM slot the onboard memory may or may not be located at address 00000000 If the size of the installed memory is larger than the onboard memory then the installed memory should be located at address 00000000 When configuring the bank address registers of the MPC821 860 the base address of the bank must be a modulus of the bank size For example If a bank was 32Mb it can only be located at addresses 00000000 02000000 04000000 06000000 2 The location of these address spaces are dependent upon the presence of the PCI bus host bridge These address spaces are programmable via the PCI bus host bridge device QSpan 3 The size of these address spaces is queried from the SROM device 4 The presence of the PCI bus host bridge device is queried from the SROM device 5 These address spaces are smaller than the indicated size The actual decode is dependent upon the device Address wrapping may occur 6 Access to any reserved unused address space either perform a machine check or return useless data 7 These address spaces share a common chip select the specified selection is further decoded by the appropriate address lines PowerPC EPPCBug Firmware Package User s Manual 2 13 I O and Memory Address Map 8 10 11 12 13
107. FLASH Memory write error Bit 5 Verification read after write error Bit 6 Time Out during erase operation Bit 7 Time Out during byte write operation Bit 8 Unexpected manufacturer identifier read from the device Bit 9 Unexpected device identifier read from the device Bit 10 Unable to initialize the FLASH device to zero Bit 14 FLASH Memory program control driver downloaded Bit 15 No return possible to caller Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing 7 42 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls SYMBOLTA Code 0700 Description SYMBOLTA attaches a symbol table to the debugger When a symbol table is 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 displays with the corresponding symbol name and offset if any from the symbol base address symbol data In addition to the display any command line input that supports an address as an argument can now take a symbol name for the address argument The address argument is first looked up in the symbol table to see if it matches any of the addresses symbol data before conversion takes place This command is analogous to the debugger command SYM Refer to Chapter Running H F 3 for the command description Entry Condi
108. I TDM 11 00 FDC37C67X LPT Ethernet 20 00 MPC821 860 SCC1 21 00 PCI DEC21040 DEC21140 FLASH 40 00 Hosted 01 PCMCIA TBD PowerPC EPPCBug Firmware Package User s Manual B 1 Device Interface Identifiers CLUN DLUN Pairs Table B 1 Device Interface Device Identifiers CLUN DLUN Device Interface Class Mass Storage CLUN DLUN Interface Controller Specific Device 80 00 W83C553F EIDE 1 Master 01 EIDE 2 Slave 81 00 FDC37C67X FDC 01 IDE 1 Master 02 IDE 2 Slave 82 00 PCI IDO 10 SYMBIOS 810 825 875 ID1 25 ADAPTEC 2940 2940W foz 30 ID3 40 ID4 50 ID5 60 ID6 70 ID7 SCSI Host 80 ID8 90 ID9 AO ID10 BO ID11 co ID12 DO ID13 EO ID14 FO ID15 83 00 PCMCIA IDE Even though the table lists all possible CLUN DLUN combinations not all of these devices are available and are dependent upon the hardware product being used PowerPC EPPCBug Firmware Package User s Manual Device Interface Floppy Drive Configuration Parameters The following table lists the parameters used for configuring floppy disk drives with the IOT command and the MSIO_CNFG system call Notes 1 All numerical parameters are in hexadecimal unless otherwise noted 2 PS2 is the default format for EPPCBug Table B 2 Floppy Drive Parameters
109. If you disturb resources upon which EPPCBug depends then the debugger may function unreliably or not at all If your application enables translation through the Memory Management Unit MMU and utilizes resources of the debugger system calls your application must create the necessary translation tables for the debugger to have access to its various resources The debugger honors the enabling of the MMU It does not alter disable translation EPPCBug Vector Table and Workspace The debugger and diagnostic firmware resides in EPROM The last 128Kb of RAM are also used by the debugger for storage of the vector table executable code variables and stack 3 8 PowerPC EPPCBug Firmware Package User s Manual Using the EPPCBug Debugger Hardware Functions The only hardware resources used by the debugger are the EIA 232 D ports which are initialized to interface to the debug terminal If these ports are reprogrammed the terminal characteristics must be modified to suit or the ports should be restored to the debugger set characteristics prior to reinvoking the debugger Exception Vectors Used by EPPCBug These exception vectors are reserved for use by the debugger 00100 System Reset Used for the ABORT Switch soft reset feature 00700 Program Used for instruction breakpoints 00C00 System Call Used for the System Call Handler Note that revision 1 1 of the EPPCBug this feature is not supported 00D00 Used for instruct
110. Installation and Startup 2 6 Hardware Initialization 2 7 Restarting the System 2 9 Reset 2 9 Break 2 9 Diagnostic Facilities 2 11 Memory Requirements 2 11 I O and Memory Address Map 2 12 Terminal Input Output Control 2 15 How to Enter Debugger Command Lines 3 1 Control Characters 3 2 Syntactic Variables 3 3 Expression as a Parameter 3 4 Address as a Parameter 3 5 Address Formats 3 5 Offset Registers 3 6 Port Numbers 3 7 EPPCBug Port Numbers 3 7 How to Enter and Debug Programs 3 7 Call System Utilities from User Programs 3 8 Preserve the Debugger Operating Environment 3 8 EPPCBug Vector Table and Workspace 3 8 Hardware Functions 3 9 Exception Vectors Used by EPPCBug 3 9 MPU CPU Registers 3 10 MPU Register SPR272 3 10 MPU Registers SPR273 SPR275 3 10 Context Switching 3 10 Floating Point Support 3 11 Single Precision Real 3 12 Double Precision Real 3 12 Scientific Notation 3 13 Command Descriptions 4 1 AS One Line Assembler 4 4 Command Input 4 4 Description 4 4 BC Block of Memory Compare 4 5 Command Input 4 5 Options 4 5 Description 4 5 Examples 4 5 BF Block of Memory Fill 4 7 Command Input 4 7 Options 4 7 Description 4 7 Examples 4 8 BI Block of Memory Initialize 4 10 Command Input 4 10 Options 4 10 Description 4 10 Examples 4 10 BM Block of Memory Move 4 12 Command Input 4 12 Options 4 12 Description 4 12 Examples 4 12 BR Breakpoint Insert Delete 4 15 Command Input 4 15 Description 4 15 Examples 4
111. MBOOT images Binary Program Execution Offset 00000100 This parameter defines the offset from the Binary Program Load Address that you use to establish the initial instruction pointer value for binary images This parameter does not affect the initial instruction pointer for either ELF or ROMBOOT images PowerPC EPPCBug Firmware Package User s Manual 4 39 Command Descriptions Primary Network Controller LUN 20 Primary Network Device LUN 00 Together these parameters define the network device which is to be considered the primary network controller in the system The networking parameters for the primary network controller are saved within the primary network controller NVRAM area Firmware Command Buffer NULL terminates entry The Firmware Command Buffer contents contain the BUG commands which are executed upon firmware startup BUG commands you will place into the command buffer should be typed just as you enter the commands from the command line The string NULL on a new line terminates the command line entries All BUG commands except for the following may be used within the command buffer DU ECHO LO PA TA VE Execution of a BUG commands file via PL Note Interactive editing of the startup commands buffer is not supported If changes are needed to an existing set of startup commands a new set of commands with changes must be reentered 4 40 PowerPC EPPCBug Firmware Package User
112. MPC821 based application FF N A Termination Packet follows the last N A initialized data packet Notes 1 The data size is variable Its actual size is dependent upon the product configuration or type This packet may be omitted if the Ethernet interface is nonexistent Integer values are formatted and stored in big endian byte ordering This packet may contain an additional byte following the address data This additional byte indicates the Ethernet interface instance number This additional byte would be specified in applications where the host product supports multiple Ethernet interfaces For each Ethernet interface present the instance number would be incremented by one starting with zero PowerPC EPPCBug Firmware Package User s Manual Vital Product Data Product Configuration Options Data The product configuration options data packet consists of a binary bit field The first bit of the first byte is bit 0 PowerPC bit numbering An option is said to be present when the assigned bit is a one The following table s further describe the product configuration options VPD data packet Table A 2 MBX Product Configuration Options Data eed Bit Mnemonic Bit Description 0 PCO_BBRAM Battery Backed RAM BBRAM and Socket 1 PCO_BOOTROM Boot ROM and Socket i e socketed FLASH 2 PCO_KAPWR Keep Alive Power Source Lithium Battery and Control Circui
113. Manual 4 71 Command Descriptions Gap 3 00 The number of words of zeros that are written after the data fields during format commands Gap 4 00 The number of words of zeros that are written after the last sector of a track and before the index pulse Spare Sectors Count 00 The number of sectors per track allocated as spare sectors These sectors are only used as replacements for bad sectors on the disk 4 72 PowerPC EPPCBug Firmware Package User s Manual LO Load S Records from Host LO Load S Records from Host Command Input LO n ADDR XILCIIT text Description This command downloads Motorola S record files from a host system to the debugger host The LO command accepts serial data from the host and loads it into memory Downloading S records can be at any baud rate supported by both the bug and the host system If the X option is specified ensure the baud rate of the host system is less than or equal to the baud rate of the console If there are any problems loading the records reduce the baud rate of the host n Allows you to specify which port is to be used for the downloading If the port number is not specified but the ADDR option is specified LO must be separated from ADDR by two commas If this number is omitted port 1 is assumed ADDR Allows you to enter an offset address which is to be added to the address contained in the address field of each record This causes the records to
114. N DLUN definitions can be found in Appendix B of this manual Some system calls support additional special case CLUN DLUNs For example the character IO system calls CIO_ accept a CLUN DLUN pair of 0 0 as meaning the current BUG console I O device Individual system call man pages describe any special case treatment of CLUN DLUN pairs PowerPC EPPCBug Firmware Package User s Manual 7 3 System Call Routines System Call Routines The system call routines are described in order by the 16 bit hex code When you enter firmware system call routines the machine state is saved so that a subsequent abort or break condition allows you to resume if you wish Table 7 1 System Calls System Calls Sorted By Type and ID Character IO System Calls CIO_READ 0200 Read receive character s from the specified serial I O device CIO_WRIT 0201 Write transmit character s to the specified serial I O device This call is also capable of a sending a break character CIO_STAT 0202 Retrieve status of the specified serial I O device Empty full status on read write queues Break condition status CIO_CNFG 0203 Configure query the specified serial I O device s operating parameters baud rate character word size CIO_PUTS 0204 Transmit the NULL terminated string variable in length to the specified serial I O device The NULL character is not transmitted CIO_GETS 0205 Receive string variable numbe
115. O 00000000 R1 00020000 R2 FFF0178C R3 000410FE R4 00000000 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 RI 00000000 R15 00000000 R16 00000000 R17 00000000 R1 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPRL 00000000 SPR8 00020014 SPR9 00000000 00020014 80620000 LWZ R3 0 R2 S FFFO178C EPPC Bug gt 4 44 PowerPC EPPCBug Firmware Package User s Manual GO Go Execute User Program GO Go Execute User Program Command Input GO ADDR Description The GO command alternate form G is used to initiate 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 If a breakpoint is set at the target IP address the instruction at the target IP is traced executed in trace mode 3 All breakpoints are inserted in the target code 4 Target code execution resumes at the target IP address At this point control may be returned to EPPCBug by various conditions pressed Examples The following program resides EPPC Bug gt DS 30000 lt CR gt 00030000 3
116. PPCBug Firmware Package User s Manual RESET Cold Warm Reset RESET Cold Warm Reset Command Input 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 In this mode all the static variables are initialized every time a reset is done WARM In this mode all the static variables are preserved when a reset exception occurs This is convenient for keeping breakpoints offset register values the target register state and any other static variables in the system Examples Set to warm start EPPC Bug gt RESET lt cr gt Cold Wamm Reset C W C C lt cr gt Execute Local SCSI Bus Reset Y N N Y lt cr gt Execute MPC8xx Reset Y N N Y lt cr gt Copyright Motorola Inc 1988 1997 All Rights Reserved MBXC Debugger Diagnostics Release Version 0 3 05 01 97 COLD Start Local Memory Found 01000000 amp 16777216 PU Clock Speed 25Mhz EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 135 Command Descriptions Dependent on the environment configuration control may passed to a various boot control command self test the system mode menu or the debugge
117. PPCBug FlashROM is installed on the MBX module for EPPCBug to operate properly with the MBX follow this general set up procedure and the details given in the module specific manual Note that inserting or removing components or modules while power is applied could damage module components 1 Turn all equipment power OFF Refer to the individual module hardware manual and install remove jumpers on headers and or set configuration switches as required for your particular application Be sure that the EPPCBug Flash ROM is installed in the proper socket on the MBX board Refer to the module specific manual for details Refer to the set up procedure for your particular chassis or system for details concerning the installation of the MBX Connect the terminal which is to be used as the EPPCBug system console to the default debug EIA 232 D port at the proper location described in the MBX hardware manual Set up the terminal as follows Eight bits per character One stop bit per character Parity disabled no parity Baud rate 9600 baud default baud rate of MBX ports at power up After power up the baud rate of the debug port can be reconfigured by using the Port Format PF command of the EPPCBug debugger In order for high baud rate serial communication between EPPCBug and the terminal to work the terminal must do some form of handshaking If your terminal does not do hardware 2 6 P
118. R 00000020 RO 00000000 R1 00020000 R2 FFFO178C R3 00041000 R4 22EDB280 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPR1 00000000 SPR8 00020014 SPR9 00000000 00040010 4 amp 800020 BCLR 20 0 EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 133 Command Descriptions Example 4 Set the display to R2 and R31 only Note that this sequence sets the display to R2 only then adds register R31 to the display EPPC Bug gt RD R2 R31 lt CR gt R2 FF0178C R31 00000000 00040010 4800020 BCLR 20 0 EPPC Bug gt Example 5 Restore the display to the original set EPPC Bug gt RD DEF lt CR gt IP 00040010 MSR 00003030 CR 00000020 RO 00000000 R1 00020000 R2 FFF0178C R3 00041000 R4 22EDB280 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R1 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R1 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPR1 00000000 SPR8 00020014 SPR9 00000000 00040010 4800020 BCLR 20 0 EPPC Bug gt 4 134 PowerPC E
119. R1 00020000 lt CR gt R2 FFF0178C lt CR gt R3 00041000 lt CR gt R4 22FDB280 lt CR gt R5 00000000 lt CR gt R6 00000000 lt CR gt R7 00000000 lt CR gt R8 00000000 lt CR gt R9 00000000 lt CR gt R10 00000000 lt CR gt 4 138 PowerPC EPPCBug Firmware Package User s Manual RM Register Modify R11 00000000 lt CR gt R12 00000000 lt CR gt R13 00000000 lt CR gt R14 00000000 lt CR gt R15 00000000 lt CR gt R16 00000000 lt CR gt R17 00000000 lt CR gt R18 00000000 lt CR gt R19 00000000 lt CR gt R20 00000000 lt CR gt R21 00000000 lt CR gt R22 00000000 lt CR gt R23 00000000 lt CR gt R24 00000000 lt CR gt R25 00000000 lt CR gt R26 00000000 lt CR gt R27 00000000 lt CR gt R28 00000000 lt CR gt R29 00000000 lt CR gt R30 00000000 lt CR gt R31 00000000 lt CR gt SPR1 00000000 lt CR gt SPR8 00020014 lt CR gt SPR9 00000000 lt CR gt SPR18 40000000 lt CR gt SPR19 FFEC0000 lt CR gt SPR22 16A30500 lt CR gt SPR25 00000000 lt CR gt SPR26 00040010 lt CR gt SPR27 00083030 lt CR gt SPR268 00000000 lt CR gt SPR269 00000000 lt CR gt SPR272 00004210 lt CR gt SPR273 00000000 lt CR gt SPR274 00000000 lt CR gt SPR275 00000000 lt CR gt SPR284 00083030 lt CR gt SPR285 00083030 lt CR gt SPR287 00000000 lt CR gt IP 00040010 lt CR
120. RFS Decimal BI Decimal BO Decimal CRBD Decimal D Signed Hexadecimal DS Signed Hexadecimal FM Hexadecimal FRA Decimal FRB Decimal FRC Decimal FRS Decimal PowerPC EPPCBug Firmware Package User s Manual 5 7 Mnemonics and Delimiters FRD CRM L LI MB ME NB RA RB RS RD SH SIMM SPR TO IMM UIMM Decimal Hexadecimal Decimal Signed Hexadecimal Decimal Decimal Decimal Decimal Decimal Decimal Decimal Decimal Signed Hexadecimal Decimal Decimal Decimal Hexadecimal The assembly disassembly format of the instruction mnemonics and operands follow the syntax as specified in the PowerPC Microprocessor Family The Programming Environments The required fields are in boldface type and the variable fields are not Fields are one or more characters in length 5 8 PowerPC EPPCBug Firmware Package User s Manual One Line Assembler Disassembler Character Set The character set recognized by the EPPCBug assembler is a subset of ASCII and are listed as follows 1 The letters A through Z uppercase and lowercase 2 The integers 0 through 9 3 Arithmetic operators lt lt gt gt amp 4 Parentheses 5 Characters used as special prefixes dollar sign specifies a hexadecimal number amp ampersand specifies a decimal number commercial at sign specifies an octal number percent sign specifies a binary number apostrophe specifies an ASCII literal c
121. SSYMBOLTD 0701 Detach symbol table disable symbol table lookup Miscellaneous System Calls RETURN OFOO Return control back to the F W DELAY OFO1 Delay for a number of time units BRDINFO 0F02 Retrieve board information block SCREV 0F03 Retrieve system call interface version PowerPC EPPCBug Firmware Package User s Manual 7 5 System Call Routines ClO READ Code 0200 Description CIO_READ reads bytes from the specified serial device into the buffer specified by the caller CIO_READ does not translate received characters Characters are placed into the buffer exactly as received No CR to LF or other canonical processing is provided CIO_READ does not wait for all requested characters to be received before returning It reads characters from the input device into the buffer until no more characters are available or the number of bytes requested is read Entry Conditions R3 points to the input parameter block Offset Description 0x0 0x4 CLUN of device 0 selects current input device DLUN of device 0 selects current input device 0x8 Pointer to input buffer 0xC 0x10 Numter of bytes requested Reserved must be 0 Note EPPCBug 1 1 supports only CLUN and DLUN of 0 R4 points to the output parameter block Offset 0x0 Description System call return status 0x4 Number of bytes actua
122. SYSCALL System Call Directive on page 5 12 respectively for further details 5 2 PowerPC EPPCBug Firmware Package User s Manual One Line Assembler Disassembler Comparison with PowerPC Standard Assembler There are several major differences between the EPPCBug assembler and the PowerPC Standard Assembler a The resident assembler is a two pass assembler that processes an entire program as a unit a The EPPCBug assembler processes each line of a program as an individual unit Due mainly to this basic functional difference the capabilities of the EPPCBug assembler are more restricted 1 o a A Q Label and line numbers are not used Labels are used to reference other lines and locations in a program The one line assembler has no knowledge of other lines and therefore cannot make the required association between a label and the label definition located on a separate line Source lines are not saved In order to read back a program after it has been entered the machine code is disassembled and then displayed as mnemonic and operands Only two directives WORD and SYSCALL are accepted No macro operation capability is included No conditional assembly is used Several symbols recognized by the resident assembler are not included in the EPPCBug assembler character set These symbols include gt and lt Two other symbols the ampersand amp and the asterisk have multiple meanings to the
123. T 2 lt CR gt IP 0003000C MSR 00003030 CR 00000040 FPSCR 00000000 RO 00000000 RI 00020000 R2 FFF0178C R3 00041000 R4 00000100 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R1 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPR1 00000000 SPR8 00020014 SPR9 00000000 0003000C 98A30000 STB R5 0 R3 00041000 IP 00030010 MSR 00003030 CR 00000040 FPSCR 00000000 RO 00000000 RI 00020000 R2 FFF0178C R3 00041000 R4 00000100 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPR1 00000000 SPR8 00020014 SPR9 00000000 00030010 3884FFFF ADDI R4 R4 FFFFFFFF EPPC Bug gt Trace the next instruction EPPC Bug gt T lt CR gt At Breakpoint IP 00030014 MSR 00003030 CR 00000040 FPSCR 00000000 RO 00000000 R1 00020000 R2 FFF0178C R3 00041000 PowerPC EPPCBug Firmware Packa
124. The supported device types are the more common industry standard program load types Mass storage devices in which a desired program load must take place from are formatted witha file system The entire mass storage device does not need to be formatted with the file system only enough of one to achieve program loading of a desired set of files Serial SCC SCM Superl O As stated previously program loading from the supported serial interfaces are constrained to utilizing S Records Please refer to Table 6 2 which describes the format of S Records PCMCIA ATA ROM FLASH Memory Cards Program loading from PC cards of this type behaves the same as program loading from a hard disk mass storage device type The nonvolatile memory contains the supported file system 6 8 PowerPC EPPCBug Firmware Package User s Manual Program Loading FLASH Memory Program loading from the on board FLASH memory may be accomplished as program loading from a FLASH memory card PCMCIA or from the more direct approach ROM boot ROM Boot ROM Boot is a mechanism for a program load to occur from a user defined area of a nonvolatile memory storage area ROM FLASH NVRAM Perform a ROM Boot by placing a GO command with the appropriate ROM NVRAM execution address into the command start up buffer Disk File System FAT The DOS operating system uses the file allocation table FAT to manage the disk s data area The FAT indicates to DOS whi
125. UG 1 1 does not support the address space qualifier Once a qualifier has been entered it remains valid for all addresses entered for that command sequence until the EPPCBug is reentered or another qualifier is provided PowerPC EPPCBug Firmware Package User s Manual 3 5 How to Enter Debugger Command Lines An alternate form of address is Rn which tells the bug to use the address contained in MPU Register Rn where n 0 through 31 0 1 Or 31 Hence ADDR Hexadecimal Number S s U 4u Rn In commands with RANGE specified as ADDR DEL ADDR and with size option H or W chosen data at the second ending address is acted on only if the second address is a proper boundary for a half word or word respectively Otherwise the range is truncated so that the last byte acted upon is at an address that is a proper boundary Offset Registers Eight pseudo registers Z0 Z7 called offset registers are used to simplify the debugging of relocatable and position independent modules The listing files in these types of programs usually start at an address normally 0 that is not the one at which they are loaded This makes it harder to correlate addresses in the listing with addresses in the loaded program The offset registers solve this problem by taking into account this difference and forcing the display of addresses in a relative address offset format Offset registers have adjustable ranges and may even have overl
126. _flipped register unsigned char cbyte register unsigned int index dbit msb cre Oxffffffff for index 0 index lt elements_n indext cbyte elements_pt for dit 0 doit lt 8 dbit msb crc gt gt 31 amp 1 cre lt lt 1 if msb cbyte amp 1 ere 0x04c11db6 ere 1 cbyte gt gt 1 PowerPC EPPCBug Firmware Package User s Manual A 13 A C Header Files A crc_flipped 0 for index 0 index lt 32 indext crc_flipped lt lt 1 doit cre amp 1 cre gt 1 crc_flipped doit cre crc_flipped Oxffffffff return cre amp Oxffff A 14 PowerPC EPPCBug Firmware Package User s Manual Device Interface Device Interface Identifiers CLUN DLUN Pairs Device and device drivers are accessed by means of an interface device identifier These identifiers are known as the Controller Logical Unit and the Device Logical Unit Numbers CLUN DLUN The following table lists the product s logical unit numbering Table B 1 Device Interface Device Identifiers CLUN DLUN Device Interface CLUN DLUN Interface Controller Specific Device Class Serial 00 00 Firmware Console SMCI by default 01 00 MPC821 860 SCC1 01 SCC2 02 MPC860 SCC3 03 SCC4 04 MPC821 860 SMC1 05 SMC2 08 00 FDC37C67X COM1 01 COM2 09 00 PCMCIA Motorola Montana 33 6 modem Parallel 10 00 MPC821 860 PIP SMC2 SP
127. a types The default data type is word The MM command alternate form M reads and displays the contents of memory at the specified address and prompts you with a question mark 2 You may enter new data for the memory location followed by a RETURN or may simply enter RETURN which leaves the contents unaltered That memory location is closed and the next location is opened You may also enter one of several special characters either at the prompt or after writing new data which change what happens when the carriage return is entered These special characters are as follows V or v The next successive memory location is opened This is the default It is in effect whenever MM is invoked and remains in effect until changed by entering one of the other special characters PowerPC Open Firmware User s Guide 4 89 Command Descriptions Examples ee MM backs up and opens the previous memory location un MM reopens the same memory location this is useful for examining I O registers or memory locations that are changing over time U Terminates MM command Control returns to EPPCBug The N option of the MM command disables the read portion of the command The A option forces alternate location accesses only Example 1 Access location 20000 modify memory modify and backup and modify memory and exit EPPC Bug gt MM 20000 H lt CR gt 00020000 1234 lt CR gt 00020002 5678 4321 lt CR gt
128. access is initiated If an error occurs an error status word is displayed Refer to Disk Status Codes on page E 1 for an explanation of returned error status codes PowerPC EPPCBug Firmware Package User s Manual 4 65 Command Descriptions IOT I O Teach for Configuring Disk Controller Command Input Options Description IOT A F HIT A List all the disk controllers which are supported by EPPCBug SCSI controllers are identified with an asterisk F Forcea 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 specified device fails H List all the disk controllers which are available to the system SCSI controllers are identified by an asterisk T Probe the system for I O controllers This option basically invokes the IOI command with no options The IOT command allows you to set up teach a new disk configuration in the EPPCBug for use by the system call disk functions IOT lets you modify the controller and device descriptor tables used by the system call functions for disk access Note that because the EPPCBug commands that access the disk use the system call disk functions changes in the descriptor tables affect all those commands These include the IOP and PL commands and also any user program that uses the system call disk functions Refer to Appendix for information on floppy disk formats Before
129. ack Disk T T D T Format a disk track D Format the entire disk File Number 0000 The starting file number to access for streaming tape devices Flag Byte 00 The flag 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 defined for streaming tape read and write operations Bit 7 Filemark flag If 1 a filemark was detected at the end of the last operation 4 64 PowerPC EPPCBug Firmware Package User s Manual IOP I O Physical to Disk Bit 3 Disk formatting It is ignored on tape operations Bit 2 Reset Controller Flag If 1 a controller reset will take place if possible before the requested operation takes place Bit 1 Ignore File Number IFN flag If 0 the file number field is used to position the tape before any reads or writes are done If 1 the file number field is ignored and reads or writes start at the present tape position Bit 0 End of File flag If 0 reads or writes are done until the specified block count is exhausted If 1 reads are done until the count is exhausted or until a filemark is found If 1 writes are terminated with a filemark Retension Erase R R E R Retension tape when a format operation is scheduled E Erase and retension tape when a format operation is scheduled After all the required parameters are entered the disk
130. address 0001E000 Effective data 55AA55AA EPPC Bug gt EPPC Bug gt MD 1E000 lt CR gt 000 55AA55AA 00000000 00000000 00000000 U U 010 00000000 00000000 00000000 00000000 s s sssssss s a a EPPC Bug gt Example 2 0001 00011 EPPC Bug gt MW 1E000 77 B Effective address 0001E000 Effective data 77 EPPC Bug gt EPPC Bug gt MW 1E000 lt CR gt E000 77AASSAA 00000000 00000000 00000000 w U E010 00000000 00000000 00000000 00000000 4 98 PowerPC EPPCBug Firmware Package User s Manual MW Memory Write EPPC Bug gt Example 3 EPPC Bug gt MW 1E002 33CC H lt CR gt ffective address 0001E002 ffective data 33CC EPPC Bug gt ti ti U EPPC Bug gt MD 1E000 lt CR gt 001E000 77AA33CC 00000000 00000000 00000000 w 3 0001E010 00000000 00000000 00000000 00000000 PPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 99 Command Descriptions NIOC Network I O Control Command Input Description NIOC 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 c
131. al to zero If only one byte is entered the byte is right justified Any number of ASCII characters may be entered for each WORD directive and the characters are right justified but truncation occurs after four characters The SYSCALL System Call Directive The function of this directive is to aid you in making the appropriate TRAP entry to EPPCBug functions as defined in Chapter Running H F 3 The format for this directive is SYSCALL SOMEFUNCTION This is assembled as ADDI R10 RO SXXXX SC Where XXXX is a 16 bit number specifying the function to perform Refer to Chapter Running H F 3 for a complete listing of all the System Call functions provided 5 12 PowerPC EPPCBug Firmware Package User s Manual One Line Assembler Disassembler How To Enter and Modify 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 a Symbols and labels other than the defined instruction mnemonics are not allowed The assembler has no means to store the associated values of the symbols and labels in lookup tables This forces the programmer to use memory addresses and to enter data directly rather than use labels a Editing is accomplished
132. am must be in S record format and may have been assembled or compiled on the host system Alternately the program may have been previously created using the EPPCBug MM command as outlined above and stored to the host using the Dump DU command A communication link must exist between the host system and the MBX serial port Refer to the Installation guide for the MBX Series boards The file is downloaded from the host to MBX memory by the Load LO command Additionally the PL command allows programs to be loaded from network or mass storage I O devices PowerPC EPPCBug Firmware Package User s Manual 3 7 Call System Utilities from User Programs Once the object code has been loaded into memory you can set breakpoints if desired and run the code or trace through it Call System Utilities from User Programs A convenient way of doing character input output and many other useful operations has been provided so you do not have to write these routines into the target code You have access to various EPPCBug routines via the System Call Handler Refer to Chapter Running H F 3 for details on the various utilities available and how to invoke them from within a user program Preserve the Debugger Operating Environment This section explains how to avoid contaminating the operating environment of the debugger EPPCBug uses certain MBX onboard resources and also offboard system memory to contain temporary variables exception vectors etc
133. an zero is decremented with each fetch Every time that a breakpoint with zero count is found a breakpoint handler routine prints the CPU state on the screen and control is returned to EPPCBug NOBR is used for deleting breakpoints from the breakpoint table If an address is specified then that address is removed from the breakpoint table If NOBR lt RETURN3 gt is entered then all entries are deleted from the breakpoint table and the empty table is displayed Examples FPPC Bug gt BR 1E000 1E200 1 700 amp 12 lt CR gt REAKPOINTS 001E000 0001E200 001E700 C EPPC Bug gt o Ww oO PowerPC EPPCBug Firmware Package User s Manual 4 15 Command Descriptions Set some breakpoints EPPC Bug gt NOBR 1E200 lt CR gt BREAKPOINTS 0001000 0001E700 C EPPC Bug gt Delete specified breakpoint EPPC Bug gt NOBR lt CR gt BREAKPOINTS EPPC Bug gt Delete all breakpoints PowerPC EPPCBug Firmware Package User s Manual BS Block of Memory Search BS Block of Memory Search Command Input BS RANGE DEL TEXT B H W or BS RANGE DEL data DEL mask B H W LNILV Options B Byte H Half word W Word Description The BS command searches the specified range of memory for a match with a user entered data pattern This command has three modes as described below Mode 1 Literal String Search In this mode a search is carried out for the ASCII equivalent of
134. and Descriptions OF Offset Registers Display Modify Command Input OF Zn A Command Use OF OF Zn OF Zn A Display all offset registers An asterisk indicates which register is the automatic register Display modify Zn You can scroll through the register in a way similar to that used by the MM command Display modify Zn and set it as the automatic register The automatic register is one that is automatically added to each absolute address argument of every command except if an offset register is explicitly added An asterisk indicates which register is the automatic register Range entry Ranges may be entered in three formats base address alone base and top as a pair of addresses and base address followed by byte count Control characters used Their function is identical to that in Register Modify RM and Memory Modify MM commands Range syntax base address del top address V 1 or base address byte count I V1 1 Description Use this command to access and change pseudo registers called offset registers These registers are used to simplify the debugging of relocatable and position independent modules 4 112 PowerPC EPPCBug Firmware Package User s Manual OF Offset Registers Display Modify 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 This allows the automatic register function to be
135. and start target the program EPPC Bug gt RM R7 lt CR gt R7 00000000 FFFFFFFF lt CR gt EPPC Bug gt EPPC Bug gt GD 20000 lt CR gt Effective address 00020000 Note that the breakpoint was not taken 4 42 PowerPC EPPCBug Firmware Package User s Manual GN Go to Next Instruction Command Input Description Examples GN GN Go to Next Instruction GN sets a temporary breakpoint at the address of the next instruction that is the one following the current instruction and then starts target code execution After setting the temporary breakpoint the sequence of events is similar to that of the GO command GN is helpful when debugging modular code because it allows you to trace through a subroutine call as if it were a single instruction The following section of code resides at address 20000 EPPC Bug gt DS 20000 6 lt CR gt 0020000 3c600004 ADDIS 0020004 60631000 ORI 0020008 3C800000 ADDIS 002000C 608400FE ORI 0020010 4800FEF1 BL 0020014 80620000 Iwz EPPC Bug gt Cry Soy Ho AG eS R3 RO 4 R3 R3 1000 R4 RO SO R4 R4 FE 00030000 R3 0 R2 FFF0178C The following simple routine resides at address 30000 EPPC Bug gt DS 30000 lt CR gt 030000 3CA00000 ADDIS 030004 2B040000 OMPLI 030008 419A0014 BC 03000C 98A30000 STB 030010 3884FEFF ADDI 030014 38630001 ADDI 030018 4BEFFFEC B 03001C 4 amp 800020 BCLR PPC Bug gt QO OnO
136. apping ranges The range for each offset register is set by two addresses base and top Specifying the base and top addresses for an offset register sets its range In the event that an address falls in two or more offset registers ranges the one that yields the least offset is chosen Relative addresses are limited to 1Mb 5 digits regardless of the range of the closest offset register 3 6 PowerPC EPPCBug Firmware Package User s Manual Using the EPPCBug Debugger Port Numbers Some EPPCBug commands give you the option to choose the port to be used to input or output Valid port numbers which may be used for these commands are EPPCBug Port Numbers PORTO SMC Port 1 Sometimes known as the console port It is used for interactive user input output by default PORT1 SMC Port 2 Sometimes known as the host port This is the default for downloading uploading and transparent modes How to Enter and Debug Programs There are various ways to enter a user program into system memory for execution One way is to create the program using the Memory Modify MM command with the assembler disassembler option You enter the program one source line at a time After each source line is entered it is assembled and the object code is loaded to memory Refer to Chapter Running H F 3 for complete details of the EPPCBug Assembler Disassembler Another way to enter a program is to download an object file from a host system The progr
137. aracter As mentioned if the embedded checksum of a record does not agree with the checksum calculated by EPPCBug AND if the checksum comparison has not been disabled via the C option then an error condition exists A message is output stating the address of the record as obtained from the address field of the record the calculated checksum and the checksum read with the record A copy of the record is also output This is a fatal error and causes the command to abort When a load is in progress each data byte is written to memory and then the contents of this memory location are compared to the data to determine if the data stored properly If for some reason the compare fails then a message is output stating the address where the data was to be stored the data written and the data read back during the compare This is also a fatal error and causes the command to abort Because processing of the S records is done character by character any data that was deemed good will have already been stored to memory if the command aborts due to an error Examples Suppose a host system was used to create this program file test s retrieve contents of the RIC registers toc T FD tE FD 4330000080000000 tc 1127219200 2147483648 toc T test tc test tc test ds T LDATA Mee LDATA tc LDATA PowerPC EPPCBug Firmware Package User s Manual 4 75 Command Descriptions T LRDATA ate LRDATA
138. 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 Making unauthorized copies is prohibited by law No part of the software or documentation may be reproduced transmitted transcribed stored in a retrieval system or translated into any language or computer language in any form or by any means without the prior written permission of Motorola Inc Disclaimer of Warranty Unless otherwise provided by written agreement with Motorola Inc the software and the documentation are provided on an as is basis and without warranty This disclaimer of warranty is in lieu of all warranties whether express implied or statutory including implied warranties of merchantability or fitness for any particular purpose magnetic energy It may cause or be susceptible to electro WARNING magnetic interference EMI if not installed and used in a cabinet with adequate EMI protection T This equipment generates uses and can radiate electro Copyright Motorola Inc 1997 All Rights Reserved Printed in the United States of America June 1997 Contents Introduction 1 1 Typographic Conventions 1 2 Terminology Conventions 1 3 Related Documentation 1 4 Product Structure 2 1 Firmware Debugger Overview 2 3 Description of EPPCBug 2 3 Comparison with other Motorola Firmware 2 4 EPPCBug Implementation 2 5 General
139. ata with which to program the FLASH memory Word 32 bit address alignment is required for this parameter 0x10 0x14 Specifies the number of bytes of the source data or the number bytes to program the FLASH memory with Word 32 bit address alignment is required for this parameter Specifies the starting address of the FLASH memory to program the source data with Word 32 bit address alignment is required for this parameter 0x18 Specifies the instruction execution address to be executed upon completion of the FLASH memory programming This parameter must meet the syntax of the reset vector of the applicable MPU architecture of the host product This parameter is qualified with a control bit in the control word execution will only occur when the control bit is set and no errors occur during programming verification This non execution on error can be invalidated by yet another control bit in the control word 0x1C Reserved must be 0 PowerPC EPPCBug Firmware Package User s Manual 7 41 System Call Routines Offset Description 0x20 Reserved must be 0 R4 points to the output parameter block Offset Description 0x0 System call return status 0x4 Flash programming status Meanings of bits within this are Bit 0 Error of some type see remaining status bits Bit 1 Address Range alignment error Bit 2 FLASH Memory address range error Bit 3 FLASH Memory erase error Bit 4
140. ate the command Note EPPCBug 1 1 does not support ABORT PowerPC EPPCBug Firmware Package User s Manual Introduction to PowerPC EPPCBug Firmware Diagnostic Facilities Included in the EPPCBug package is a complete set of hardware diagnostics intended for testing and troubleshooting of the MBX Series boards In order to use the diagnostics you must switch directories to the diagnostic directory If you are in the debugger directory you can switch to the diagnostic directory by entering the debugger command Switch Directories SD The EPPC Diag gt prompt should appear Note that some diagnostics depend on restart defaults that are set up only in a particular restart mode Memory Requirements EPPCBug requires a minimum of 128Kb of contiguous read write memory to operate This memory resides at the upper end of memory This read write memory must not be modified by a user s application This 128Kb is used for EPPCBug stack and static variable space and the remainder is reserved as user space Whenever the MBX Series board is reset the a Target IP is initialized to the address corresponding to the beginning of the user space and a Target stack pointers are initialized to addresses within the user space with the target Pseudo Stack Pointer R1 set to the top of the user space PowerPC EPPCBug Firmware Package User s Manual 2 11 I O and Memory Address Map 9 I O and Memory Address Map The hardware source of
141. attempting to access the disks with the IOP command you should verify the parameters and if necessary modify them for the specific media and drives used in the system Refer to Floppy Drive Configuration Parameters on page B 3 for details 4 66 PowerPC EPPCBug Firmware Package User s Manual IOT I O Teach for Configuring 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 A device probe with entry into the device descriptor table is done whenever a specified device is accessed via IOT The device probe mechanism utilizes the SCSI commands Inquiry and Mode Sense If the specified controller is non SCSI the probe simply returns the status device present and unknown The device probe makes an 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 status device present pointer to the device descriptor Note that reconfiguration is only necessary when you wish to read or write a disk which is different than the default set by the IOP command Reconfiguration is normally done automatically by the PL command when booting from a disk which is different from the default When invoked without
142. attempts to supply a default configuration for the new port Once a valid port has been specified default parameters are supplied The base address of this new port is one of these default parameters Before entering the interactive configuration mode you are allowed to change the port base address Press the RETURN key to retain the base address shown If the configuration of the new port is not fixed then the interactive configuration mode is entered Refer to the section above regarding configuring assigned ports If the new port does have a fixed configuration then Port Format issues the ok to proceed y n prompt immediately PF does not initialize any hardware until you have responded with the letter Y to prompt ok to proceed y n Pressing the BREAK key any time prior to this step or responding with the letter N at the prompt leaves the port unassigned This is only true of ports not previously assigned NOPF Port Detach The NOPF command NOPF n unassigns the port whose number is n Only one port may be unassigned at a time Invoking the command without a port number NOPF does not unassign any ports PowerPC EPPCBug Firmware Package User s Manual 4 121 Command Descriptions PFLASH Program FLASH Memory Command Input Arguments Options PFLASH RANGE DSADDR IEADDR IB H WI A R11 XII RANGE Source starting and ending address of the binary image used to program the flash memory
143. aud rate You may choose from the following 110 300 600 1200 2400 4800 9600 19200 IF A NUMBER BASE IS NOT SPECIFIED THE DEFAULT IS DECIMAL NOT HEXADECIMAL Parity type Parity choice may be E even O odd N disabled Character width You may select 5 6 7 or 8 bit characters Number of stop bits Only 1 and 2 stop bits are supported Automatic software handshake Current drivers have the capability of responding to XON XOFF characters sent to the debugger ports Receiving an XOFF causes a driver to cease transmission until an XON character is received Software handshake character values The values used by a port for XON and XOFF may be redefined to be any 8 bit value ASCII control characters or hexadecimal values are accepted Assigning a New Port PF supports a set of drivers for a number of different modules and the ports on each To assign one of these to a previously unassigned port number invoke the command with that number A message is then printed to indicate that the port is unassigned and a prompt is issued to request the name of the module Pressing the RETURN key on the console at this point causes PF to list the currently supported modules and ports Once the name of the module 4 120 PowerPC EPPCBug Firmware Package User s Manual PF NOPF Port Format Detach board has been entered a prompt is issued for the name of the port After the port name has been entered Port Format
144. ay MD command with the DI option or interchangeably the DS command The MD command requires both the starting address and the line count to be entered in the command line When the DI option is invoked the number of instructions disassembled and displayed is equal to the line count The DS command also operates with a starting address and an ending address Note that the listing may not correspond exactly to the program as entered As discussed in Disassembled Source Line on page 5 5 the disassembler displays in signed hexadecimal any number it interprets as an offset from a register All other numbers are displayed in unsigned hexadecimal 5 16 PowerPC EPPCBug Firmware Package User s Manual One Line Assembler Disassembler Assembler Error Messages The following is a list of all possible error messages An Operand has a Length of Zero Unknown Mnemonic 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 PowerPC EPPCBug Firmware Package User s Manual 5 17 Assembler Error Messages 5 18 PowerPC EPPCBug Firmware Package User s Manual Program Loading Overview EPPCBug supports loading of user programs from a variety of interfaces Program loading into read write memory can be viewed as the system s boot process The boot process is responsible for
145. 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 4 22 PowerPC EPPCBug Firmware Package User s Manual BV Block of Memory Verify Examples Example 1 Assume memory from 20000 to 2002F is as indicated EPPC Bug gt MD 20000 18 H lt CR gt 00020000 4E71 4E71 4E71 4E71 4E71 4E71 4E71 4E71 NgNqNqNqNqNgqNqNq 00020010 4E71 4E71 4E71 4E71 4E71 4E71 4E71 4E71 NgNqNqNqNqNgqNqNq 00020020 4E71 4E71 4E71 4E71 4E71 4E71 4E71 4E71 NgNqNqNgqNqNgqNqNq EPPC Bug gt EPPC Bug gt BV 20000 2001F 4E714E71 lt CR gt ffective address 00020000 ffective address 0002001F EPPC Bug gt ti ti In this example the default data element size is word and the block verify was successful nothing printed Example 2 Assume memory from 20000 to 2002F is as indicated EPPC Bug gt MD 20000 18 H lt CR gt 00020000 0000 0000 0000 0000 0000 0000 0000 0000 2 66 00020010 0000 0000 0000 0000 0000 0000 0000 0000 666 00020020 0000 0000 0000 0000 0000 4AFB 4AFB 4AFB J J J EPPC Bug gt EPPC Bug gt BV 20000 30 0 B lt CR gt ffective address 00020000 ffective count amp 48 002002A 4A 0002002B FB 0002002C 4A 0002002D FB 002002E 4
146. bsystems 4 167 output 4 29 string to port 4 35 target registers 4 138 target state 4 130 temperature 4 32 user program machine UPM 4 160 display date and time 4 154 display port assignments 4 117 DLUN See Device Logical Unit Number download drivers 4 123 download S Record file 8 5 download S Records 4 73 drivers FLASH memory 4 123 E editing at command line D 1 editing commands 3 3 editing macros 4 82 EPPCBug access to routines 2 3 commands 2 3 directories 2 4 executing 2 14 firmware comparison 2 4 installation 2 6 product structure 2 1 error codes disk system calls E 1 error messages assembler 5 17 executing EPPCBug 2 14 expressions using 3 4 3 5 F file formats program load 6 2 6 10 file transfer Ethernet network interfaces 4 102 firmware features 2 3 firmware I O storage D 1 FLASH memory program 7 41 Flash ROM install 2 6 size 2 5 floating point decimal numbers 3 13 modify data register or memory lo cation 3 11 support 3 11 floppy drive formats B 3 forcing a signal 1 3 format mass storage devices 6 8 format of source lines assembler 5 4 FPU see floating point G generate reset exception 4 135 get file from destination host 7 31 H hardcopy mode 3 3 hardware diagnostics 2 11 header files DIMM H A 10 SROM_CRC C A 13 VPD H A 8 help facility 4 53 host computer connect to 4 155 l I O device load program 4 126 I2C bus access 4 56 ICMP protocol 4 110 indexing into file
147. by System Calls 7 3 System Call Routines 7 4 CIO_READ 7 6 Description 7 6 Entry Conditions 7 6 Exit Conditions 7 7 CIO_WRIT 7 8 Description 7 8 Entry Conditions 7 8 Exit Conditions 7 9 CIO_STAT 7 10 Description 7 10 Entry Conditions 7 10 Exit Conditions 7 10 CIO_CNFG 7 12 Description 7 12 Entry Conditions 7 12 Exit Conditions 7 13 CIO_PUTS 7 14 Description 7 14 Entry Conditions 7 14 Exit Conditions 7 14 CIO_GETS 7 15 Description 7 15 Entry Conditions 7 15 Exit Conditions 7 15 MSIO_READ and MSIO_WRIT 7 16 Description 7 16 Entry Conditions 7 16 Exit Conditions 7 17 MSIO_CNFG 7 18 Description 7 18 Entry Conditions 7 18 Exit Conditions 7 18 Configuration Area Block CFGA Fields 7 22 MSIO_CTRL 7 27 Description 7 27 Entry Conditions 7 27 Exit Conditions 7 28 MSIO_FRMT 7 29 Description 7 29 Entry Conditions 7 29 Exit Conditions 7 30 NIO_READ and NIO_WRIT 7 31 Description 7 31 Entry Conditions 7 31 Exit Conditions 7 32 NIO_CNFG 7 33 Description 7 33 Entry Conditions 7 33 Exit Conditions 7 33 NIO_CTRL 7 38 Description 7 38 Entry Conditions 7 38 Exit Conditions 7 38 RT C_READ 7 39 Description 7 39 Entry Conditions 7 39 Exit Conditions 7 39 RTC_WRIT 7 40 Description 7 40 Entry Conditions 7 40 Exit Conditions 7 40 FM_WRIT 7 41 Description 7 41 Entry Conditions 7 41 Exit Conditions 7 42 SSYMBOLTA 7 43 Description 7 43 Entry Conditions 7 43 Exit Conditions 7 43 SSYMBOLITD 7 45 Descripti
148. by retyping the entire new source line Lines can be added or deleted by moving a block of memory data to free up or delete the appropriate number of locations refer to the Block Move BM command PowerPC EPPCBug Firmware Package User s Manual 5 13 Invoke the Assembler Disassembler Invoke the Assembler Disassembler The assembler disassembler is invoked using the DI option of the Memory Modify MM and Memory Display MD commands MM ADDR DI or AS ADDR and MD S ADDR COUNT ADDR DI or DS ADDR COUNT ADDR The MM DI option or interchangeably the AS command is used for program entry and modification When this command is used the memory contents at the specified location are disassembled and displayed A new or modified line can be entered if desired The disassembled line can be an PowerPC instruction or a WORD directive If the disassembler recognizes a valid form of some instruction the instruction will be returned If not recognized random data occurs the WORD XXXXXXXX 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 5 14 PowerPC EPPCBug Firmware Package User s Manual One Line Assembler Disassembler Enter a Source Line A new source line is entered immediately following the disassembled line using the format discussed in Source Line Format on page
149. call return status 0x4 Device specific error code If the system call failed due to an error at the device interface level additional device specific error status will be returned in this location 0x8 Reserved Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing 7 38 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls RTC_READ Code 0500 Description RTC_READ is used to read the Real Time Clock registers The data returned is in packed BCD Entry Conditions R3 points to the input parameter block Offset Description 0x0 Pointer to rtc data buffer R4 points to the output parameter block Offset Description 0x0 System call return status Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing The rtc data buffer has been filled with the following Offset Description 0x0 Year 2 nibbles packed BCD 0x1 Month 2 nibbles packed BCD 0x2 Day of month 2 nibbles packed BCD 0x3 Day of week 2 nibbles packed BCD 0x4 Hour of 24 hour clock 2 nibbles packed BCD 0x5 Minute 2 nibbles packed BCD 0x6 Seconds 2 nibbles packed BCD 0x7 Reserved PowerPC EPPCBug Firmware Package User s Manual 7 39 System Call Routines RTC_WRIT Code 0501 Description RTC_WRIT initializes Real Time
150. calling the appropriate driver as specified by the interface identifier to load the specified Initial Program Load IPL and to pass control to the just loaded IPL execute it The IPL format program load is restricted to a finite set of file formats Program loading is supported from the following interface types a Network Ethernet a Mass Storage SCSI FDC EIDE IDE a Serial Asynchronous SCC SMC Super O a PCMCIA ROM FLASH Memory Cards a FLASH Memory On Board Note EPPCBug 1 1 supports only local network and local nonplug in card disk floppy EIDE hard disk storage loading S Records are only supported via the LO command Additional interface support will be added in future EPPCBug releases PowerPC EPPCBug Firmware Package User s Manual 6 1 Program Load Features Program Load Features The program load feature recognizes a finite list of file formats In addition file recognition is also dependent upon the program load interface utilized The following file formats are supported a Motorola Serial Records S Records a Executable Linker Format ELF PowerPC Version a Binary a Command s Processor a Motorola ROM Boot The firmware supported serial interfaces only support the program loading of S Records It is recommended you use the following file naming conventions Table 6 1 File Naming Conventions File Format Type File Suffix Motorola Serial Records S Records Executable L
151. ch portions of the disk belong to each file Utilization of the FAT file system for initial program loading permits more than one program load boot file to exist per mass storage device It should also be noted than the entire mass storage device does not need to contain the FAT file system just enough to contain the desired number of program load files is required PowerPC EPPCBug Firmware Package User s Manual 6 9 File Formats File Formats CDROM File System ISO9660 Conforms to the following document SO 9660 Information processing Volume and file structure of CD ROM for information interchange published by International Organization for Standardization PowerPC ELF Conforms to the following document System V Application Binary Interface PowerPC Processor Supplement Sunsoft S Records The file format for S Records can be found in Chapter Running H F 3 Command s Processor The file format is identical to the command buffer as located in NVRAM with one exception The first line terminated with a RETURN character of the file contains the string This is an EPPC Bug command s processor file The text string must be in the case shown in this example The individual commands are terminated with a RETURN and the list of commands are terminated with a null or EOT character These commands have the same syntax as if they were executed from the firmware command line interface 6 10 PowerPC EPPCBu
152. cified block is formatted If 1 it indicates a Format Disk operation All the tracks on the disk are formatted For streaming tapes bit zero is interpreted as follows If 0 it selects a Retension Tape operation This rewinds the tape to BOT advances the tape without interruptions to EOT and then rewinds it back to BOT If 1 it selects an Erase Tape operation This completely clears the tape of previous data and at the same time retensions the tape PowerPC EPPCBug Firmware Package User s Manual 7 29 System Call Routines R4 points to the output parameter block Offset 0x0 Description System call return status 0x4 Device specific error code If the system call failed due to an error at the device interface level additional device specific error status will be returned in this location Appendix E provides disk tape status error codes 0x8 0xC Reserved Reserved Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing 7 30 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls NIO_READ and NIO_ WRIT Code 0400 NIO_READ Code 0401 NIO_WRIT Description NIO_READ is used to get files from the destination host over the specified network interface The NIO_WRIT system call is used to send files to the host Entry Conditions R3 points to the input parameter block
153. criptions Internal Memory Map Pointer seseo cece ee ee eee eee FA200000 Tecal Mrory SI Ze secre soa ethic Wes Seah eteaws Lad EE 00400000 4MB PCI Device 00009800 ID ReviSion ee eee eee 056510AD 04 Class Bridge Device Subclass PCI ISA Bridge Baset 0000 05 65 10 AD 02 00 00 07 06 01 00 04 00 80 00 00 e 0 Baset 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Baset 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 PCI Device 00009900 ID Revision 2 e00 010510AD 05 Class Mass Storage Controller Subclass IDE Controller Base 0000 01 05 10 AD 02 80 00 05 01 01 8F 05 00 80 00 08 Base 0010 01 00 00 21 01 00 00 31 01 00 00 29 01 00 00 35 1 5 Base 0020 01 00 00 01 01 00 00 11 00 00 00 00 00 00 00 00 Base 0030 00 00 00 00 00 00 00 00 00 00 00 00 28 02 01 OF Cis EPPC Bug gt 4 168 PowerPC EPPCBug Firmware Package User s Manual VPD Vital Product Data Display Command Input VPD Description VPD Vital Product Data Display The VPD command displays the information about the board that is stored in the VPD SROM on the board Refer to Appendix Example EPPC Bug gt vpd lt cer gt Product Identifier Manufacturing Assembly Number Serial Number Product Configuration Options
154. d Input Description Examples ECHO PORT DEL hexadecimal number string The ECHO command displays strings to any configured port A hexadecimal number must have two digits before it is displayed The hexadecimal number allows printing of new lines carriage returns etc ASCII strings can be entered by enclosing them in single quotes To include a quote as part of a string two consecutive quotes should be entered Note that one or more hexadecimal numbers and ASCII strings may be entered in the same command Example 1 EPPC Bug gt ECHO quick brown fox jumps over the lazy dog 0A lt CR gt quick brown fox jumps over the lazy dog EPPC Bug gt In this example the ASCII string was displayed to the current console port The port number was separated by delimiters but was not specified This directs the ECHO command to use the current console port Example 2 EPPC Bug gt ECHO 1 this is a test 07 lt CR gt EPPC Bug gt In this example the ASCII string and a BELL character were sent to port 1 Example 3 EPPC Bug gt ECHO 3 this will not work lt CR gt Logical unit 02 unassigned PowerPC EPPCBug Firmware Package User s Manual 4 35 Command Descriptions EPPC Bug gt An error message results in this example because the selected port is not configured Example 4 EPPC Bug gt ECHO This is EPPCBug lt CR gt This is EPPCBug
155. d request TFTP write request x TFTP acknowledgment gt TFTP data TFTP error Unsupported ICMP type ICMP echo request ICMP echo reply The BOOT RARP request control during the boot process Control can be set either to always A or to when needed W When control is set to always the BOOTP RARP request is always sent and the accompanying reply always expected When control is set to when needed the BOOTP RARP request is sent if needed i e IP addresses of 0 null boot file name 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 PowerPC EPPCBug Firmware Package User s Manual 7 37 System Call Routines NIO_CTRL Code 0403 Description NIO_CTRL 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 defined packet is the SEND packet which allows you to send a packet in the specified format to the specified network interface driver The required parameters are passed in a command packet which has been built somewhere in memory Entry Conditions R3 points to the input parameter block Offset Description 0x0 CLUN of device 0x4 DLUN of device 0x8 Command 0xC Memory address 0x10 Number of bytes 0x14 Reserved R4 points to the output parameter block Offset Description 0x0 System
156. d the sector size specified Starting Head 10 The starting head number for the device It is normally zero for Winchester and floppy drives It is nonzero for dual volume SMD drives Number of Heads 05 The number of heads on the drive PowerPC EPPCBug Firmware Package User s Manual 4 69 Command Descriptions Number of Cylinders 0337 The number of cylinders on the device For floppy 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 specified by the drive manufacturer Reduced Write Current Cylinder 0000 The cylinder number at which the write current should be reduced when writing to the drive This parameter is normally specified by the drive manufacturer Interleave Factor 00 The manner in which the sectors are formatted on a track Normally consecutive sectors in a track are numbered sequentially in increments of 1 interleave factor of 1 The interleave factor controls the physical separation of logically sequential sectors This physical separation gives the host time to prepare to read the next logical sector without requiring the loss of an entire disk revolution Spiral Offset 00 The number of sectors that the first sector is offset from the index pulse This is used to reduce latency when crossing track boundaries ECC Data Burst Le
157. ddress 20008 EPPC Bug gt MM 20008 DI lt CR gt 00020008 7C631378 OR R3 R3 R2 ANDC R3 R3 R2 lt CR gt 00020008 7C631078 ANDC R3 R3 R2 0002000C 7C631378 OR R3 R3 R2 lt CR gt EPPC Bug gt EPPC Bug gt MD 20000 20014 DI lt CR gt 00020000 3C401000 ADDIS R2 RO 1000 PowerPC EPPCBug Firmware Package User s Manual 4 13 Command Descriptions 00020004 60420001 ORI R2 R2 1 00020008 7C631078 ANDC R3 R3 R2 0002000C 7C631378 OR R3 R3 R2 00020010 7CA53214 ADD R5 R5 R6 EPPC Bug gt 4 14 PowerPC EPPCBug Firmware Package User s Manual BR Breakpoint Insert Delete BR Breakpoint Insert Delete Command Input BR ADDR COUNT NOBR ADDR Description The BR command allows you to set 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 EPPCBug This allows you to see the actual state of the processor at selected instructions in the code Up to eight breakpoints can be defined The breakpoints are kept in a table which is displayed each time either BR or NOBR is used If an address is specified with the BR command that address is added to the breakpoint table The COUNT field specifies how many times the instruction at the breakpoint address must be fetched before a breakpoint is taken The count if greater th
158. des 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 The status word is shown below 15 8 7 0 Controller Independent Controller Dependent Because of the nature of the SCSI Host Adapter additional status may be returned The format of the additional error status is as follows 15 8 7 0 SCSI Command Sense Key The SCSI command is a byte that identifies the command that was issued in which the Sense Key was returned The Sense Key is a byte that is returned in Request Sense Data buffer byte number two Refer to the ANSI X3T9 2 SCSI Specification Table E 1 Controller Independent Status Codes Code Description 00 No error detected 01 Invalid controller type 02 Controller descriptor not found 03 Device descriptor not found 04 Controller already attached 05 Descriptor table not found PowerPC EPPCBug Firmware Package User s Manual E 1 SCSI Firmware Status Codes Table E 1 Controller Independent Status Codes Continued Code Description 06 Invalid command packet 07 Invalid address for transfer 08 Block conversion error 09 Invalid
159. 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 RAM This is done only if the device is present You may view the system s device names by performing the following operations 1 Use the D option for mass storage devices when probing to display the device names of the attached devices These device names are per the IBM firmware and the IBM AIX naming conventions 2 Use the N option to view the device names of mass storage devices which are currently configured or have been accessed via a boot PL or via an I O operation IOP PowerPC EPPCBug Firmware Package User s Manual 4 61 Command Descriptions IOP I O Physical to Disk Command Input 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 RETURN To leave the field unchanged press RETURN without typing a new value You may also enter a special character either at the prompt or after typing new data for scrollin
160. dress 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 4 126 PowerPC EPPCBug Firmware Package User s Manual PL Program Load When the IP addresses are 0 they always force a BOOTP RARP phase to occur first If all client and server of the IP addresses are known specified the TFTP phase occurs first If this phase fails in loading the boot file the BOOTP RARP phase is initiated prior to subsequent TFTP phase If the filename is not specified this also forces a BOOTP RARP phase to occur first Note that the defaults specified by the command always initiates a BOOTP RARP phase In any case the booting server IP address is displayed as well as that of any failing IP address Once the IP addresses are obtained from the BOOTP server or the configuration parameters if specified the IP addresses are checked to see if the server and the client are resident on the same network If they are not the gateway IP address is used as the intermediate server to perform the TFTP phase with If the server has only RARP capability you need to specify the name of the boot file either by the command line or the configuration parameters Refer to NIOT I O Teach for Configuring Network Controller on page 4 105 Prior to the TFTP phase an ARP request is transmitted for the hardwa
161. dress is given This command may take several seconds to initialize a large block of memory Example 1 EPPC Bug gt BI 0 10000 B lt CR gt Effective address 00000000 4 10 PowerPC EPPCBug Firmware Package User s Manual BI Block of Memory Initialize Effective count amp 65536 EPPC Bug gt Example 2 Assume system memory from 0 to 000FFFFF EPPC Bug gt BI 0 1FFFFF lt CR gt Effective address 00000000 Effective address 001FFFFF RAM FAIL AT 00100000 EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 11 Command Descriptions BM Block of Memory Move Command Input Options Description Examples BM RANGE DEL ADDR B H W B Byte H Half word W Word 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 data that the COUNT is referring to For example a COUNT of 4 with an option of W would mean to move 4 words or 16 bytes to the new location If an option field is specified without a COUNT in the RANGE an error results The default data type is Word Example 1 Assume memory from 20000 to 2000F is clear EPPC Bug gt MD 21000 10 H lt CR gt 00021000 5448 4953 2049 5320 4120 5445 5354 2121 THIS IS A TEST 00021010 0000 0000 0000 0000 0000 0
162. e characters are not inserted but replace the ones that are beneath them U 0x55 Undo all changes made to Command the current line restore the line to original contents W 0x57 From the current cursor Command position move the cursor forward a blank delimited word and position the cursor to the first character in this word X 0x58 Delete the character prior to Command the current cursor position and position the cursor 1 character to the left a 0x61 Move the cursor one position Command to the right and enter the insert mode PowerPC EPPCBug Firmware Package User s Manual D 3 History Buffer Commands Table D 1 History Input Buffer Recall Edit Key Sequence b Hexadecimal Code 0x62 Description From the current cursor position move the cursor back a word and position the cursor to the first character in this word Edit Mode Command 0x65 From the current cursor position move the cursor forward a word and position the cursor to the last character in this word Command 0x68 Move the cursor one position to the left back a character Command 0x69 At the current cursor position enter the insert mode All text shall be inserted prior to the starting cursor position Command Ox6A Copy the next input buffer entry into the edit buffer Command 0x6B Copy the previous input buffer entry into the edit buffer
163. e a break to be sent 0xC Number of bytes to be sent 0x10 Reserved must be 0 Note EPPCBug 1 1 supports only CLUN and DLUN of 0 R4 points to the output parameter block 0x0 System call return status 0x4 Number of bytes actually sent 7 8 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing If the data buffer pointer location contained 1 then a break was sent to the port Otherwise the data bytes pointed to by the buffer pointer were sent to the port The number of bytes actually sent indicates the number of bytes actually sent to the device The number of bytes actually sent may be less than the number requested or even zero if the device could not accept any characters PowerPC EPPCBug Firmware Package User s Manual 7 9 System Call Routines ClO_STAT Code 0202 Description CIO_STAT returns status flags which indicate the state of the device transmit receive and line status Entry Conditions R3 points to the input parameter block Offset 0x0 Description CLUN of device 0 selects current output device 0x4 DLUN of device 0 selects current output device Note EPPCBug 1 1 supports only CLUN and DLUN of 0 R4 points to the output parameter block Offset 0x0 Description System call return status 0x4
164. e is output stating the address of the record as obtained from the address field of the record the calculated checksum and the checksum read with the record A copy of the record is also output This is a fatal error and causes the command to abort Examples Sample test program file test s retrieve contents of the RIC registers toc FD tc FD 4330000080000000 tc 1127219200 2147483648 toc TFsetest Le test tc test ds T LDATA EE LDATA tc LDATA T LRDATA CE LRDATA tc LRDATA aliq 2 globl test ds csect test ds Long test pr TOC tc0 0 globl test pr csect test pr test mfspr 14 4 load RIC upper register stw r4 0 r3 write to caller s buffer mfspr 14 5 load RIC lower register 4 164 PowerPC EPPCBug Firmware Package User s Manual VE Verify S Records Against Memory stw r4 4 r3 write to caller s buffer belr 0x14 0x0 return to the caller FE MOT_RESVD test csect rw align 2 LDATA csect rw align 2 LRDATA Assume that the program has been compiled and linked to start at address 65040000 Then the program was converted into an S record file named test mx as follows 325650400007C8402A6908300007C8502A6908300044E80002000000000650400006504002412 30D65040020000000000000000069 7056504000091 This file was downloaded into memory at address 40000 The program may be examined in memor
165. e key E 1 serial EEPROM information A 1 serial I O change 4 117 serial port assign to console 4 153 set breakpoint 4 48 set date and time 4 142 set temporary breakpoint 4 157 set up new network 4 105 single key commands D 1 SIOP status codes E 3 specifiy data width 4 98 S Record dump 4 33 S Record fields 8 1 S record format 8 1 S Record download 4 73 S Records 6 2 S Records create 8 5 S Records download file 8 5 S Records types of 8 3 status codes controller independent E 1 disk E 1 SCSI bus E 3 IN 10 SCSI firmware E 3 SIOP E 3 symbol table attach to BUG 4 143 attach to debugger 7 43 detach 4 146 detach from debugger 7 45 display 4 147 load into memory 4 143 search for name 4 147 system boot 2 1 system call BRDINFO 7 48 CIO_CNFG 7 12 CIO_GETS 7 15 CIO_PUTS 7 14 CIO_READ 7 6 CIO_STAT 7 10 CIO_WRIT 7 8 DELAY 7 47 FM_WRIT 7 41 MSIO_CNFG 7 18 MSIO_CTRL 7 27 MSIO_FRMT 7 29 MSIO_READ 7 16 MSIO_WRIT 7 16 NIO_CNFG 7 33 NIO_CTRL 7 38 NIO_READ 7 31 NIO_WRIT 7 31 RETURN 7 46 RTC_READ 7 39 RTC_WRIT 7 40 SCREV 7 50 SYMBOLTA 7 43 SYMBOLTD 7 45 arguments 7 2 invoke 7 1 output arguments 7 2 routines 7 4 disk error codes E 1 system initialization 2 9 system reset 2 9 T tape device R W or format 4 62 target code initiate execution 4 45 target code start execution 4 41 target register change data 4 140 target state after execution 4 149 target state dis
166. e written 4 after the last sector of a track and before the index pulse IOSSSC_ Spare sectors The number of sectors per track allocated as count spare sectors These sectors are only used as replacements for bad sectors on the disk IOSRUN Reserved area The unit of measurement used for IOSRSVC1 and IT units IOSRSVC2 If zero the units are in tracks if 1 the units are in cylinders IOSRSV Reserved count 1 The number of tracks IOSRUNIT 0 or the Cl number of cylinders IOSRUNIT 1 reserved for the alternate mapping area on the disk IOSRSV Reserved count 2 The number of tracks IOSRUNIT 0 or the C2 number of cylinders IOSRUNIT 1 reserved for use by the controller 7 26 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls MSIO_CTRL Code 0303 Description MSIO_CTRL is used to implement any special device control routines that cannot be accommodated easily with any of the other disk routines Right now the only defined routine is SEND packet which allows you to send a packet in the specified format of the controller The required parameters are passed in a command packet which was built somewhere in memory The address of the packet is passed as an argument to the routine Note that the controller packet to send is controller and device dependent Information about this packet should be found in the user s manual for the controller and device being accessed Entry Conditions
167. ed to the S record addresses For information on S records refer to Chapter Running H F 3 Sent to the host before EPPCBug begins to look for S records at the host port This option allows you to send a command to the host device to initiate the download Text should NOT be delimited by any kind of quote marks Text is understood to begin immediately Options C X Arguments n ADDR text 4 162 PowerPC EPPCBug Firmware Package User s Manual Description VE Verify S Records Against Memory following the equals sign and terminate with by pressing 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 This command is identical to the LO command with the exception that data is not stored to memory but merely compared to the contents of memory The VE command accepts serial data from a host system in Motorola S record file format and compares it to data already in the memory If the data does not compare then you are alerted via information sent to the terminal screen In order to accommodate host systems that echo all received characters the text string is sent to the host one character at a time and characters received from the host are read one at a time After the entire command has been sent to the host VE keeps looking for an lt LF gt character from the host signifying the end of the echoed command No data records are processed
168. eeee eens 001000E0 FEFFFFFFF FFFFFFFF FFFFFFFF FEFFFFFF eeeee eens 001000FO FEFFFFFFF FFFFFFFF FFFFFFFF FEFFFFFF eeeeeeee 00100100 00000000 00000000 00000000 00000000 PowerPC EPPCBug Firmware Package User s Manual 4 57 Command Descriptions IOC I O Control for Disk Command Input Description IOC 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 Related Documentation on page 1 4 Use this command as a debugging tool to issue commands to the disk controller to locate problems with either drives media or the controller itself When invoked this command prompts for the controller and drive required The default controller LUN CLUN and device LUN DLUN when IOC is invoked are those most recently specified for IOP IOT or a previous invocation of IOC The command also prompts for an address where the controller command is located You may change the displayed value by typing a new value followed by RETURN To leave the field unaltered press RETURN without typing a new value 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 Vorv Go to the next fi
169. either the debugger directory or the diagnostic directory PowerPC EPPCBug Firmware Package User s Manual 2 3 Description of EPPCBug If you are in the debugger directory then the debugger prompt EPPC Bug gt is displayed and you have all of the debugger commands at your disposal If you are in the diagnostic directory then the diagnostic prompt EPPC Diag gt is displayed and you have all of the diagnostic commands at your disposal as well as all of the debugger commands You may switch between directories by using the Switch Directories SD command or examine the commands in the particular directory that you are currently in by using the Help HE command Refer to Chapter 4 for debugger commands Because EPPCBug is command driven it performs its various operations in response to user commands entered at the keyboard The flow of control in EPPCBug is shown in the individual board specific debugger manuals When you enter a command EPPCBug executes the command and the prompt reappears However if you enter a command that causes execution of user target code for instance GO then control may or may not return to EPPCBug depending on the outcome of the user program Comparison with other Motorola Firmware If you have used one or more of Motorola Computer Group s other firmware debugging packages you will find the PowerPC EPPCBug very similar after making due allowances for the architectural differences between the micr
170. eld This is the default and remains in effect until changed by entering one of the other special characters A Back up to the previous field This remains in effect until changed by entering one of the other special characters Reopen the same field Terminate the IOC command and return control to the debugger 4 58 PowerPC EPPCBug Firmware Package User s Manual IOC I O Control for Disk The power up default for the packet address is the area which is also used by the PL and IOP commands for building packets IOC displays the command packet and if you so instruct it sends the packet to the disk controller following the proper protocol required by the particular controller A device probe with entry into the device descriptor table is done whenever a specified device is accessed via IOC The device probe mechanism utilizes the SCSI commands Inquiry and Mode Sense If the specified controller is nonSCSI the probe simply returns a status of device present and unknown The device probe makes an 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 device present status pointer to the device descriptor PowerPC EPPCBug Firmware Package User s Manual 4 59 Command Descriptions IOI I O Inquiry Command Input Options Description IOI C D1ILINI C Clear the Device Descriptor Table D List Devices while pr
171. er IOSPCOMB 12 Precompensation cylinder number IOSSRB 14 Step rate code IOSRWCCB 15 Reduced write current cylinder number and ECC data burst length Table 7 5 IOSEPRM Fields CFGA Label Bit Position Description IOAGPB1 0 Gap byte 1 IOAGPB2 1 Gap byte 2 IOAGPB3 2 Gap byte 3 IOAGPB4 3 Gap byte 4 IOASSC 4 Spare sector count IOARUNIT 5 Reserved area units IOARVC1 6 Reserved count 1 IOARVC2 7 Reserved count 2 PowerPC EPPCBug Firmware Package User s Manual System Call Routines Attribute Word IOSATW and IOSEATW IOSATW contains various flags that specify characteristics of the media and drive which are defined in the following table All unused bits must be set to zero All IOSEATW bits are undefined and should be set to zero Table 7 6 IOSATW Fields Goss Description Bit 0 Data density 0 Single density FM encoding 1 Double density MFM encoding Bit 1 Track density 0 Single density 48 TPI 1 Double density 96 TPI Bit 2 Number of sides 0 Single sided floppy 1 Double sided floppy Bit 3 Floppy disk format 0 Motorola format sector numbering 1 to n on side 0 n 1 to 2n on side 1 1 Standard IBM format 1 to n on both sides Bit 4 Disk type 0 Floppy disk 1 Hard disk Bit 5 Drive data density 0 Single density FM encoding 1 Double density MFM encoding Bit 6 Drive track density 0 Single density 1 Double density Bit 8 Post read pre write 0
172. er s Manual Using the EPPCBug Debugger When the context switch transitions from the debugger state to the user state the following MPU registers are restored R0 R31 General Purpose Registers SPR26 Restored from IP Register Image SPR27 Restored from MSR Register Image SPRns_ Special Purpose Registers SPR1 SPR8 SPR9 SPR275 CR Condition Register Floating Point Support For EPPCBug the commands MD and MM have been extended to allow display and modification of floating point data in memory Floating point instructions can be assembled disassembled with the DI option of the MD and MM commands Valid data types that can be used when modifying a floating point data register or a floating point memory location Integer Data Types 12 Byte 1234 Half Word 12345678 Word Floating Point Data Types 1_FF_7FFFFF Single Precision Real Format 1_7FF_FFFFFFFFFFFFF Double Precision Real Format 3 12345678901234501_E 123 Scientific Notation Format decimal When entering data in single or double precision format the following rules must be observed 1 The sign field is the first field and is a binary field 2 The exponent field is the second field and is a hexadecimal field PowerPC EPPCBug Firmware Package User s Manual 3 11 Single Precision Real 3 The mantissa field is the last field and is a hexadecimal field 4 The sign field the exponent field and at least the first digit of the mantissa field must be pre
173. er 4 During COLD reset these system initialization processes occur as if the MBX had just been powered up a All static variables are restored to their default states a Breakpoint table and offset registers are cleared a Target registers are invalidated a Input and output character queues are cleared a Onboard devices are reset and the first two serial ports are reconfigured to their default state During WARM reset the EPPCBug variables and tables are preserved as are the target state registers and breakpoints Revision 1 1 of the EPPCBug does not support the WARM reset feature Reset must be used if the processor ever halts or if the EPPCBug environment is ever lost vector table is destroyed stack corrupted etc Break To invoke a Break press and release the BREAK key on the terminal keyboard Break does not generate an interrupt The only time break is recognized is when characters are sent or received by the PowerPC EPPCBug Firmware Package User s Manual 2 9 Restarting the System 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 Occasionally it may be desirable to terminate a debugger command prior to its completion for example the display of a large block of memory Break allows you to termin
174. er mask When specifying a register range REG1 and REG2 do not have to be of the same class The register mask used by RD is also used by all exception handler routines including the trace and breakpoint exception handlers PowerPC EPPCBug Firmware Package User s Manual 4 131 Command Descriptions For all modules the MPU registers in ordering sequence are IP Instruction Pointer MSR Machine State Register CR Condition Codes Register RO R31 General Purpose 32 SPR1 SPR287 Special Purpose Registers 17 Total 52 Registers Examples Example 1 Default display MPU subset also called out by DEF EPPC Bug gt RD lt CR gt IP 00040010 MSR 00003030 CR 00000020 RO 00000000 R1 00020000 R2 FFFO178C R3 00041000 R4 22EDB280 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R1 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R1 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPR1 00000000 SPR8 00020014 SPR9 00000000 00040010 4 amp 800020 BCLR 20 0 EPPC Bug gt 4 132 PowerPC EPPCBug Firmware Package User s Manual Example 2 RD Register Display Change the mask to display all MPU regis
175. ersion Identifier ar eae 02 Least Significant Word 04 Node Control Memory Most Significant Word 06 Address Least Significant Word 08 Most Significant Word Reserved ie 0A Least Significant Word 0C Most Significant Word Reserved ii fec 0E Least Significant Word 10 Most Significant Word Reserved wih 12 Least Significant Word 14 Most Significant Word Boot File Length EN 16 Least Significant Word 18 Most Significant Word Boot File Byte Offset z em i a 1A Least Significant Word 1C Trace Buffer Address Most Significant Word 1E TXD RXD Least Significant Word 20 Most Significant Word Client IP Address i ren oop a 22 Least Significant Word 24 Most Significant Word Server IP Address os em a 2 26 Least Significant Word 28 Most Significant Word Subnet IP Address Mask os ae nisi re 2A Least Significant Word 7 34 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls F E D C BA 9 8 7 6 5 4 3 2 10 2C Most Significant Word Broadcast IP Address Mask eae 2E Least Significant Word 30 Most Significant Word Gateway IP Address Lae 32 Least Significant Word 34 BOOTP RARP Retry TFTP ARP Retry 36 BOOTP RARP Control Update Control 38 Boot Filename String 40 amp 64 Bytes 76 78 Argument Filename String 40 amp 64 Bytes B6 Field descriptions Node Control Memory Address Client IP Address Server IP Address Subnet IP Address Mask Broadcast IP Address Gateway IP Add
176. esent warnings of certain dangers of which Motorola is aware You as the user of the product should follow these warnings and all other safety precautions necessary for the safe operation of the equipment in your operating environment Ground the Instrument To minimize shock hazard the equipment chassis and enclosure must be connected to an electrical ground The equipment is supplied with a three conductor ac power cable The power cable must be plugged into an approved three contact electrical outlet The power jack and mating plug of the power cable meet International Electrotechnical Commission IEC safety standards Do Not Operate in an Explosive Atmosphere Do not operate the equipment in the presence of flammable gases or fumes Operation of any electrical equipment in such an environment constitutes a definite safety hazard Keep Away From Live Circuits Operating personnel must not remove equipment covers Only Factory Authorized Service Personnel or other qualified maintenance personnel may remove equipment covers for internal subassembly or component replacement or any internal adjustment Do not replace components with power cable connected Under certain conditions dangerous voltages may exist even with the power cable removed To avoid injuries always disconnect power and discharge circuits before touching them Do Not Service or Adjust Alone Do not attempt internal service or adjustment unless another person capable of
177. et the packet identifier The data field length byte can also be used to determine where the next packet starts and where the current packet ends The last packet of the VPD data is followed by the termination packet identifier this indicates the end of initialized VPD data The packets can be in any order however no hole or gaps can exist between packets The VPD EEPROM always starts with the eye catcher and size fields These fields can be used to determine the integrity of the VPD EEPROM In addition an optional EEPROM CRC packet may be specified to further the confidence of VPD data integrity Data packets can be added to the VPD EEPROM contents These packets must adhere to the previously stated format A range of packet identifiers are reserved for use by the customer Addition of user packets is discouraged Examples of possible user defined packets 1 2 LCD Panel Type such as Sharp LM32K07 Hitachi LMC7211URFR ALPS LRUBJ904XB Size of the installed BBRAM in bytes A 2 PowerPC EPPCBug Firmware Package User s Manual Vital Product Data VPD Data Definitions The following table describes and lists the current assigned packet identifiers Table A 1 VPD Packet Types zZ Identifier Size Description Date Type n 00 N A Guaranteed Illegal N A 01 Variable Product Identifier MBX ASCII 1 02 Variable Factory Assembly Number
178. fer Entry Execute Command Input HBX N Entry Description As noted under the HBD command the MBX board keeps track of the last 128 commands entered since power up You can run any previous command by running HBX with the entry number that you want to execute Refer to Appendix D for additional history buffer features Examples EPPC Bug gt ioi lt cr gt I O Inquiry Status CLUN DLUN CNTRL TYPE DADDR DTYPE RM Inquiry Data EPPC Bug gt hbd lt cr gt t ioi 2 hbd EPPC Bug gt hbx 1 lt cr gt EPPC Bug gt ioi I O Inquiry Status CLUN DLUN CNIRL TYPE DADDR DTYPE RM Inquiry Data EPPC Bug gt 4 52 PowerPC EPPCBug Firmware Package User s Manual HE Help HE Help Command Input HE COMMAND appropriate titles Note that the actual display output is dependent Evaluation Description HE is the EPPCBug help facility HE lt RETURN gt displays the command names of all available commands along with their upon the host CPU functionality and version of the resident debugger HE COMMAND displays only the command name title and syntax for that particular command Examples EPPC Bug gt HE lt CR gt AS Assembler BC Block of Memory Compare BF Block of Memory Fill BI Block of Memory Initialize BM Block of Memory Move BS Block of Memory Search BR Breakpoint Insert BV Block of Memory Verify CS Checksum a Block of Data CSAR PCI Con
179. ffers one for command line input and the other for user dialogue input such as query and response type commands Entries within the input buffer shall be terminated with a NULL character History Buffer Commands The input history buffers have the ability to be recalled and edited The editing process conforms to a subset of UNIX vi editor as used on an UNIX command line The following table describes and lists the supported commands Note that command modifiers and multiple key commands are not permitted e g 10cl 71 3dw 2b All commands are restricted to a single key Table D 1 History Input Buffer Recall Edit Edit Descripti Move the cursor one position Command to the left back a character Move the cursor one position Command to the left back a character Backspace 0x08 Erases the previous just Insert Key Hexadecimal Sequence Code Backspace 0x08 Control H 0x08 inserted character PowerPC EPPCBug Firmware Package User s Manual D 1 History Buffer Commands Table D 1 History Input Buffer Recall Edit Key Sequence Control H Hexadecimal Code 0x08 Description Erases the previous just inserted character Edit Mode Insert Enter 0x0D Finishes editing of the line and submits the entire visible line to the firmware monitor regardless of the current cursor position Command Insert Escape 0x1B Terminate the character insertion
180. figuration Space READ Access CSAW PCI Configuration Space WRITE Access DC Data Conversion and Expression DS Disassembler DIT Display Temperature DU Dump S Records ECHO Echo String V Edit Environment G Alias for GO Command GD Go Direct Ignore Breakpoints GN Go to Next Instruction GO Go Execute User Program Press RETURN to continue PowerPC EPPCBug Firmware Package User s Manual 4 53 Command Descriptions GT Go to Temporary Breakpoint HBD History Buffer Display HBX History Buffer Entry Execute F Help on Command s I2C I2C Device Read Write IOC I O Control for Disk IOI I O Inquiry IOP I O Physical to Disk IOF I O Teach for Configuring Disk Controller Lo Load S Records from Host Alias for MM Command A lacro Define Display AE lacro Edit AL Enable Macro Expansion Listing D Memory Display IDS Memory Display Memory Modify AP MPC8xx Memory Map Display D Memory Map Diagnostic iS Memory Set MW Memory Write Press RETURN to continue NIOC letwork I O Control NIOP letwork I O Physical NIOT I O Teach for Configuring Network Controller NOBR Breakpoint Delete NOVA lacro Delete NOMAL Disable Macro Expansion Listing NOPA Printer Detach NOPF Port Detach NOSYM Detach Symbol Table NPING letwork Ping OF Offset Registers Display Modify PA Printer Attach EE Port Format PFLASH Progra
181. g Memory Set is used to write data to memory starting at the specified address Hexadecimal numbers are not assumed to be of a particular size so they can contain any number of digits as allowed by command line buffer size If an odd number of digits are entered the least significant nibble of the last byte accessed will be unchanged ASCII strings can be entered by enclosing them in single quotes To include a quote as part of a string two consecutive quotes should be entered Note that one or more hexadecimal numbers and ASCII strings may be entered in the same command Assume that memory is initially cleared EPPC Bug gt MS 25000 0123456789ABCDEF This is EPPCBug 23456 lt CR gt EPPC Bug gt EPPC Bug gt MD 25000 20 B 00025000 01 23 45 67 89 ABCD EF 54 68 69 73 20 69 73 20 Eg This is 00025010 22 45 56 4D 42 75 67 22 23 45 60 00 00 00 00 00 EPPCBug E EPPC Bug gt 4 PowerPC EPPCBug Firmware Package User s Manual 4 97 Command Descriptions MW Memory Write Command Input MW ADDR DATA B H W Options B Byte H Half word W Word Description The MW command writes a specific data pattern to a specific location No verify read is performed You also can specify the data wi dth The default data width is word Examples Example 1 0001 00011 EPPC Bug gt MW 1E000 55AA55AA lt CR gt Effective
182. g Firmware Package User s Manual Motorola ROM Boot The following table specifies the layout of this file format Table 6 3 File Format Motorola ROM Boot Program Loading Offset 000 Length 4 Contents BOOT 0x424F4F54 Description ASCII string indicating possible routine the checksum must be valid match the expected checksum 004 Entry Address 32 bit word offset into image to begin execution 008 00C variable Module Length Module Name 32 bit word indicating the size of the module this includes the length from the BOOT field to and including the two byte checksum field ASCII string containing the module name The Module Name field is followed by the user defined code and data fields Following the user defined fields a 2 byte checksum must be present The following algorithm can be used to generate the required 2 byte checksum unsigned int cs16 addr cnt unsigned int addr unsigned int cnt unsigned short lptr unsigned int x unsigned shor t y isum sum for lptr unsigned short addr x sum 0 x lt cnt x y lptr isum sum y PowerPC EPPCBug Firmware Package User s Manual 6 11 Register State at Program Load Time if isum lt y isum lt sum isum 1 sum isum return sum Register State at Program Load Time The following table lists the sta
183. g gt NOPA 3 lt CR gt Printer 03 detached EPPC Bug gt Example 4 Detach all possible attached printers EPPC Bug gt NOPA lt CR gt EPPC Bug gt 4 116 PowerPC EPPCBug Firmware Package User s Manual PF NOPF Port Format Detach PF NOPF Port Format Detach Command Input PF PORT NOPE PORT Description Use this command to examine and change the serial input output environment PF may be used to display a list of the current port assignments configure a port that is already assigned or assign and configure a new port Configuration is done interactively much like modifying registers or memory RM and MM commands An interlock is provided prior to configuring the hardware you must explicitly direct PF to proceed The serial ports that are labeled a DEBUG LUN 0 a HOST LUN 1 a Console LUN dependent DEBUG LUN by default by the debugger are special in that you can remove NOPF them Any changes remain in effect until a reset operation occurs or another PF execution The reset operation via the debugger sets the serial ports that are labeled DEBUG LUN 0 port 0 and HOST LUN 1 port 1 to the default parameters Refer to General Installation and Startup on page 2 6 for details on terminal setup Note Only nine ports may be assigned at any given time Port numbers must be in the range 0 to 1F PowerPC EPPCBug Firmware Package User s Manual 4 117 Command Descriptions L
184. g 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 4 78 PowerPC EPPCBug Firmware Package User s Manual MA NOMA Macro Define Display Delete cause the string pool to overflow The string pool has a capacity of 511 characters The only way to add or expand macros when the string pool is full is either to delete or edit macro s Debugger commands contained in macros may reference arguments supplied at invocation time Arguments are denoted in macro definitions by embedding a back slash followed by a numeral Up to 10 0 to 9 arguments are permitted A definition containing a back slash followed by a zero would cause the first argument to that macro to be inserted in place of the 0 characters Similarly the second argument would be used whenever the sequence 1 occurred For instance entering ARGUE 3000 1 B on the debugger command line would invoke the macro named ARGUE with the text strings 3000 1 and B replacing 0 1 and 2 respectively within the body of the macro The L option toggles the loop continuous macro mode If the current macro mode is loop continuous then once a macro is invoked it is automatically reinvoked for continuous operation To delete a macro
185. g through the fields The special characters are V orv Go to the next field This is the default and remains in effect until changed by entering one of the other special characters n Back up to the previous field This remains in effect until changed by entering one of the other special characters Reopen the same field Terminate the IOP command and return control to the debugger A device probe with entry into the device descriptor table is done whenever a specified device is accessed via IOP The device probe mechanism utilizes the SCSI commands Inquiry and Mode Sense If the specified controller is nonSCSI the probe simply returns the message device present and unknown The device probe makes an entry into the device descriptor table with 4 62 PowerPC EPPCBug Firmware Package User s Manual JN Caution IOP I O Physical to Disk 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 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 The following prompts appear some prompts are device dependent Controller LUN 00 The Logical Unit Number LUN of the controller to access Device LUN 00 The LUN of the device to access Read Write Format R
186. ge User s Manual 4 151 Command Descriptions R4 000000FF R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 R16 00000000 R17 00000000 R18 00000000 R19 00000000 R20 00000000 R21 00000000 R22 00000000 R23 00000000 R24 00000000 R25 00000000 R26 00000000 R27 00000000 R28 00000000 R29 00000000 R30 00000000 R31 00000000 SPRO 00000000 SPR1 00000000 SPR8 00020014 SPR9 00000000 00030014 38630001 ADDI R3 R3 1 EPPC Bug gt Notice that in the last example that the breakpoint was reached the message At Breakpoint 4 152 PowerPC EPPCBug Firmware Package User s Manual TA Terminal Attach TA Terminal Attach Command Input TA PORT Description Use the TA command to assign any serial port to be the console The port specified must already be assigned Refer to PF NOPF Port Format Detach on page 4 117 Examples Example 1 Select port 1 logical unit 01 as console Console changed to port 1 and no prompt appears unless port 1 was already the console All keyboard exchanges and displays are now made through port 1 This remains in effect until either another TA command has been issued or the reset switch was depressed EPPC Bug gt TA 1 lt CR gt Console 01 MPC601EVM HOST Example 2 Restore console to por
187. gt EPPC Bug gt 4 28 PowerPC EPPCBug Firmware Package User s Manual DC Data Conversion DC Data Conversion Command Input DC EXP ADDR B O A Options B Binary O Octal A ASCII Description The DC command is used to simplify 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 for instance if the most significant bit of the 32 bit internal representation of the number is set then both the signed and unsigned interpretations are displayed The B option displays the output in binary the O option displays the output in octal and the A option displays the ASCII character equal to the value If the value is greater than 7F the A option displays NA Examples by PC Bug gt DC 10 lt CR gt 00000010 10 amp 16 EPPC Bug gt EPPC Bug gt DC amp 10 amp 20 lt CR gt SIGNED FFFFFFF6 A amp 10 UNSIGNED FEFFFEF6 SFEFEFEF6 amp 4294967286 EPPC Bug gt a U EPPC Bug gt DC 123 4345 067 1100001 lt CR gt 00000314 314 amp 788 EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 29 Command Descriptions EPPC Bug gt DC 2 3 8 4 lt CR gt 0000000C C amp 12 EPPC Bug gt EPPC Bug gt DC 55 amp F lt CR gt 00000005 5 amp 5 EPPC Bug gt EPPC Bug
188. haracter string 6 Five separating characters Space comma period slash dash 7 The character asterisk indicates the current instruction pointer value PowerPC EPPCBug Firmware Package User s Manual 5 9 Addressing Modes 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 of the PowerPC Microprocessor Family The Programming Environments You may use an expression in any numeric field of these addressing modes The assembler has a built in expression evaluator It supports the following operand types Binary numbers Octal numbers Decimal numbers Hexadecimal numbers String literals Offset registers Instruction pointer Allowed operators are Addition Subtraction Multiply Divide Shift left Shift right Bitwise OR Bitwise AND Modulus 10 765 0 amp 987 0 FED 0 foo ZO Z7 plus minus asterisk slash lt lt left angle brackets gt gt right angle brackets exclamation mark amp ampersand percent PowerPC EPPCBug Firmware Package User s Manual One Line Assembler Disassembler Exponential circumflex One s Complement tilde The order of evaluation is strictly left to right with no precedence granted
189. he N nonaligned option has been selected then the data is searched for on a byte by byte basis rather than by half words or words regardless of the size of data This is useful if a half word or word pattern is being searched for but is not expected to lie on a half word or word boundary 4 If a match is found then the address of the first byte of the match is output along with the memory contents If a mask was in use then the actual data at the memory location is displayed rather than the data with the mask applied Mode 3 Data Verification If the V verify option has been selected then displaying of addresses and data is done only when the memory contents do NOT match the user specified pattern Otherwise this mode is identical to the Mode 2 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 A message is printed at the bottom of the screen indicating that there is more to display To resume output you should simply press any character key To cancel the output and exit the command you should press the BREAK key If a match is found or in the case of Mode 3 a mismatch with a series of bytes of memory whose beginning is within the range but whose end is outside of the range then that match is output 4 18 PowerPC EPPCBug Firmware Package User
190. he PowerPC based MPC 821 860 MBX Series of board and system level products is derived from the BUG firmware currently used on all Motorola Computer Group M68000 and M88000 based CPU modules The PowerPC firmware family provides a high degree of functionality and user friendliness yet stresses portability and ease of maintenance The firmware is portable and comprehensive because it is written entirely in the C programming language except where forced to utilize assembler functions Description of EPPCBug The EPPCBug package is a powerful evaluation and debugging tool for systems built around the Motorola MBX Series boards Facilities are available for loading and executing user programs under complete operator control for system evaluation EPPCBug includes commands for a Display and modification of memory a Breakpoint and tracing capabilities a Assembler disassembler useful for patching programs Various EPPCBug routines that handle I O and general service functions are available to user programs through the System Call handler The System Call handler is accessible through the system call SC instruction with exception vector 00C00 System Call Exception EPPCBug consists of A command driven user interactive software debugger described in Chapter 3 and hereafter referred to as the debugger or EPPCBug A user interface which accepts commands from the system console terminal When using EPPCBug you operate out of
191. her numeric value would be String Literal Numeric Value In Hexadecimal A 41 ABC 414243 TEST 54455354 Evaluation of an expression is always from left to right unless parentheses are used to group part of the expression There is no operator precedence Subexpressions within parentheses are evaluated first Nested parenthetical subexpressions are evaluated from the inside out 3 4 PowerPC EPPCBug Firmware Package User s Manual Using the EPPCBug Debugger Valid expression examples Expression Result In Notes Hexadecimal FF0011 FF0011 45 99 DE amp 45 amp 99 90 35 67 10 5C 10011110 1001 A7 88 lt lt 4 880 shift left AA amp FO AO logical AND The total value of the expression must be between 0 and FFFFFFFF Address as a Parameter Many commands use ADDR as a parameter The syntax accepted by EPPCBug is similar to the one accepted by the PowerPC one line assembler All control addressing modes are allowed An address offset register mode is also provided Address Formats Addresses are entered as a hexadecimal number For instance 20000 would correspond to address 00020000 The address or starting address of a range can be qualified by a suffix of the form AS s U or u where S or s defines Supervisor address space and U or u defines user address space The default when the qualifier is not specified is Supervisor Note EPPCB
192. i of the Rights in Technical Data and Computer Software clause at DFARS 252 227 7013 Motorola Inc Computer Group 2900 South Diablo Way Tempe Arizona 85282 Preface The EPPCBug Firmware Package User s Manual provides information on the EPPCBug firmware the start up and boot routines the debugger commands the one line assembler disassembler and the debugger system calls All information contained herein is specific to Motorola s PowerPC based MBX Series boards This manual covers release 1 1 of EPPC1Bug Motorola and the Motorola symbol are registered trademarks of Motorola Inc PowerStack is a trademark of Motorola Inc PowerPC is a trademark of IBM and is used by Motorola with permission AIX is a trademark of IBM Corp SunOS is a trademark of Sun Microsystems Windows is a registered trademark of Microsoft Corp All other products mentioned in this document are trademarks or registered trademarks of their respective holders 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 specific 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 safety precautions listed below repr
193. ice s data width 08 1 FMC_WEDW Write Erase Data Width The FLASH memory devices must be programmed in parallel when the write erase data width exceeds the device s data width EEPROM Example The following hexadecimal ASCII dump illustrates an example EEPROM contents 000 010 020 030 040 050 060 070 080 090 OAO 4D OC 37 00 02 00 09 4F 30 31 00 62 02 00 54 4F 31 2D 38 39 00 00 5A 00 09 05 01 00 52 57 34 00 07 38 D4 4F 33 34 00 04 36 08 4c 32 04 00 00 30 04 41 36 10 00 00 45 04 o1 39 00 05 80 4E 08 00 01 03 4D 42 46 30 31 42 03 00 00 00 00 00 04 02 62 5A 00 00 08 06 08 00 OA 04 00 00 00 08 FF FF FF FF 58 02 MOTOROLA MBX 07 32 01 W3269F01B 2 00 00 718944 06 04 arraien x 3E 20 x gt 00 OB 860EN BEBE E E E ache FE EE FE OEE EE FE FE EF FE EF FF FF FF FE EEPE ad esaea gcek aes FE EE Fr FE EE FE FE EF EE FE FF FF FF FE Se a eee ee ae ee ee FE FE EE HE FE FE EE FE FE EF FF FF FF FE EEPE cca swan naw 3S FE FF Fr FE EH FE FE FE FE EF FF FF FE FE BEDE peeves ea ee cee ees A 6 PowerPC EPPCBug Firmware Package User s Manual Vital Product Data A OBO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF on wee ee ee ees OCO FF FF
194. ich follows is to be loaded 040024 The next 32 character pairs of the first S2 record are the ASCII bytes of the actual program code data In this assembly language example the hexadecimal opcodes of the program are written in the sequence in the The first S2 record is explained as follows S2 24 040000 7C8402 S record type S2 indicating that it is a code data record to be loaded verified at an 6 byte address Hexadecimal 24 decimal 36 indicating that 36 character pairs representing 36 bytes of binary data follow Six character 3 byte address field hexadecimal address 00040000 where the code data which follows is to be loaded 040024 The next 32 character pairs of the first S2 record are the ASCII bytes of the actual program code data In this assembly language example the hexadecimal opcodes of the program are written in the sequence in the code data fields of the S2 records 8 6 PowerPC EPPCBug Firmware Package User s Manual S Record Output Format Address Opcode Instruction 0004 0004 0004 0004 0004 0004 0004 0004 0004 0004 42 0000 0004 0008 000C 0010 0014 0018 001C 0020 0024 7C8402A6 MFSPR R4 4 90830000 STW R4 0 R3 00000000 7C8502A6 MFSPR R4 5 90830004 STW R4 4 R3 00000004 4E 800020 BCLR 20 0 00000000 WORD 00000000 65040000 ORIS R4 R8 0 65040024 ORIS R4 R8 24 00000000 WORD 00000000 00000000 WORD 00000000 The checksum
195. identify message after re selection 1E SIOP failed during script patching 1F SIOP not attached to SCSI bus E 4 PowerPC EPPCBug Firmware Package User s Manual A access devices 2 1 access disassembler 4 31 accessing device drivers B 1 ADDER as parameter 3 5 address map I O 2 12 memory 2 12 Address Resolution Protocol 6 7 addresses alternate form 3 6 entering 3 5 addressing modes assembler 5 10 assembler addressing modes 5 10 branch operands 5 16 character set 5 3 5 9 comparison 5 3 define constant 5 12 disassembled source line 5 5 enter source line 5 15 error messages 5 17 Floating point 5 6 invoke 5 14 limitations 5 1 list programs 5 16 mnemonic directives 5 2 modify source programs 5 13 operand field 5 5 overview 5 1 processor registers 5 7 pseudo registers 5 6 source line format 5 4 Index source program code 5 4 syscall directive 5 12 assembler code use 2 5 attach printer 4 115 attribute mask 7 22 attribute word 7 22 7 24 baud rate reconfigure 2 6 baud rates change 4 118 big endian 1 3 board configuration information A 1 booting methods 6 8 booting program load from mass stor age 6 8 BOOTstrap protocol 6 7 branch operands entering 5 16 break invoking 2 9 state of breakpoints 2 10 breakpoint insert delete 4 15 breakpoint temporary 4 43 4 48 4 157 breakpoints and control 3 1 breakpoints during tracing 4 149 C C header files See header files CFGA See Configu
196. ient are resident on the same network If they are not the gateway IP address is used as the intermediate server to perform the TFTP session with The filename character string has a maximum length of 64 bytes Whenever an error occurs the TFTP session is terminated and the error code is displayed The error codes are listed in Appendix H Upon successful transfer of the specified file the TFTP session statistics are displayed When invoked this command goes into an interactive mode which prompts for information required to perform the command You may change the displayed value by typing a new value and RETURN To leave the field unaltered press RETURN without typing a new value 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 Vorv Open the next field This is the default and remains in effect until changed by entering one of the other special characters 4 102 PowerPC EPPCBug Firmware Package User s Manual NIOP Network I O Physical A Back up and open the previous field Reopen the same field Terminate the NIOP command and return control to the debugger The NIOP command utilizes the necessary configuration parameters to perform the TFTP file transfer Prompts appear for entering the parameters Refer to NIOT I O Teach for Configuring Network Controller on page 4 105 for a description of the parameters
197. ifying 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 4 82 PowerPC EPPCBug Firmware Package User s Manual MAE Macro Edit Examples List definition of macro ABC Add a line to macro ABC Replace line 010 from macro ABC Remove the specified line from the macro ABC EPPC Bug gt MA ABC lt CR gt ACRO ABC 010 MD 3000 020 GO 0 EPPC Bug gt EPPC Bug gt MAE ABC 15 RD lt CR gt ACRO ABC 010 MD 3000 020 RD 030 GO 0 EPPC Bug gt EPPC Bug gt MAE ABC 10 MD 10 Z0 lt CR gt ACRO ABC 010 MD 10 20 020 RD 030 GO 0 EPPC Bug gt EPPC Bug gt MAE ABC 30 lt CR gt ACRO ABC 010 MD 10 2Z0 020 RD EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 83 Command Descriptions MAL NOMAL Enable Disable Macro Expansion Listing Command Input MAL NOMAL Description The MAL command lets you 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 Use the NOMAL command to suppress the listing of the macro lines during execution Using MAL and NOMAL is a convenience for you and in no way interacts with the function of the macros 4 84 PowerPC EPPCBug Firmware Package User s Manual MD Memory Display MD
198. ination has its own descriptor table which houses configuration and run time parameters If the controller and device LUNs are used for Network Automatic Boot any changes made by this command are saved in NVRAM 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 PowerPC EPPCBug Firmware Package User s Manual 4 105 Command Descriptions At probe time the probed device s name is copied into the dynamic device configuration tables housed within in NVRAM This is done only if the device is present You may view the system s device names by the performing the following operations a When invoked this command goes into an interactive mode which prompts for information required to perform the command You may change the displayed value by typing a new value and pressing RETURN To leave the field unaltered press RETURN without typing a new value a You may also enter a special character either at the prompt or after typing new data to scroll through the fields The special characters are Vorv Open the next field This is the default and remains in effect until changed by entering one of the other special characters 4 Back up and open the previous field Reopen the same field Terminate the NIOT command and return contro
199. inker Format ELF PowerPC Version Binary bin Command s Processor Motorola ROM Boot rom Each interface is uniquely identified by a logical unit number LUN More specifically each interface is identified with a LUN pair CLUN DLUN Refer to the appropriate section of this specification for the definition of the actual LUNs To aid the boot process the following global configuration variables are specified utilized 6 2 PowerPC EPPCBug Firmware Package User s Manual Program Loading Default Load Address Point LAP This address specifies the load point for program load file formats binary and command s processor Binary file formats do not indicate the memory load address of the program load LAP defines the load point for binary images Default Execution Address Point EAO This address specifies the execution point offset from LAP for the program load file format binary Binary format does not indicate the execution address of the program load Default Intermediate Load Address Point ILAP This address specifies the load point in which the intermediate program load takes place A region of read write memory is needed to first load the program Once loaded the firmware determines the program load format and moves to the linked address the program accordingly LAP EAO and ILAP are tunable via the ENV command Additional Program Load Interfaces Program loading is dependent
200. ion SROMs contains data which is crucial to the correct operation of the board The I2C command does not provide any sanity or error checking of data written to these devices The user should take care in modifying the contents of the VPD SROM or DIMM SROM s or the board may be rendered inoperable Examples To read the contents of the VPD SROM I2C bus address 0xA4 into address 0x100000 4 56 PowerPC EPPCBug Firmware Package User s Manual I2C I2C Device Read Write EPPC Bug gt i2e a4 100000 100 d EPPC Bug gt mds 100000 00100000 4D4F544F 524F4C41 01000103 4D425802 MOTOROLA MBX 00100010 0C30312D 57333236 39463035 41030732 01 W3269F05A 2 00100020 37313839 34340410 00000000 00000000 718944 00100030 00000000 00000000 0504017D 78400604 ix 00100040 017D7840 07040000 80000806 08003E20 x gt 00100050 OOO2FFEFF FFFFFFFF FFFFFFFF FFEFFFFF eeeee eens 00100060 FEFFFFFF FFFFFFFF FFFFFFFF FEEFFFFF eeeeeeeee 00100070 FEFFFFFFF FFFFFFFF FFFFFFFF FEEFFFFF eeee eens 00100080 FEFFFFFF FFFFFFFF FFFFFFFF FEFFFFFF eeeee eens 00100090 FFEFEFEF FFFFFFFF FFFFFFFF FEFFFFFF eeeeeeeee 001000A0 FEFFFFFFF FFFFFFFF FFFFFFFF FEEFFFFF eee eee eee 001000BO FEFFFFFFF FFFFFFFF FFFFFFFF FEFFFFFF ee eee e eee 001000C0 FEFFFFFFF FFFFFFFF FFFFFFFF FEFFFFFF eeeeeeee 001000D0 FEFFFFFFF FFFFFFFF FFFFFFFF FEFFFFFF ee
201. ion tracing Run Mode These vectors may be taken over under an user s application However prior to returning control to the debugger these vectors must be restored for proper operation of the affected features PowerPC EPPCBug Firmware Package User s Manual 3 9 MPU CPU Registers MPU CPU Registers Certain MPU CPU registers must be preserved for their specific uses MPU Register SPR272 MPU register SPR272 is reserved for use by the debugger If SPR272 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 SPR273 SPR275 These MPU registers are utilized by debugger as scratch registers Context Switching Context switching is viewed as switching from the debugger state to the user target state or vice a versa This switching occurs upon the invocation of debugger commands GD GN GO GT T and TT or the return from user state to the debugger state When the context switch transitions from the user state to the debugger state the following MPU registers are captured R0 R31 General Purpose Registers SPRns Special Purpose Registers SPR1 SPR8 SPR9 SPR18 SPR19 SPR22 SPR26 SPR27 SPR268 PSR269 SPR272 SPR273 SPR274 SPR275 SPR284 SPR285 SPR286 IP Instruction Pointer copy of SPR26 MSR Machine State Register copy of SPR27 CR Condition Register 3 10 PowerPC EPPCBug Firmware Package Us
202. is probing facilitates the testing measurement and management of the network NPING utilizes the ICMP protocol s mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway The packet size has a fixed length of 128 bytes At any time an error occurs the NPING session is terminated and the appropriate error code is displayed The receive packet is checked for checksum and data integrity Prior to the NPING session an ARP request is transmitted for the hardware Ethernet address of the destination The source and destination IP addresses must always be specified No gateway IP address is used Refer to the DARPA Internet Request for Comments RFC 792 for the description of the ICMP protocol 4 110 PowerPC EPPCBug Firmware Package User s Manual 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 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 Use TIME L to see if the clock is running Use the SET command to start and initialize the clock PowerPC EPPCBug Firmware Package User s Manual 4 111 Comm
203. isting Current Port Assignments Examples PF lists the names of the module board and port for each assigned port number LUN when the command is invoked with the port number omitted EPPC Bug gt PEF lt CR gt Current port assignments LUN Device name Port name 00 MPC8xx SMC 01 MPC8xx SMC 02 Memory EPPC Bug gt Configuring a Port The primary use of PF is changing baud rates stop bits etc This may be accomplished for assigned ports by invoking the command with the desired port number Assigning and configuring may be accomplished consecutively Refer to Assigning a New Port in this section When PF is invoked with the number of a previously assigned port the interactive mode is entered immediately To exit from the interactive mode enter a period by itself or following a new value setting While in the interactive mode the following rules apply Only listed values are accepted when a list is shown The sole exception is that upper or lowercase may be interchangeably used when a list is shown Case takes on meaning when the letter itself is used such as XON character value a Control characters are accepted by hexadecimal value or by a letter preceded by a caret Control A CTRL A would be 4A The caret when entered by itself or following a value causes Port Format to issue the previous prompt after each entry 4 118 PowerPC EPPCBug Firmware Package User s Manual PF NOPF Port For
204. ize codes Some instructions and directives can operate on more than one data size For these operations the data size code must be specified or a default size applicable to that instruction is assumed The size code need not be specified if only one data size 5 4 PowerPC EPPCBug Firmware Package User s Manual One Line Assembler Disassembler is permitted by the operation Refer to the PowerPC Microprocessor Family The Programming Environments for a definition of allowable size codes The data size code is not permitted when the instruction or directive does not have a data size attribute Operand Field If present the operand field follows the operation field and is separated from the operation field by at least one space When two or more operand subfields appear within a statement they must be separated by a comma Disassembled Source Line The disassembled source line may not look identical to the source line entered The disassembler makes a decision on how it interprets the numbers used If the number is an offset from register it is treated as a signed hexadecimal offset Otherwise it is treated as a straight unsigned hexadecimal PowerPC EPPCBug Firmware Package User s Manual 5 5 Mnemonics and Delimiters Mnemonics and Delimiters The assembler recognizes all PowerPC instruction mnemonics Numbers are recognized as a Binary a Octal a Decimal a Hexadecimal default Numbers may be represe
205. l to the debugger You are prompted to save changes The field prompts are shown below A retry value of 0 is interpreted as no maximum always retry 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 The node control memory address is dynamically calculated The saved version i e NVRAM is now ignored 4 106 PowerPC EPPCBug Firmware Package User s Manual NIOT I O Teach for Configuring Network Controller Client IP Address 255 255 255 255 The IP address of the client The firmware is considered the client Server IP Address 255 255 255 255 The IP address of the server The server is the host system from which the specified file is retrieved Subnet IP Address Mask 255 255 255 0 The subnet IP address mask This mask is used to determine if the server and client are resident on the same network If they are not the gateway IP address is used as the intermediate target server Broadcast IP Address 255 255 255 255 The broadcast IP address that the firmware utilizes when a IP broadcast needs to be performed Gateway IP Address 255 255 255 255 The gateway IP address The gateway IP address would be necessary if the server and the client do not reside on the same network The gateway IP address would be used as the intermediate target server
206. lent to the IOSPRM and IOSEPRM fields with the Mask lower half word equivalent to IOSPRM and the upper half word equivalent to IOSEPRM PowerPC EPPCBug Firmware Package User s Manual 7 19 System Call Routines Attributes Mask Attributes Flags Parameters Equivalent to the IOSATM and IOSEATM fields with the lower half word equivalent to IOSATM and the upper half word equivalent to IOSEATM Equivalent to the IOSATW and IOSEATW fields with the lower half word equivalent to IOSATW and the upper half word equivalent to IOSEATW The parameters used for device reconfiguration are specified 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 Table 7 2 Disk Packet Parameters Param ter Offset Length CFGA Bytes Bytes Equivalent Description P_DDS 10 1 N A Device descriptor size For internal use only this field does not have an equivalent CFGA field It should be set to 0 P_DSR 11 1 IOSSR Step rate encoded Refer to the IOSSR field in Table 7 7 for step rate code values P_DSS 12 1 IOSPSM Sector size encoded as follows IOSPSM is a two byte field containing the actual sector size 00 128 bytes 01 256 bytes 02 512 bytes 03 1024 bytes 04 Reserved encodings F F 7 20 P
207. lly received 7 6 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing The user specified buffer has been written with the data bytes received The output parameter block indicates the number of bytes actually received The number of bytes received may be less than the requested number or even zero if no characters were available PowerPC EPPCBug Firmware Package User s Manual 7 7 System Call Routines ClO_WRIT Code 0201 Description CIO_WRIT writes bytes to the specified serial device from the buffer specified by the caller CIO_WRIT does not translate transmitted characters Characters are sent to the device exactly as they exist in the buffer No CR to LF or other canonical processing is provided CIO_WRIT does not wait for all requested characters to be sent before returning It writes characters to the output device from the buffer until the device transmitter indicates it cannot accept another character or the number of bytes requested is sent CIO_WRIT may be used to send a break condition to the output device as well Entry Conditions R3 points to the input parameter block Offset Description 0x0 CLUN of device 0 selects current output device 0x4 DLUN of device 0 selects current output device 0x8 Pointer to data buffer or 1 to caus
208. m FLASH Memory RD Register Display RESET Cold Wamm Reset RL Read Loop RI Register Modify RS Register Set SD Switch Directories 4 54 PowerPC EPPCBug Firmware Package User s Manual HE Help SET Set Time and Date SYM Attach Symbol Table SYMS Display Symbol Table Press RETURN to continue a Trace TA Terminal Attach TC Trace on Change of Flow Control IME Display Time and Date Transparent Mode TT Trace to Temporary Breakpoint UP MPC8xx User Programmable Memory UPM Display Read Write E Verify S Records Against Memory F Revision Version Display VPD VPD Vital Product Data Display WL Write Loop EPPC Bug gt EPPC Bug gt HE MD lt CR gt Memory Display D S lt ADDR gt lt COUNT gt lt DEL gt lt ADDR gt B H W S D DI EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 55 Command Descriptions I2C I2C Device Read Write Command Input I2C lt DADDR gt lt DEL gt lt XADDR gt lt DEL gt lt XBYTES gt D P Arguments DADDR The I2C bus address of the device of interest XADDR_ The memory address of the data to be read from or written to the device XBYTES The number of bytes which are to be read or written to the device Options D Read the I2C device P Write the I2C device Description The I2C command provides access to devices on the I2C bus Ax Caution The contents of the VPD SROM and DIMM informat
209. m test is designed to detect the change and inform you of the failure The addresses used in the RANGE parameters can be provided in two forms a An absolute address 32 bit maximum a An expression using a displacement relative offset register The CS command is used to calculate verify the contents of a block of memory The algorithm used to calculate the checksum is as follows a The checksum variable is set to zero PowerPC EPPCBug Firmware Package User s Manual 4 25 Command Descriptions a Each data element is added to the checksum If a carry is generated a one is added to the checksum variable This process is repeated for each data element until the ending address is reached Examples EPPC Bug gt CS 1000 2000 lt CR gt Effective address 00001000 Effective address 00001FFF Checksum FF8D3E87 EPPC Bug gt Default size is word EPPC Bug gt CS 1000 2000 H lt CR gt Effective address 00001000 Effective address 00001FFF Checksum 3E15 EPPC Bug gt Size is set to half word EPPC Bug gt CS FF800000 400 B lt CR gt Effective address FF800000 Effective count amp 1024 Checksum 1C EPPC Bug gt Size is set to byte count is in hexadecimal EPPC Bug gt CS FF800000 400 lt CR gt Effective address FF800000 Effective count amp 4096 Checksum OOB50D05 EPPC Bug gt Default size is word count is in hexadecimal 4 26 PowerPC EPPCBug Firmware Package User s Manual
210. mat Detach moo vorV Either upper or lowercase v causes Port Format to resume prompting in the original order Baud Rate then Parity Type etc Entering an equal sign by itself or when following a value causes PF to issue the same prompt again This is supported to be consistent with the operation of other debugger commands To resume prompting in either normal or reverse order enter the letter v or a caret respectively Entering a period by itself or following a value causes Port Format to exit from the interactive mode and issue the ox to proceed y n prompt RETURN Pressing RETURN without entering a value preserves the current value and causes the next prompt to be displayed Examples Example 1 Change the number of stop bits to 2 EPPC Bug gt PF 1 lt CR gt Baud rate 110 300 600 1200 2400 4800 9600 19200 9600 lt CR gt Even Odd or No Parity E O N N lt CR gt Character width 5 6 7 8 8 lt CR gt Stop Bits 1 2 1 2 lt CR Auto Xmit enable on CTS Y N N lt CR OK to proceed y n Y lt CR gt EPPC Bug gt Parameters Configurable by Port Format Port base address Upon assigning a port the option is provided to set the base address This is useful for support of modules with adjustable base addressing Entering no value selects the default base address shown PowerPC EPPCBug Firmware Package User s Manual 4 119 Command Descriptions B
211. mware Package User s Manual 2 7 Hardware Initialization The hardware initialization follows a predetermined flow due to an inherent hierarchy in the hardware The following figure shows the flow of the hardware initialization sequence MPC821 860 PowerPC Core MPC821 860 System Interface START FLOW MPC821 860 Memory Controller SR PCI Bus Bridge Device i BUS ISA Bus Bridge Device Super I O Device DRAM M PCI Device Configu ration I O and Memory Ad dress MPC821 860 es SYSTEM BUS MPC INTERNAL BUS Y PCMCIA SLOT ISA BUS BRIDGE y PCI SLOT SUPER I O PCI BUS ISA BUS Figure 2 2 Hardware Initialization Sequence PowerPC EPPCBug Firmware Package User s Manual Introduction to PowerPC EPPCBug Firmware Restarting the System You can initialize the system to a known state in three different ways reset break and abort Each has characteristics which make it more appropriate than the others in certain situations Reset Powering up the MBX Series board initiates a system reset Additionally reset can be asserted through the utility connector COLD and WARM reset modes are available By default EPPCBug is in COLD mode refer to the RESET command description in Chapt
212. n Codes 5 2 Directives 5 2 Comparison with PowerPC Standard Assembler 5 3 Source Program Coding 5 4 Source Line Format 5 4 Operation Field 5 4 Operand Field 5 5 Disassembled Source Line 5 5 Mnemonics and Delimiters 5 6 Pseudo Registers 5 6 Main Processor Registers 5 7 Character Set 5 9 Addressing Modes 5 10 The WORD Define Constant Directive 5 12 The SYSCALL System Call Directive 5 12 How To Enter and Modify Source Programs 5 13 Invoke the Assembler Disassembler 5 14 Enter a Source Line 5 15 How to Enter Branch Operands 5 16 Assembler Output Program Listings 5 16 Assembler Error Messages 5 17 Overview 6 1 Program Load Features 6 2 Default Load Address Point LAP 6 3 Default Execution Address Point EAO 6 3 Default Intermediate Load Address Point ILAP 6 3 Additional Program Load Interfaces 6 3 Command Line Syntax 6 5 Automatic Program Load AutoBoot 6 5 Network 6 5 UDP IP Protocol Modules 6 6 RARP ARP Protocol Modules 6 7 BOOTP Protocol Module 6 7 TFTP Protocol Module 6 7 Network Boot Control Module 6 7 Mass Storage 6 8 Serial SCC SCM Super O 6 8 PCMCIA ATA ROM FLASH Memory Cards 6 8 FLASH Memory 6 9 ROM Boot 6 9 Disk File System FAT 6 9 File Formats 6 10 CDROM File System IS09660 6 10 PowerPC ELF 6 10 S Records 6 10 Command s Processor 6 10 Motorola ROM Boot 6 11 Register State at Program Load Time 6 12 Overview 7 1 How to Invoke System Calls 7 1 Input Output Argument pointers 7 2 CLUN DLUN Use
213. n the input parameter block is nonzero then the current port settings prior to any change are saved at the area specified by the pointer PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls If the new configuration pointer entry in the input parameter block is nonzero then the port has been modified to operate at the settings described by the area pointed to by the pointer The configuration pointers point to a command packet with the following layout Device Descriptor Packet The Device Descriptor Packet is as follows F EDCBA9I8 7 6 5 4 3 2 1 0 00 Controller LUN Device LUN 02 0 04 Most Significant Half Word Parameters Mask oe len en sits 06 Lower Least Significant Half Word 08 U Most Significant Half Word Attributes Mask Ret le saci can pages 0A Lower Least Significant Half Word 0C U Most Significant Half Word Attributes Flags pper les ae ca A OE 0E Lower Least Significant Half Word 10 Parameters Most of the fields in the Device Descriptor Packet are equivalent to the fields defined in the Configuration Area block CFGA In the field descriptions following reference is made to the equivalent field in the CFGA whenever possible For additional information on these fields refer to tables in Configuration Area Block CFGA Fields on page 7 22 Controller LUN Same as in input argument packet Device LUN Same as in input argument packet Parameters Equiva
214. nd 21000 21020 contain identical data Example 1 EPPC Bug gt BC 20000 2001F 21000 lt CR gt Effective address 00020000 Effective address 0002001F Effective address 00021000 EPPC Bug gt Memory compare nothing printed PowerPC EPPCBug Firmware Package User s Manual 4 5 Command Descriptions Example 2 EPPC Bug gt BC 20000 20 21000 B lt CR gt Effective address 00020000 Effective count amp 32 Effective address 00021000 EPPC Bug gt Memory compare nothing printed Example 3 EPPC Bug gt MM 2100F B lt CR gt 0002100F 21 0 lt CR gt EPPC Bug gt Create a mismatch EPPC Bug gt BC 20000 20 21000 B lt CR gt Effective address 00020000 Effective count amp 32 Effective address 00021000 0002000F 21 0002100 00 EPPC Bug gt Mismatches are printed out 4 6 PowerPC EPPCBug Firmware Package User s Manual BE Block of Memory Fill BF Block of Memory Fill Command Input Options Description BF RANGE DEL data DEL increment B H W where data and increment are both expression parameters length of data field B Byte H Half word W Word The BF command fills the specified range of memory with a data pattern If an increment is specified then data is incremented by this value following each write otherwise data remains a constant value A decrementing pattern may be accomplished by entering a negative increment The data you enter is right justified in
215. ng The number of bytes from the data transfer address to transfer A length of zero specifies to transfer the entire file on a read Ona write the length must be set to the number of bytes to transfer The offset into the file on a read This permits users to wind into a file The number of the number of retries that should be attempted prior to giving up A retry value of zero specifies always to retry not give up The number of retries that should be attempted prior to giving up A retry value of zero specifies always to retry not give up Trace Character Buffer The starting address of memory in which to place the trace Address characters The receive transmit packet tracing is disabled by default value of 0 Any nonzero 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 should ensure adequate memory exists The following characters are defined for tracing Unknown amp Unsupported Ethernet type Unsupported IP type Unsupported UDP type Unsupported BOOTP type BOOTP request BOOTP reply Unsupported ARP type ARP request ARP reply na 4 E Unsupported RARP type 7 36 PowerPC EPPCBug Firmware Package User s Manual BOOTP RARP Request Control BOOTP RARP Replay Update Control EPPCBug System Calls RARP request RARP reply A Unsupported TFTPtype TFTP rea
216. ng at this block On a disk write data is written starting at this block On a disk read data is read starting at this block For streaming tape devices this is the file number where the transfer starts This field is used if the IFN bit in the Flags is cleared refer to the Flags description below Flags This field must be zero for disk devices For tapes Bit 30 Ignore File Number IFN flag If 0 the file number field is used to position the tape before any reads or writes are done If 1 the file number field is ignored and reads or writes start at the present tape position Bit 31 If 0 reads or writes are done until the specified block count is exhausted If 1 reads are done until the count is exhausted or until a filemark is found If 1 writes are terminated with a filemark Reserved must be 0 7 16 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls R4 points to the output parameter block Offset 0x0 Description System call return status 0x4 Device specific error code If the system call failed due to an error at the device interface level additional device specific error status will be returned in this location Appendix E provides disk tape status error codes 0x8 0xC Number of blocks read EOF status tape devices only If non zero a filemark was detected at the end of the last operation Exit Conditions System call return status has been
217. ng in value sorted numerically The Symbol Name field must consist only of printable characters ASCII codes 21 through 7E The symbol name must be terminated with a null 00 character Upon execution of the command the BUG performs a sanity check on the symbol table with the above rules The symbol table is not attached if the check fails Example 1 Attach symbol table at address 0001E000 EPPC Bug gt SYM 1E000 lt CR gt EPPC Bug gt Example 2 EPPC Bug gt MD 0 lt CR gt _ldchar 0000 00010203 04050607 O8090A0B OCODOEOF _Idchar 0010 10111213 14151617 18191A1B 1CIDIFIF EPPC Bug gt 4 144 PowerPC EPPCBug Firmware Package User s Manual SYM Symbol Table Attach Example 3 EPPC Bug gt MD _ldchar lt CR gt _ldchar 0000 00010203 04050607 O08090A0B OCODOEOF _ldchar 0010 10111213 14151617 18191A1B 1C1DIFIF EPPC Bug gt Example 4 EPPC Bug gt MD _ldchar 4 lt CR gt _ldchar 0004 04050607 O8090A0B OCODOEOF 10111213 _ldchar 0014 14151617 18191A1B 1C1D1E1F 20212223 1 EPPC Bug gt Example 5 EPPC Buo gt BF _ldchar 8 0 lt CR gt fective address _1dchar 0000 fective count amp 32 PC Bug gt MD _ldchar lt CR gt _ldchar 0000 00000000 00000000 00000000 00000000 dchar 0010 00000000 00000000 00000000 00000
218. ngth 0000 The number of bits to correct for an ECC error when supported by the disk controller Step Rate Code 00 The rate at which the read write heads can be moved when seeking a track on the disk 4 70 PowerPC EPPCBug Firmware Package User s Manual IOT I O Teach for Configuring Disk Controller The encoding is as follows Step Rate Code Winchester 3 1 2 and 5 1 4 8 Inch Floppy Hex Hard Disks Inch Floppy 00 0 msec 12 msec 6 msec 01 6 msec 6 msec 3 msec 02 10 msec 12 msec 6 msec 03 15 msec 20 msec 10 msec 04 20 msec 30 msec 15 msec Single Double DATA Density D S D S Single FM data density D Double MFM data density Single Double TRACK Density D S D The density tracks per inch S 48 TPI Single Track Density D 96 TPI Double Track Density Single Equal_in_all Track zero density S S E The data density of track 0 either a single density or equal to the density of the remaining tracks For Equal_in_all the Single Double data density flag indicates the density of track 0 Slow Fast Data Rate S S F The data rate for floppy disk devices S 250 kHz data rate F 500 kHz data rate Gap 1 07 The number of words of zeros that are written before the header field in each sector during format Gap 2 08 The number of words of zeros that are written between the header and data fields during format and write commands PowerPC EPPCBug Firmware Package User s
219. nted only as integers Floating point representations are not supported Decimal Is astring of decimal digits 0 through 9 preceded by an ampersand amp Examples are amp 12334 amp 987654321 Hexadecimal Is a string of hexadecimal digits 0 through 9 A through F preceded by an optional dollar sign An example is AFE5 One or more ASCII characters enclosed by apostrophes constitute an ASCII string ASCII strings are right justified and zero filled if necessary whether stored or used as immediate operands The following register mnemonics are recognized and or referenced by the assembler disassembler Pseudo Registers Z0 Z7 User Offset Registers These are only recognized during the assembly disassembly of target addresses branch instructions 5 6 PowerPC EPPCBug Firmware Package User s Manual One Line Assembler Disassembler Main Processor Registers RO R31 General Purpose Registers FRO FR31 Floating Point Unit Data Registers CRBO CRB31 Condition Register Bit Field CR FPSCR CRFO CREF7 Condition Register Field FPSCR Note that the processor registers that are not listed here are still accessible but instead of the register being denoted by a name it is denoted by a number with a specific instruction mnemonic The following instruction fields are listed to denote the default number base for the specified field CRBA Decimal CRBB Decimal BD Signed Hexadecimal CRFD Decimal C
220. nteractive mode which prompts for information required to perform the command You may change the displayed value by typing a new value and pressing RETURN To leave the field unaltered press RETURN without typing a new value You may also enter a special character either at the prompt or after typing new data for scrolling through the registers The special characters are Vorv Open the next field This is the default and remains in effect until changed by entering one of the other special characters m Back up and open the previous field Reopen the same field Terminate the NIOC command and return control to the debugger The clock must be running in order for this command to work properly Use TIME L to see if the clock is running Use the SET command to start and initialize the clock PowerPC EPPCBug Firmware Package User s Manual 4 101 Command Descriptions NIOP Network I O Physical Command Input Description NIOP 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 The IP addresses for the TFTP session are obtained from the configuration parameters The IP addresses are checked to see if the server and the cl
221. obing L List the Device Descriptor Table N List the Devices currently configured 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 If the probed device supports an inquiry operation SCSI devices the command displays the inquiry data along with the CLUN DLUN controller type device address device type and the removable media attribute If a device does not support inquiry data the message lt None gt is displayed The probe ordering starts with a CLUN of zero and a DLUN of zero Once the probe is done the DLUN is incremented by one and the probe is executed again the incrementing of the DLUN and the probing continues until the DLUN reaches 256 At this point the CLUN is incremented by one and the DLUN is set to zero the probing of DLUNs from zero to 255 is performed The probing continues until the CLUN reaches 256 With the variety 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 4 60 PowerPC EPPCBug Firmware Package User s Manual IOI I O Inquiry Each mass storage boot
222. of this 2 record The second 2 record is explained as follows S2 0C 040020 S record type S2 indicating that it is a code data record to be loaded verified at an 6 byte address Hexadecimal 0C decimal 12 indicating that 12 character pairs representing 12 bytes of binary data follow Eight character 6 byte address field hexadecimal address 00040020 where the code data which follows is to be loaded 0000000000000000 CF The next 8 character pairs of the second 2 record are the ASCII bytes of the actual program code data The checksum of this 2 record The S8 record is explained as follows S8 04 S record type S8 indicating that it is a termination record Hexadecimal 04 indicating that four character pairs 4 bytes follow PowerPC EPPCBug Firmware Package User s Manual 8 7 Creation of S Records 040000 The address field indicating the address of the instruction to which control may be passed program entry point F7 The checksum of this S8 record Each printable character in an S record is encoded in a hexadecimal ASCII in this example representation of the binary bits which are actually transmitted For example the first S0 record above is sent as TYPE LENGTH ADDRESS CODE DATA CHECKSUM s 0 0 a o 0 0 0 6 765745 F 72 7 4 6 3 0 D 38 30 30 41 30 30 30 30 36 37 36 35 37 34 35 46 37 32 37 34 36 33 30 44 Note that the slash character is not included in the record but u
223. ollowing example the CIO_PUTS system call is used to display abcd on the current console device EPPC Bug gt mw 10000 abcd lt cr gt Effective address 00010000 Effective data 61626364 EPPC Bug gt mw 10004 0a0d0000 lt cr gt Effective address 00010004 Effective data 00000000 EPPC Bug gt mm 20000 lt cr gt PowerPC EPPCBug Firmware Package User s Manual 7 1 Input Output Argument pointers 00020000 00000000 O lt cr gt 00020004 00000000 O lt cr gt 00020008 00000000 10000 lt cr gt 0002000C 00000000 lt cr gt EPPC Bug gt mm 30000 di lt cr gt 00030000 3c600002 ADDIS R3 RO 2 lt cr gt 00030004 3c800004 ADDIS R4 RO 4 lt cr gt 00030008 39400201 SYSCALL CIO_PUTS lt cr gt 00030010 39400F00 SYSCALL RETURN lt cr gt 00030018 00000000 WORD 00000000 lt cr gt EPPC Bug gt Input Output Argument pointers If a system call requires input arguments the caller builds a packet containing the argument values and passes a pointer to this packet in register R3 The input argument packet must be aligned on a 4 byte address boundary The required content of the input argument packet is described for each system call Some system calls reserve additional space in the input argument packet To ensure compatibility with future revisions of the EPPCBug system call interface input arguments marked as reserved should be initialized as described in the system call description
224. ommand identifiers 0 1 4 and 5 listed below The command packet specifies the network interface CLUN DLUN command type identifier the starting memory address data transfers and the number of bytes to transfer data transfers The command types are listed in this header file as well The command types identifiers are as follows Initialize device channel node Get hardware Ethernet address network node Transmit put data packet Receive get data packet Flush receiver and receive buffers oF WN FF O Reset device channel node The initialization type 0 of the device channel node must always be performed first If you have booted or initiated some other network I O command the initialization would already have been done The flush receiver and receive buffer type 4 would be used if for example the current receive data is no longer needed or to provide a known buffer state prior to initiating data transfers 4 100 PowerPC EPPCBug Firmware Package User s Manual 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 C When invoked NIOC enters an i
225. on 7 45 Entry Conditions 7 45 Exit Conditions 7 45 RETURN 7 46 Description 7 46 Entry Conditions 7 46 Exit Conditions 7 46 DELAY 7 47 Description 7 47 Entry Conditions 7 47 Exit Conditions 7 47 BRDINFO 7 48 Description 7 48 Entry Conditions 7 48 Exit Conditions 7 48 SCREV 7 50 Description 7 50 Entry Conditions 7 50 Exit Conditions 7 50 S Record Content 8 1 S Record Types 8 3 Creation of S Records 8 5 Example 8 5 Overview A 1 Software Notes A 1 VPD Data Format A 2 VPD Data Definitions A 3 Product Configuration Options Data A 5 FLASH Memory Configuration Data A 6 EEPROM Example A 6 C Header Files A 8 VPD H A 8 DIMM H A 10 SROM_CRC C A 13 Device Interface Identifiers CLUN DLUN Pairs B 1 Floppy Drive Configuration Parameters B 3 Overview D 1 History Buffer Commands D 1 Introduction E 1 SCSI Firmware Status Codes E 2 General Information Introduction This manual is intended for anyone who designs OEM systems supplies additional capability to an existing compatible system or works in a lab environment for experimental purposes A basic knowledge of computers and digital logic is assumed Refer to Related Documentation on page 1 4 of this manual for a list of documents that may provide helpful information PowerPC EPPCBug Firmware Package User s Manual 1 1 Typographic Conventions Typographic Conventions The following conventions are used in this document bold Used for input that you type
226. ons FLASH Memory Programming Error Zero Phase FLASH Memory Programing Error Erase Phase FLASH Memory Programming Error Write Phase FLASH Memory Programming Error Erase Phase_ Time Out FLASH Memory Programing Error Write Phase_ Time Out FLASH Memory Programming Error Verify Phase 4 124 PowerPC EPPCBug Firmware Package User s Manual PL Program Load Command Input Arguments PL Program Load When used with disk devices PL has the following format PL H CLUN DLUN FNAME PARTITION STRING When used with network devices PL has the following format PL H CLUN DLUN FNAME SERVERIP CLIENTIP GATEWAY STRING CLUN DLUN Controller Logical Unit of the device to be downloaded from Device logical Unit number of the device to be downloaded from Note CLUN amp DLUN assignments can be found in Device Interface Identifiers CLUN DLUN Pairs on page B 1 FNAME Specifies the name of the file to be downloaded from This argument is mandatory for disk devices and specifies the pathname of the file to be loaded such as bindir myprog elf FNAME may be omitted when downloading from network devices If omitted FNAME is determined via a BOOTP lookup or via NVRAM parameters set by NIOT When used with disk IO devices PL requires the disk device to contain an IBM PC FAT file system FNAME specifies the path to the file within that file system PARTITION Specifies the pa
227. oprocessor architectures These are primarily reflected in the instruction mnemonics register displays addressing modes of the assembler disassembler and argument passing to the system calls Data and address sizes are defined as follows a A byte is eight bits numbered 0 through 7 with bit 7 being the least significant a A half word is 16 bits numbered 0 through 15 with bit 15 being the least significant 2 4 PowerPC EPPCBug Firmware Package User s Manual Introduction to PowerPC EPPCBug Firmware a A word is 32 bits numbered 0 through 31 with bit 31 being the least significant EPPCBug Implementation As noted in the overview EPPCBug is written largely in the C programming language which provides benefits of portability and maintainability Where necessary assembler has been used in the form of separately compiled modules containing only assembler code no mixed language modules are used Physically EPPCBug is contained in one Flash ROM providing 512Kb 128K words of storage The executable code is checksummed at every power on or reset firmware entry and the result which includes a precalculated checksum contained in the ROM is tested for an expected zero Thus you are cautioned against modification of the ROM unless rechecksum precautions are taken PowerPC EPPCBug Firmware Package User s Manual 2 5 General Installation and Startup 2 General Installation and Startup Even though the E
228. options the IOT command enters an interactive subcommand mode where the descriptor table values currently in effect are displayed one at a time You may change the displayed value by typing a new value followed by RETURN To leave the field unaltered press RETURN without typing a new value 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 vGo to the next field This is the default and remains in effect until changed by entering one of the other special characters Back up to the previous field This remains in effect until changed by entering one of the other special characters PowerPC EPPCBug Firmware Package User s Manual 4 67 Command Descriptions Reopen the same field 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 amp The following information prompts appear with the default field values some of the prompts are device dependent Controller LUN 00 The Controller LUN Device LUN 00 The Device LUN If the Controller LUN and Device LUN selected do not correspond to a valid controller and device then IOT outputs the message Invalid LUN and you are prompted for the two LUNs again Device Type 00 1F 00 00 01 02 03 04 05 06 07 08 09 0A
229. or extended attributes word should be used to update the configuration A zero in a bit position indicates that the current attribute should be retained Table 7 3 IOSATM Fields CFGA Label ria Description IOADDEN 0 Data density IOATDEN 1 Track density IOADSIDE 2 Single double sided IOAFRMT 3 Floppy disk format IOARDISC 4 Disk type IOADDEND 5 Drive data density IOATDEND 6 Drive track density IOARIBS 7 Embedded servo drive seek IOADPCOM 8 Post read pre write precompensation IOASIZE 9 Floppy disk size IOATKZD 13 Track zero data density All IOSEATM bits are undefined and should be set to 0 Parameter Mask IOSPRM and IOSEPRM The IOSPRM and IOSEPRM bits are defined in the following tables A 1 ina particular bit position indicates that the corresponding parameter from the configuration area CFGA should be used to 7 22 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls update the device configuration A zero in a bit position indicates that the parameter value in the current configuration will be retained Table 7 4 IOSPRM Fields CFGA Label ToN Description IOSRECB 0 Operating system block size IOSSPTB 4 Sectors per track IOSHDSB 5 Number of heads IOSTRKB 6 Number of cylinders IOSILVB 7 Interleave factor IOSSOFB 8 Spiral offset IOSPSMB 9 Physical sector size IOSSHDB 10 Starting head numb
230. owerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls Table 7 2 Disk Packet Parameters Pirameter Offset Length CFGA Bytes Bytes Equivalent Description P_DBS 13 1 IOSREC Record Block size encoded as follows IOSREC is a two byte field containing the actual block size 00 128 bytes 01 256 bytes 02 512 bytes 03 1024 bytes 14 2 IOSSPT Sectors per track P_DST is a two byte field IOSSPT is a one byte field 16 1 IOSILV Interleave factor 17 1 IOSSOF Spiral offset 18 1 IOSSHD Starting head This field is equivalent to the lower byte of IOSSHD 19 1 IOSHDS Number of heads 1A 2 IOSTRK Number of cylinders 1C 2 IOSPCOM Precompensation cylinder 1E 2 IOSRWCC Reduced write current cylinder 20 2 IOSECC ECC data burst length 22 1 IOSGPB1 Gap 1 size 23 1 IOSGPB2 Gap 2 size 24 1 IOSGPB3 Gap 3 size 25 1 IOSGPB4 Gap 4 size 26 1 IOSSSC Spare sectors count 27 1 IOSRUNIT __ Reserved area units 28 2 IOSRSVC1 Reserved count 1 for alternate mapping area P_DRCCTR 2A 2 IOSRSVC2 Reserved count 2 for controller PowerPC EPPCBug Firmware Package User s Manual System Call Routines Configuration Area Block CFGA Fields Attribute Mask IOSATM and IOSEATM The IOSATM field bits are defined in the following table A 1 ina particular bit position indicates that the corresponding attribute from the attributes
231. owerPC EPPCBug Firmware Package User s Manual Introduction to PowerPC EPPCBug Firmware handshaking via the CTS line then it must do XON XOFF handshaking If you get unintelligible messages and missing characters check the terminal to make sure XON XOFF handshaking is enabled If you want to connect a device such as a host computer system and or a serial printer to the other EIA 232 D port s connect the appropriate cables and configure the port s as detailed in step 5 After power up you can reconfigure the port by programming the MBX console interface or by using the EPPCBug PF command 7 Power up the system EPPCBug executes some self checks and displays the debugger prompt EPPC Bug gt Hardware Initialization Hardware initialization occurs from the hardware power up reset state to some point prior to the initialization and or setup of the product s features Normally this initialization is performed only once during a reset The following list identifies the hardware components that are initialized following the power up reset a MPC821 860 PowerPC Core a MPC821 860 System Interface Unit SIU 4 MPC821 860 Memory Controller and Memory a Primary PCI Bus Bridge Device QSpan a ISA Bus Bridge Device Winbond SL82C565 a Super I O Device SMC FDC37C93X a PCI Device Configuration PCI 1 O and PCI Memory Address Spaces a PCMCIA Module Configuration a I Oand Memory Address Map PowerPC EPPCBug Fir
232. play 4 130 terminal I O D 1 terminal setup 2 6 terminate a command 2 10 terminate read loop 4 137 terminate S Record S Record terminate 8 2 TFTP protocol 4 102 time display 4 154 time set 4 142 trace functions 4 157 trace functions implementing 4 149 Trivial File Transfer Protocol 6 7 tunable parameters 6 3 U user interfaces 2 1 utilities assembler disassembler 5 1 V Vital Product Data VPD A 1 WwW WARM reset 2 9 write byte to serial device 7 8 write data pattern to location 4 98 write data to memory 4 97 write PCI configuration space 4 28 write routines to target code 3 8 System Call handler 7 1 system calls
233. r of characters until a RETURN character is received The RETURN is replaced with a NULL character in the caller s buffer MASS IO System Calls MSIO_READ 0300 Read N blocks from the specified mass storage I O device MSIO_WRIT 0301 Write N blocks to the specified mass storage I O device MSIO_CNFG 0302 Configure query the specified mass storage I O device MSIO_CTRL 0303 Implement special control functions with the specified mass storage I O device MSIO_FRMT 0304 Format the specified mass storage I O device NETWORKING IO System Calls PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls Table 7 1 System Calls System Calls Sorted By Type and ID NIO_READ 0400 Read file TFTP Read from the specified file server through the specified network I O device NIO_WRIT 0401 Write file TFTP Write to the specified file server through the specified network I O device NIO_CNFG 0402 Configure query the specified network I O device NIO_CTRL 0403 Implement special control functions with the specified network I O device Real Time Clock System Calls RTC_READ 0500 Read the RTC registers logical operation RTC_WRIT 0501 Write the RTC registers logical operation Flash Memory System Calls FM_WRIT 0600 Write program the FLASH memory array Debugging Support System Calls SSYMBOLTA 0700 Attach symbol table enable symbol table lookup
234. r prompt 4 136 PowerPC EPPCBug Firmware Package User s Manual RL Read Loop RL Read Loop Command Input RL ADDR BIHI W Options B Byte H Half word W Word Description RL establishes an infinite loop consisting of a processor load instruction that is targeted to the given address and of the given length the default data size is word then followed by a branch instruction back to the load As a result the address is accessed repeatedly in rapid succession The read loop can only be terminated by an external occurrence such as an interrupt usually an ABORT a RESET from the RESET switch or power cycle PowerPC EPPCBug Firmware Package User s Manual 4 137 Command Descriptions RM Register Modify Command Input RM REG Description RM allows you to display and change the target registers It works in essentially the same way as the MM command and the same special characters are used to control the display change session Refer to MM Memory Modify on page 4 89 REG is the mnemonic for the particular register the same as is displayed If REG is not used all the registers are displayed in sequence Examples Example 1 Modify register R5 and exit EPPC Bug gt RM R5 lt CR gt R5 12345678 ABCDEF lt CR gt EPPC Bug gt Example 2 EPPC Bug gt RM lt CR gt IP 00040010 lt CR gt SR 00003030 lt CR gt CR 00000020 lt CR gt RO 00000000 lt CR gt
235. r systems which do not support the BOOTP protocol BOOTP Protocol Module The Bootstrap Protocol BOOTP allows a diskless client machine to discover its own IP address the IP address of a server host the IP address of the gateway host and the name of a file to be loaded into memory and executed TFTP Protocol Module TFTP Trivial File Transfer Protocol is a simple protocol to transfer files It is implemented on top of the Internet User Datagram Protocol UDP or Datagram so it may be used to move files between machines on different networks implementing UDP Its only function is to read and write files from to a remote server Network Boot Control Module This control capability is needed to tie together all the necessary modules capabilities and to sequence the booting process The booting sequence consists of two phases PowerPC EPPCBug Firmware Package User s Manual 6 7 Mass Storage a The first phase is labeled address determination and bootfile selection and utilizes the RARP BOOTP capability a The second phase is labeled file transfer and utilizes the TFTP capability Figure 6 1 on page 6 6 shows a graphic representation of these support functions modules including their capabilities and dependencies Mass Storage Typically program loading from mass storage devices is the most common method of booting Please reference Table 6 2 for the complete list of the supported mass storage device types
236. ral a debugger command is made up of the following parts 1 The command identifier MD or md for the Memory Display command Note that either uppercase or lowercase is allowed 2 A port number if the command is set up to work with more than one port 3 At least one intervening space before the first argument 4 Any required arguments as specified by command PowerPC EPPCBug Firmware Package User s Manual 3 1 How to Enter Debugger Command Lines 5 An option field set off by a semicolon to specify conditions other than the default conditions of the command 6 The metasymbols used in the command syntax are boldface strings italic strings Control Characters A boldface string is a literal such as a command or a program name Type it just as it appears An italic string is a syntactic variable Replace it with one of a class of items it represents A vertical bar separating two or more items indicates that a choice is to be made Choose only one of the items separated by this symbol Square brackets enclose an item that is optional The item may appear zero or one time Braces enclose an optional symbol that may occur zero or more times Some commands such as ENV 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 Vorv Go to the next field register or memory location This is the
237. ration Area Block change target registers 4 138 checksum 2 5 checksum error 4 164 checksum routine 4 25 chip select 2 14 IN 5 Index CLUN See Controller Logical Unit Number CLUN DLUN pairs 7 3 B 1 coding source programs assembler 5 4 COLD reset 2 9 command summary 4 1 commands control characters 3 2 debugger 4 1 entering 3 1 history buffer D 1 retrieving 4 51 SCSI E 1 syntactic variables 3 3 syntax 4 3 terminate 2 10 commands execute 4 52 comparing memory 4 162 Configuration Area Block 7 19 configuration parameters change 7 33 configure floppy drive B 3 connect two ports 4 155 connecting other devices 2 7 console assignment 4 153 context switching 3 10 control characters command input and output 3 2 control routines implement 7 38 control transfer to debugger 7 1 Controller Logical Unit Number CLUN 7 19 controller independent status codes E 1 controllers network C 1 conventions terminology 1 3 typographical 1 2 creating S Records 8 5 D data conversion 4 29 data definitions VPD A 3 A 5 A 7 data format VPD A 2 data packet identifiers A 3 data packet FLASH memory configura tion A 6 data packet product configuration op tions A 5 data packets A 2 date display 4 154 date set 4 142 debugger attach symbol table 7 43 exception vectors 3 9 hardware resources 3 9 operating environment how to pre serve 3 8 debugger commands AS One Line Assembler 4 4 BC Block of memory Compare 4 5
238. re Terminal Input Output Control Information regarding command line control can be found in Appendix D PowerPC EPPCBug Firmware Package User s Manual 2 15 Terminal Input Output Control 2 16 PowerPC EPPCBug Firmware Package User s Manual Using the EPPCBug Debugger How to Enter Debugger Command Lines EPPCBug is command driven and performs its various operations in response to commands that you enter at the keyboard When the debugger prompt EPPC Bug gt appears on the terminal screen the debugger is ready to accept commands When you enter a command it is stored in an internal buffer Execution begins only after you press RETURN This allows you to correct entry errors if needed using the control characters described on page 3 2 When you enter a command the debugger executes the command and the prompt reappears However if the command that you enter causes execution of user target code for example GO then control may or may not return to the debugger depending on what the user program does For example if a breakpoint has been specified then control returns to the debugger when the breakpoint is encountered during execution of the user program Alternately the user program could return to the debugger by means of the System Call Handler function RETURN as described in Chapter Running H F 3 For more information refer to the descriptions in Chapter Running H F 3 for the GD GO and GT commands In gene
239. re Ethernet address of the server At selected times when prompted or a time out condition exists the booting process can be aborted by pressing the BREAK key on the console keyboard 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 R1 Stack pointer points to top of free memory R3 Pointer to board information structure R4 Pointer to STRING argument null terminated from command line To effect an autoboot the firmware startup command buffer can be loaded with a PL xxx command Refer to ENV Edit Environment on page 4 37 PowerPC EPPCBug Firmware Package User s Manual 4 127 Command Descriptions Examples Example 1 EPPC Bug gt plh 20 0 usr tmp ta bin Network Booting from MPC860 Controller 20 Device 0 Loading usr tmp ta bin Client IP Address 144 191 24 105 Server IP Address 144 191 24 252 Gateway IP Address 144 191 17 252 Subnet IP Address Mask 255 255 255 0 Boot File Name usr tmp ta bin Argument File Name Bytes Received amp 524288 Bytes Loaded amp 524288 Bytes Second amp 65536 Elapsed Time 8 Second s IP 00100000 MSR 00003000 CR 00000000 RO 00000000 R1 003B9000 R2 00000000 R3 003F4228 R4 00000000 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 R12 0
240. rea of memory where the UPM values are to be read into or written from If ADDR is missing the values are not stored in memory but are instead displayed on the console Specifies that the UPM is to be read Specifies that the UPM values are to be written to Use the UPM command to display and modify the user program machine UPM contents in the MPC8xx Note UPMcontents define the timing used by the MPC8xx to access DRAM The UPM command allows you to modify the UPM settings to values which do not meet the DRAM timing requirements This may cause the board to hang until it s reset UPM contents should not normally be modified by users Example EPPC Bug gt upm a lt cr gt UPM A Contents MAMR 0C821000 Read Single Beat Cycle 00 CFFFI E004 OFFF E404 O8AF2C04 03AF2C08 4 160 PowerPC EPPCBug Firmware Package User s Manual UPM MPC8xx User Programmable Machine UPM Display Read Write 04 FFFEFECO7 FFFFECO7 FFFFECO7 FEFFECO7 Read Burst Cycle 08 CFFFE004 OFFFE404 O8AF2C04 03AF2C08 OC O8AF2C04 O3AF2C08 O8AF2C04 03AF2C08 10 O8AF2C04 O3AF2C08 FFEFECO7 FEFFECO7 14 FFFFECO7 FFFFECO7 FFFFECO7 FEFFECO7 Write Single Beat Cycle 18 CFFFEOO4 OFFFA404 O8FF2C00 33FF6COF 1C FFFFECO7 FFFFECO7 FFFFECO7 FEFFECO7 Write Burst Cycle 20 CFEFEOO4 OFFFA404 O8FF2C00 O3FF2C0C 24 O8FF2CO00 O
241. received to starting at this address On a write data is written sent starting at this address Length 00000001 The number of bytes from the data transfer address to transfer A length of 0 specifies to transfer the entire file on a read On a write the length must be set to the number of bytes to transfer Byte Offset 00000001 The offset into the file on a read This permits users to wind into a file 4 104 PowerPC EPPCBug Firmware Package User s Manual NIOT I O Teach for Configuring Network Controller NIOT I O Teach for Configuring Network Controller Command Input NIOT A1H Options A Display the Network Controllers Nodes that are supported by this version of the firmware H Display all Network Controllers Nodes that are present in the system The display also includes the Protocol Internet and Hardware Ethernet addresses Description Use the NIOT command to set up teach a new network configuration on the debugger for use by the NIO_xxx system calls NIOT lets you modify the controller and device descriptor tables used by the NIO_xxx system calls for network access Note that because the debugger commands that access the network use the same interface as the system calls changes in the descriptor tables affect all those commands These commands include NIOP PL PLH and also any user program that uses the NIO_xxx system calls Each controller LUN and device LUN comb
242. rendering first aid and resuscitation is present Use Caution When Exposing or Handling the CRT Breakage of the Cathode Ray Tube CRT causes a high velocity scattering of glass fragments implosion To prevent CRT implosion avoid rough handling or jarring of the equipment Handling of the CRT should be done only by qualified maintenance personnel using approved safety mask and gloves Do Not Substitute Parts or Modify Equipment Because of the danger of introducing additional hazards do not install substitute parts or perform any unauthorized modification of the equipment Contact your local Motorola representative for service and repair to ensure that safety features are maintained Dangerous Procedure Warnings Warnings such as the example below precede potentially dangerous procedures throughout this manual Instructions contained in the warnings must be followed You should also employ all other safety precautions which you deem necessary for the operation of the equipment in your operating environment Dangerous voltages capable of causing death are present in this equipment Use extreme caution when handling testing and WARNING adjusting The computer programs stored in the Read Only Memory of this device contain material copyrighted by Motorola Inc 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
243. ress Boot File Name The starting address of the necessary memory needed for the transmit and receive buffers 256KB are needed for the specified Ethernet driver transmit receive buffers The IP address of the client The firmware is considered to be the client The IP address of the server The subnet IP address mask This mask is used to determine if the server and client are resident on the same network If they are not the gateway IP address is used as the intermediate target server The broadcast IP address that the firmware utilizes when an IP broadcast needs to be performed The gateway IP address The gateway address would be necessary if the server and the client do not reside on the same network The gateway IP address would be used as the intermediate target server 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 PowerPC EPPCBug Firmware Package User s Manual 7 35 System Call Routines Argument File Name The name of the argument file This file may be used by the Boot File Length Boot File Offset BOOTP RARP Request Retry TFTP ARP Request Retry booted file program for an additional file load To specify a null filename the string NULL must be used This resets the filename buffer to a null character stri
244. ress 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 After the transaction is complete increment is added to the old transaction address to form the next transaction address The increment will be scaled by the data type for example 1x for byte 2x for half word and 4x for word The default data type is word Example 1 Look for any memory between 0 and 10000000 with an increment of 10000 by bytes MMD reports that only 800000 8Mb of memory was found EPPC Bug gt MMD 0 10000000 10000 B lt CR gt ffective address 00000000 ffective address 10000000 00000000 007F0000 PRESENT 00800000 OFFFO000 NOT PRESENT PPC Bug gt Ton hf w PowerPC EPPCBug Firmware Package User s Manual 4 95 Command Descriptions Example 2 Look for any memory between 10000000 and FFFFFFFF with an increment of 40000 by bytes EPPC Bug gt MMD 10000000 FFFFFFFF 40000 B lt CR gt Effective address 10000000 Effective address FFFEFFFF 10000000 7FFC0000 NOT PRESE 80000000 9FFCO000 PRESE A0000000 FFECO000 NOT PRESE FFF00000 FFFC0000 PRESE EPPC Bug gt 4 96 PowerPC EPPCBug Firmware Package User s Manual MS Memory Set MS Memory Set Command Input Description Examples MS ADDR Hexadecimal number strin
245. rt all available DIMM modules Please consult the MBX s hardware user s manual for the supported DIMM modules PowerPC EPPCBug Firmware Package User s Manual A 7 A C Header Files C Header Files The following C header source files are listed to aid software engineering VPD H eee Module name MMs Description Vital Product Data VPD Header Module SCCS identification I Branch B Sequence S Date newest applied delta was created MM DD YY G Time newest applied delta was created HH MM SS U S SCCS file name F Fully qualified SCCS file name SPS Copyright C COPYRIGHT MOTOROLA INC 1996 ALL RIGHTS RESERVED Notes History Date Who 10 24 96 Rob Baxter Initial release F FF F F F F F F F F F F F F F F F HF F define VPD_FEPROM SIZE 256 EEPROM size in bytes packet tuple identifiers 0x0D OxBF reserved OxCO OxFE user defined define VPD_PID_GI 0x00 guaranteed illegal define VPD_PID PID 0x01 product identifier ASCII define VPD_PID_FAN 0x02 factory assembly number ASCII PowerPC EPPCBug Firmware Package User s Manual define VPD_PID_SN 0x03 define VPD_PID_ PCO 0x04 define VPD_PID_ICS 0x05 define VPD_PID FCS 0x06 define VPD_PID_RCS 0x07 define VPD_PID FA 0x08 define VPD_PID MT 0x09 define VPD_PID CRC Ox0A define VPD_PI
246. rtition number on the disk which contains the FAT file system of interest PARTITION is optional and if omitted defaults to 0 PowerPC EPPCBug Firmware Package User s Manual 4 125 Command Descriptions Description SERVERIP Specifies the Internet address of the network host which contains the file to be downloaded CLIENTIP Specifies the Internet address that EPPCBug is to use for the board to be downloaded into GATEWAY Specifies the Internet address which EPPCBug will use to forward requests through in the case that SERVERIP and CLIENTIP are not on the same network STRING An optional parameter If STRING is specified on the command line EPPCBug will pass a pointer to this string in R4 to the program PL provides support for loading and invoking programs from IO devices Depending on the type of IO device being accessed the PL command can take one of several formats PL downloads and invokes the program image specified by FNAME via the device specified by the CLUN DLUN pair Likewise PLH also downloads the image but instead of invoking the program halts at the BUG command prompt to allow interactive debugging of the program image to occur When used with network IO devices PL 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 ad
247. s All system calls except RETURN return output arguments at least a completion status to the caller The caller must allocate an area in memory sufficiently large to contain the output arguments and passes a pointer to this memory in register R4 The output argument packet must be aligned on a 4 byte address boundary In all cases the first 32 bit word in the output argument packet is the system call completion status This status word has the following meaning A value of zero indicates the system call completed without an error 0x100 indicates the system call number i e the value passed in R10 is not a valid system call number PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls 0x200 indicates an invalid or unsupported device was specified in the CLUN DLUN fields of the input argument packet 0x300 indicates that one or more of the addresses passed to the system call are misaligned or invalid 0x400 indicates a device or interface error occurred In this case more detailed error status values will be made available in additional locations in the output argument packet Some system calls reserve additional space in the output argument packet The caller must allocate space for all output arguments described for the system calls even those marked as reserved CLUN DLUN Use by System Calls Many of the System calls require a CLUN DLUN pair be passed as part of the system call input arguments CLU
248. s analogous to the debugger command NOSYM Refer to Chapter Running H F 3 for the command description Entry Conditions This system call requires no input parameters R4 points to the output parameter block Offset Description 0x0 System call return status Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing PowerPC EPPCBug Firmware Package User s Manual 7 45 System Call Routines RETURN Code 0F00 Description RETURN is used to return control to EPPCBug 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 EPPCBug Entry Conditions None This system call requires no input parameters and furnishes no output parameters Exit Conditions Control is passed to EPPCBug and does not return to caller 7 46 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls DELAY Code OFO1 Description DELAY does nothing and then returns to the calling program after the specified number of milliseconds Entry Conditions R3 points to the input parameter block Offset Description 0x0 Number of milliseconds to delay 0x4 Reserved Must be 0 R4 points to the output parameter block 0x0 System call return status Exit Conditions System call return
249. s the temperature registered by the DS1621 Digital Thermometer and thermostat chip The temperature is displayed in both Celsius and Fahrenheit formats Example EPPC Bug gt dtt lt cer gt Temperature 33C 91F EPPC Bug gt 4 32 PowerPC EPPCBug Firmware Package User s Manual DU Dump S Records DU Dump S Records Command Input DU PORT DEL RANGE DEL TEXT DEL ADDR DEL OFFSET B H W Options B Byte H Half word W_ Word default 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 The option field is allowed only if a count was entered as part of the range and defines the units of the count bytes half words or words The default data type is byte TEXT For text that is incorporated into the header S0 record of the block of records that will be dumped ADDR Allows you to enter an entry address for code contained in the block of records This address is incorporated into the address field of the block termination record If no entry address is entered then the address field of the termination record will consist of zeros The termination record will be an S7 S8 or S9 record depending on the address entered Chapter Running H F 3 has additional information on S records OFFSET Allows you to specify an optional offse
250. sed for clarity 8 8 PowerPC EPPCBug Firmware Package User s Manual Vital Product Data Overview Typically Vital Product Data VPD consists of data that is pertinent to board configuration and operation An example of such data would be a Assigned Ethernet address a Board serial number used for licensing and field service purposes a Processor internal external clock frequencies a Processor type local memory configuration etc Software Notes The serial EEPROM can be viewed virtually as two separate and distinct serial EEPROMs each being 256 bytes in size a The first 256 byte portion contains the product s VPD and the I2C device address is 0xA4 a The second 256 byte portion contains the local memory configuration the DIMM serial presence detect data and the I2C device address is 0xA6 This distinction between the two portions allows for the same configuration software DIMM serial presence detect data probe to be utilized for both the local DRAM and the optional socketed DIMM module PowerPC EPPCBug Firmware Package User s Manual A 1 Software Notes A VPD Data Format The VPD data format consists mainly of formatted data packets Each packet starts with an identifier byte followed by a data field length byte m The data field length byte indicates the size of the following data the packet data field The format of the data field is dependent upon the type of pack
251. sent any unspecified digits in the mantissa field are set to zero 5 Each field must be separated from adjacent fields by an underscore 6 All the digit positions in the sign and exponent fields must be present Single Precision Real This format would appear in memory as 1 bit sign field 1 binary digit 8 bit biased exponent field 2 hex digits Bias 7F 23 bit fraction field 6 hex digits A single precision number takes 4 bytes in memory Double Precision Real This format would appear in memory as 1 bit sign field 1 binary digit 11 bit biased exponent field 3 hex digits Bias 3FF 52 bit fraction field 13 hex digits A double precision number takes 8 bytes in memory The single and double precision formats have an implied integer bit always 1 3 12 PowerPC EPPCBug Firmware Package User s Manual Using the EPPCBug Debugger Scientific Notation This 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 a An optional sign bit or a One decimal digit followed by a decimal point a Up to 17 decimal digits at least one must be entered a An optional Exponent field that consists of An optional underscore The Exponent field identifier letter E An optional
252. status has been updated with either zero no error or a nonzero error code listing PowerPC EPPCBug Firmware Package User s Manual 7 47 System Call Routines BRDINFO Code 0F02 Description BRDINFO returns a pointer to the board information packet The packet is built at initialization time and contains information about the PowerPC board and peripherals it supports Entry Conditions R3 points to the input parameter block Offset Description 0x0 Pointer to board info buffer R4 points to the output parameter block Offset Description 0x0 System call return status Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing The user input argument packet has been filled with a pointer to the board information structure The board information structure format is shown below Offset Description 0x0 Word containing ASCII string BDID 0x4 Size of this structure 0x8 Revision of this structure 0xC EPPCBug Rev Month Day Year 0x10 Start address of local DRAM 0x14 Ending address of local DRAM 0x18 Processor internal frequency in Hz 7 48 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls Offset Description 0x1C Processor external BUS frequency in Hz 0x20 Boot device CLUN 0x24 Boot device DLUN PowerPC EPPCBug Firmware Package User s Manual
253. ster or group of registers This is useful for showing only the registers of interest minimizing unnecessary data on the screen and also in saving screen space which is reduced particularly when Floating Point Unit FPU registers are displayed 4 130 PowerPC EPPCBug Firmware Package User s Manual RD Register Display The available device functional group names are MPU Microprocessor Unit DEF Default RD List ape Is a required delimiter between device names and register ranges REG1 Is the first register in a range of registers REG2 Is the last register in a range of registers ES Selects an internal bank of registers that is updated upon every exception regardless of whether the exception occurred while executing target code or the debugger itself This option allows you to get a glimpse of what was happening when a EPPCBug command caused an exception These registers are not accessible using other debugger commands Observe the following notes when specifying any arguments in the command line 1 2 The qualifier is applied to the next register range only If no qualifier is specified a qualifier is assumed even for DEF All device names should appear before any register names The command line arguments are parsed from left to right with each field being processed after parsing thus the sequence in which qualifiers and registers are organized has an impact on the resultant regist
254. t 3 PCO_ENET_TP_ Ethernet Twisted Pair TP Connector RJ45 4 PCO_ENET_AUI Ethernet Attachment Unit Interface AUI Header 5 PCO_PCMCIA _ PCMCIA Socket 6 PCO_DIMM DIMM Module Socket 7 PCO_DTT Digital Thermometer and Thermostat DTT Device 8 PCO_LCD Liquid Crystal Display LCD Header 9 PCO_PCI PCI Bus Bridge Device QSpan and ISA Bus Bridge Device Winbond 10 PCO_PCIO PC I O COM1 COM2 FDC LPT KYBD Mouse 11 PCO_EIDE Enhanced IDE EIDE Header 12 PCO_FDC Floppy Disk Controller FDC Header 13 PCO_LPT_8XX Parallel Port Header via MPC8xx 14 PCO_LPT_PCIO Parallel Port Header via PC I O 15 127 Reserved for future configuration options PowerPC EPPCBug Firmware Package User s Manual VPD Data Definitions A FLASH Memory Configuration Data The FLASH memory configuration data packet consists of byte fields which indicate the size organization type of the FLASH memory array The following table s further describe the FLASH memory configuration VPD data packet Table A 3 FLASH Memory Configuration Data Byte Field Size Field ae Offset Bytes Mnemonic Teld coc poor 00 2 FMC_MID Manufacturer s Identifier 02 2 FMC_DID Manufacturer s Device Identifier 04 1 FMC_DDW Device Data Width 8 bits 16 bits 05 1 FMC_NOD Number of Devices Present 06 1 FMC_NOC Number of Columns 07 1 FMC_CW Column Width in Bits This will always be a multiple of the dev
255. t in the field The offset value is added to the addresses of the memory locations being dumped to come up with the address which is written to the address field of the S records This PowerPC EPPCBug Firmware Package User s Manual 4 33 Command Descriptions allows you to create an S record file which loads back into memory at a different location than the location from which it was dumped The default offset is zero If an offset is to be specified but no entry address is to be specified then two commas indicating a missing field must precede the offset to keep it from being interpreted as an entry address Examples Example 1 Dump memory from 20000 to 2002F to port 1 EPPC Bug gt DU 20000 2002F lt CR gt Effective address 00020000 Effective address 0002002F EPPC Bug gt Example 2 Dump 10 bytes of memory beginning at 30000 to the terminal screen port 0 EPPC Bug gt DU 0 30000 amp 10 lt CR gt Effective address 00030000 Effective count amp 10 S0030000FC 20E03000026025445535466084E4E7B S9030000FC EPPC Bug gt Example 3 Dump memory from 20000 to 2002F to host port 1 Specify a file name of TEST in the header record and specify an entry point of 2000A EPPC Bug gt DU 20000 2002F TEST 2000A lt CR gt Effective address 00020000 Effective address 0002002F EPPC Bug gt 4 34 PowerPC EPPCBug Firmware Package User s Manual ECHO Echo String ECHO Echo String Comman
256. t selected at power up The prompt will appear at the connected terminal port 0 EPPC Bug gt TA lt CR gt Console 00 MPC601EVM DEBUG EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 153 Command Descriptions TIME Display Time and Date Command Input TIME L Description This command presents the date and time in ASCII characters to the console To initialize the time of day clock refer to SET Set Time and Date on page 4 142 Option L simply recalls the command The data and time is displayed on the same line continuously updated An abort or break returns you to the monitor Example Display a date and time of May 11 1985 2 05 32 7 EPPC Bug gt TIME lt CR gt MON MAY 11 14 05 32 70 1985 EPPC Bug gt 4 154 PowerPC EPPCBug Firmware Package User s Manual TM Transparent Mode TM Transparent Mode Command Input Description TM n ESCAPE TM essentially connects the current console serial port and the port specified in the command default is host port together which allows you to communicate with a host computer A message displayed by TM shows the current escape character for example the character used to exit the transparent mode The two ports remain connected until the escape character 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 A Control
257. tate R5 00023627 EPPC Bug gt MD R5 amp 19 B lt CR gt 00022000 2800 1942 2900 1942 2800 1842 2900 2846 B B B F EPPC Bug gt lt CR gt 00022010 FC20 0050 EDO7 9F61 FFOO 000A E860 F060 Pm a h p EPPC Bug gt Example 3 EPPC Bug gt MD 30000 DI lt CR gt 00030000 3CA00000 ADDIS R5 RO 0 00030004 28040000 CMPLI CRF6 0 R4 0 00030008 41940014 BC 12 26 0003001C 0003000C 98A30000 STB R5 0 R3 00041004 00030010 3884FFFF ADDI R4 R4 SEFFFFFFF 00030014 38630001 ADDI R3 R3 1 00030018 4BFFFFEC B 00030004 0003001C 4E800020 BCLR 20 0 EPPC Bug gt Example 4 EPPC Bug gt MD 20000 D lt CR gt 00020000 0_521_9415513BBFC7C 3 14000000000 00020008 1_740_05800CO00D2A5 5 85084267086 00020010 0 2B3 BFF25B8031E80 1 99999000000 00020018 0_47C_97EC34022A8D5 6 77777788999 00020020 0_423 6FEB11A600001 9 8762300000000015_E 00020028 0_3F8_47B56E95931C5 1 0000876423100000_E 0 00020030 0_2B8_407C89A021ADB 4 5789000000000044_E 00020038 0_44C_52D0F4552863F 2 0000179999999999 E 0 EPPC Bug gt 0010_E 3386_E 0014 E 0 9985_F rO ODO Or O0 O OLL OQ O OGO O 4 86 PowerPC EPPCBug Firmware Package User s Manual Example 5 020000 020004 020008 02000C 020010 020014 020018 02001C EPPC Bug gt O Oo O Q O QOO Example 6 EPPC Bug gt MD 10000 S lt CR gt
258. tc LRDATA aligq 2 globl test ds csect test ds long test pr TOC tc0 0 globl test pr csect test pr itest mfspr 14 4 load RIC upper register stw r4 0 r3 write to caller s buffer mfspr 14 5 load RIC lower register stw r4 4 r3 write to caller s buffer belr 0x14 0x0 return to the caller FE_MOT_RESVD test csect rw salig 2 LDATA csect rw align 2 LRDATA Assume that the program has been compiled and linked to start at address 65040000 Then the program was converted into an S record file named test mx as follows 325650400007C8402A6908300007C8502A6908300044E80002000000000650400006504002412 30D65040020000000000000000069 7056504000091 Load this file into memory for execution at address 40000 as follows EPPC Bug gt IM lt CR gt Escape character 01 A Go into transparent mode to establish host link input the necessary character sequences to gain access to the S Record file test mx 4 76 PowerPC EPPCBug Firmware Package User s Manual LO Load S Records from Host Exit transparent mode by inputting the escape character sequence default is a RETURN A character sequence At this point control will return to the EPPCBug prompt EPPC Bug gt cat test mx S 325650400007C8402A6908300007C8502A6908300044 S30D65040020000000000000000069 S 7056504000091 EPPC Bug gt EPP
259. te of the MPU registers at program load time Table 6 4 MPU Registers at Program Load Time Register Description of Contents RO Undefined R1 Stack pointer points to the high end of free memory R2 Undefined R3 Pointer to Board Information Block R4 Pointer to optional Argument String NULL terminated R5 R31 Undefined MSR Interrupts Masked MMU translation disabled 6 12 PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls 7 Overview This chapter describes the EPPCBug System Call handler The System Call handler allows system calls from user programs which are used to access selected functional routines contained within the debugger including input and output routines You can also use the System Call handler to transfer control to the debugger at the end of a user program How to Invoke System Calls The System Call handler is accessible through the SC system call instruction with exception vector 00C00 System Call Exception To invoke a system call from a user program insert the following code into the source program The code corresponding to the particular system routine is specified in register R10 Parameters are passed to the system call via a pointer in R3 Parameters are returned from the system call via a pointer in R4 ADDI R10 RO XXXX SC XXXX is the 16 bit code for the system call routine and SC is the system call instruction In the f
260. ters EPPC Bug gt EPPC Bug gt RD MPU lt CR gt IP 00040010 MSR 00003030 CR RO 00000000 R1 00020000 R2 R4 22EDB280 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 SPR1 00000000 SPR 00000000 SPR9 SPR19 00000000 SPR22 00000000 SPR26 SPR268 00000000 SPR269 00000000 SPR272 SPR274 00000000 SPR275 003E6210 SPR284 SPR287 00000000 00040010 4800020 BCLR 20 0 00000 FFFO1 00000 00000 00000 00000 00000 00000 00000 00000 000000 00000 00000 20 78C R3 00 R7 00 R11 00 R15 00 R19 00 R23 00 R27 00 R31 00 SPR18 0 SPR27 00 SPR273 00 SPR285 41000 00000 00000 00000 00000 00000 00000 00000 000000 0000 00000 00000 00 Il Ov OOO O a OO CO Os Ov O O 1S O S O OGO O OG OGO O ONO G 0 Afterwards every time RD lt RETURN gt is typed all MPU registers are displayed To change the mask and disable the display of MPU registers type EPPC Bug gt Example 3 EPPC Bug gt RD MPU lt CR gt 00040010 4 amp 800020 BCLR 20 0 Remove R10 R21 and R29 from the previous display EPPC Bug gt RD R10 R21 R29 lt CR gt IP 00040010 MSR 00003030 C
261. the literal string you entered This mode is assumed if the single quote indicating the beginning of a TEXT field is encountered following RANGE The size as specified in the option field tells whether the COUNT field of RANGE refers to bytes half words or words If RANGE is not specified using a COUNT then no options are allowed If a match is found then the address of the first byte of the match is output Mode 2 Data Search In this mode you enter a data pattern as part of the command line and either enter a size in the option field or it will be is assumed the assumption is word The size entered in the option field also dictates whether the COUNT field in RANGE refers to bytes half words or words The following actions occur during a data search PowerPC EPPCBug Firmware Package User s Manual 4 17 Command Descriptions 1 The user entered data pattern is right justified and leading bits are truncated or leading zeros are added as necessary to make the data pattern the specified size 2 A compare is made with successive bytes half words or words depending on the size in effect within the range for a match with the user entered data Comparison is made only on those bits at bit positions corresponding to a 1 in the mask If no mask is specified then a default mask of all ones is used all bits are compared The size of the mask is taken to be the same size as the data The default data size is word 3 If t
262. the display any command line input that supports an address as an argument can now take a symbol name for the address argument The address argument is first looked up in the symbol table to see if it matches any of the addresses symbol data before conversion takes place It is your responsibility to load the symbol table into memory This command is analogous to the system call SYMBOLTA Refer to Chapter Running H F 3 for the description of the system call The address argument ADDR to this command tells the BUG where the symbol table begins in memory The default address of the symbol table is your default instruction pointer The symbol table must be word aligned The format of the symbol table is shown below Offset Field Description 00 Number of entries in symbol table 32 bit word 04 Next Symbol Offset 0 32 bit word 08 Symbol Data Entry 0 24 bytes 0C Symbol Name Entry 0 variable length ascii XX Next Symbol Offset 1 32 bit word PowerPC EPPCBug Firmware Package User s Manual 4 143 Command Descriptions Examples XX4 4 Symbol Data Entry 1 32 bit word XX4 m 8 Symbol Name Entry 1 variable length ascii The Number of Entries in Symbol Table field governs the size of the symbol table Symbol Links are offsets from the beginning of the Symbol table to the next Symbol table location The Symbol Data field must be word aligned The symbol data fields must be ascendi
263. tility allows an executable load module to be built from S records and has a counterpart utility which allows an S record file to be created from a load module Several programs are available for downloading a file in S record format from a host system to an 8 bit 16 bit or 32 bit microprocessor based system Example Shown below is a typical S record format module as printed or displayed S00A00006765745F7274630D 2240400007C8402A6908300007C8502A6908300044E80002000000000000400000004002442 20C0400200000000000000000cF 804040000F7 The module consists of one S0 record two 3 records and one 8 record The first SO record is explained as follows 24 Hexadecimal 24 decimal 36 indicating that 36 character pairs representing 36 bytes of binary data follow 040000 Six character 3 byte address field hexadecimal address 00040000 where the code data which follows is to be loaded PowerPC EPPCBug Firmware Package User s Manual 8 5 Creation of S Records 7C8402 24 040000 7C8402 040024 The next 32 character pairs of the first S2 record are the ASCII bytes of the actual program code data In this assembly language example the hexadecimal opcodes of the program are written in the sequence in the Hexadecimal 24 decimal 36 indicating that 36 character pairs representing 36 bytes of binary data follow Six character 3 byte address field hexadecimal address 00040000 where the code data wh
264. time for a head switch when crossing tracks IOSSHD Starting head The first head number for the device number IOSPCO Precompensation The cylinder on which precompensation begins M cylinder PowerPC EPPCBug Firmware Package User s Manual 7 25 System Call Routines Table 7 7 CFGA Fields Parameter Description IOSSR Step The rate at which the read write heads can be moved when seeking a track on the disk The encoding is as follows 3 1 2 Inch Step Rate Winchester 5 1 4 Inch 8 Inch Code Hard Disks Floppy Floppy 00 0 msec 12 msec 6 msec 01 6 msec 6 msec 3 msec 02 10 msec 12 msec 6 msec 03 15 msec 20 msec 10 msec 04 20 msec 30 msec 15 msec IOSRWC Reduced write The cylinder number at which the write current C current cylinder should be reduced when writing to the drive This parameter is normally specified by the drive manufacturer IOSECC ECC data burst The number of bits to correct for an ECC error length when supported by the disk controller IOSGPB Gap byte 1 The number of words of zeros that are written 1 before the header field in each sector during format IOSGPB Gap byte 2 The number of words of zeros that are written 2 between the header and data fields during format and write commands IOSGPB Gap byte 3 The number of words of zeros that are written 3 after the data fields during format commands IOSGPB Gap byte 4 The number of words of zeros that ar
265. tion being accessed is redisplayed For additional information about the assembler refer to Chapter Running H F 3 Example 3 Assemble a new source line EPPC Bug gt MM 40000 DI lt CR gt 00040000 00000000 WORD 00000000 ADDIS R1O RO 1000 lt CR gt 00040000 3D401000 ADDIS R10 RO 1000 00040004 00000000 WORD 00000000 ORT R10 R10 FFFF lt CR gt 00040004 614AFFFF ORI R10 R10 FFFF 00040008 00000000 WORD 00000000 lt CR gt EPPC Bug gt Example 4 New source line with error EPPC Bug gt MM 40008 DI lt CR gt 00040008 00000000 WORD 00000000 FOO R20 R0 10 lt CR gt Assembler Error Unknown Mnemonic 00040008 00000000 WORD 00000000 ORI R20 R0 10 lt CR gt 00040008 60140010 ORI R20 RO 10 0004000C 00000000 WORD 00000000 lt CR gt EPPC Bug gt PowerPC EPPCBug Firmware Package User s Manual 4 91 Command Descriptions Example 5 Step to next location and exit MM EPPC Bug gt MM 40000 DI lt CR gt 00040000 3D401000 ADDIS R10 RO 1000 lt CR gt 00040004 614AFFFF ORI R10 R10 FFFF lt CR gt EPPC Bug gt Example 6 Double precision floating point numbers EPPC Bug gt MM 20000 D lt CR gt 00020000 3 140000000000 00020008 5 85084267086 00020010 1 999990000000 00020018 6 777777889999 01_E 87 1 2 lt CR 3386_E 250 2 lt CR gt 014_E 100 4 357E 10 lt CR gt 985_E 37 2 765E 99 lt CR gt 01
266. tions R3 points to the input parameter block Offset Description 0x0 Starting address of symbol table R4 points to the output parameter block 0x0 System call return status Exit Conditions System call return status has been updated with either zero no error or a nonzero error code listing PowerPC EPPCBug Firmware Package User s Manual 7 43 System Call Routines The format of the symbol table is as shown 31 24 23 16 15 8 7 0 00 04 Number of Entries in Symbol Table Next Symbol Offset 0 08 0C Symbol Data 0 Symbol Name 0 Offset 0 Next Symbol Offset 1 04 Symbol Data 1 08 Symbol Name 1 Offset 1 Field descriptions Number of Entries in Symbol Table Next Symbol Offset Symbol Data Symbol Name The number of entries in table Offset from the beginning of the symbol table to the next symbol table entry 32 bit hexadecimal value The symbol data fields 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 A string of printable characters must be null 00 terminated PowerPC EPPCBug Firmware Package User s Manual EPPCBug System Calls SYMBOLTD Code 0701 Description SYMBOLITD detaches a symbol table from the debugger This command i
267. tive with the C compiler PowerPC EPPCBug Firmware Package User s Manual A C Header Files A sa define define define define define define define define define define define define define define define PCO_BBRAM PCO_BOOTROM FLASH PCO_KAPWR and control circuit PCO_ENET TP RJ45 PCO_ENET AUT header PCO_PCMCIA PCO D PCO DTT device PCO ICD PCO PCT bridge device Winbond PCO PCIO Keyboard Mouse PCO FIDE PCO FDC PCO_IPT_8XX PCO_LPT_PCIO FLASH memory configuration packet t7 typedef struct vpd fmc data 1 lt lt 0 battery backed RAM BBRAM and socket 1 lt lt 1 boot ROM and socket i e socketed 1 lt lt 2 keep alive power source lithium battey 1 lt lt 3 ethernet twisted pair TP connector 1 lt lt 4 ethernet attachment unit interface AUI 1 lt lt 5 PCMCIA socket 1 lt lt 6 D module socket 1 lt lt 7 digital thermometer and thermostat DIT 1 lt lt 8 liquid crystal display LCD device 1 lt lt 9 PCI Bus bridge device QSpan and ISA Bus lt lt 10 PC I O CM COM2 FDC IPT lt lt 11 enhanced IDE EIDE header lt lt 12 floppy disk controller FDC header lt lt 13 parallel port header via MPC8xx lt lt 14 parallel port header via PC I O
268. to Motorola S Records mx firmware 6 4 PowerPC EPPCBug Firmware Package User s Manual Program Loading Command Line Syntax Command Line Syntax is covered under the PL PLH entry in Chapter Running H F 3 Automatic Program Load AutoBoot The automatic program load is accomplished by initializing the command buffer located in NVRAM with the desired command s to execute The command buffer syntax is the same syntax that you would use if you manually entered in the command at the firmware command line If an autoboot is needed the PL command with the appropriate arguments should be placed in the command buffer Network The actual standard network booting sequence was standardized by Sun Microsystems Sun s booting process is executed in two distinct phases a The first phase allows the diskless remote node to discover its network identity and the name of the file to be booted a The second phase has the diskless remote node reading the boot file across the network into its memory The following support functions modules are added to meet the overall network boot function These functions basically describe the internal view software versus hardware of the necessary support required Following the module title a brief description of the module s purpose is given PowerPC EPPCBug Firmware Package User s Manual 6 5 Network Boot Control Module A Bootstrap Protocol Trivial File Transfer
269. to some operators over others The only exception to this is when you force the order of precedence through the use of parenthesis Possible points of confusion 1 You should keep in mind that where a number is intended and it could be confused with a register it must be differentiated in some way 2 With the use of to represent both multiply and instruction pointer how does the assembler know when to use which definition For parsing algebraic expressions the order of parsing is OPERAND OPERATOR OPERAND OPERATOR with a possible left or right parenthesis Given the above order the assembler can distinguish by placement which definition to use For example equals IP IP equals IP IP 2 equals 2 IP amp amp 16 equals IP AND amp 16 PowerPC EPPCBug Firmware Package User s Manual 5 11 The WORD Define Constant Directive The WORD Define Constant Directive The format for the WORD directive is WORD 32 bit operand The function of this directive is to define a constant in memory The WORD directive can have only one operand 32 bit value which can contain the actual value decimal hexadecimal or ASCII Alternatively the operand can be an expression which can be assigned a numeric value by the assembler An ASCII string is recognized when characters are enclosed inside single quotes Each character seven bits is assigned to a byte of memory with the eighth bit MSB always equ
270. upon the interface and device types The follow table lists these dependencies PowerPC EPPCBug Firmware Package User s Manual 6 3 Program Load Features Table 6 2 Program Load Dependencies CDROM Interf Z ee Device Type File System Type Supported File Types f n Mass Storage Direct Access DOS Partition Table PowerPC ELF elf Rigid Geometry with 16 Bit FAT Motorola S Records mx Command s Processor cop Motorola ROM Boot rom Direct Access 12 Bit FAT PowerPC ELF elf Non Rigid Motorola S Records mx Geometry Binary bin Floppy Command s Processor cop Motorola ROM Boot rom Read Only Memory ISO 9660 PowerPC ELF elf Motorola S Records mx Binary bin Command s Processor cop Motorola ROM Boot rom Network Transparent to PowerPC ELF elf Ethernet firmware Motorola S Records mx Binary bin Command s Processor cop Motorola ROM Boot rom PCMCIA Read Only Memory DOS Partition Table PowerPC ELF elf ROM FLASH ROMDISK with either 12 Bit or Motorola S Records mx Memory Cards 16 Bit FAT Binary bin Command s Processor cop Motorola ROM Boot rom FLASH Read Only Memory DOS Partition Table PowerPC ELF elf Memory ROMDISK with either 12 Bit or Motorola S Records mx On Board 16 Bit FAT Binary bin Command s Processor cop Motorola ROM Boot rom Serial N A Transparent
271. ute 4 52 Command Input 4 52 Description 4 52 Examples 4 52 HE Help 4 53 Command Input 4 53 Description 4 53 Examples 4 53 I2C I2C Device Read Write 4 56 Command Input 4 56 Arguments 4 56 Options 4 56 Description 4 56 Examples 4 56 IOC I O Control for Disk 4 58 Command Input 4 58 Description 4 58 IOI I O Inquiry 4 60 Command Input 4 60 Options 4 60 Description 4 60 IOP I O Physical to Disk 4 62 Command Input 4 62 Description 4 62 IOT I O Teach for Configuring Disk Controller 4 66 Command Input 4 66 Options 4 66 Description 4 66 Attribute Parameters 4 69 LO Load S Records from Host 4 73 Command Input 4 73 Description 4 73 Examples 4 75 MA NOMA Macro Define Display Delete 4 78 Command Input 4 78 Description 4 78 Examples 4 79 MAE Macro Edit 4 82 Command Input 4 82 Options 4 82 Description 4 82 Examples 4 83 MAL NOMAL Enable Disable Macro Expansion Listing 4 84 Command Input 4 84 Description 4 84 MD Memory Display 4 85 Command Input 4 85 Options 4 85 Examples 4 86 MM Memory Modify 4 89 Command Input 4 89 Options 4 89 Description 4 89 Examples 4 90 MMAP Memory Map Display 4 93 Command Input 4 93 Description 4 93 Examples 4 93 MMD Memory Map Diagnostic 4 95 Command Input 4 95 Options 4 95 Description 4 95 Examples 4 95 MS Memory Set 4 97 Command Input 4 97 Description 4 97 Examples 4 97 MW Memory Write 4 98 Command Input 4 98 Options 4 98
272. wee eee eee Because no option was specified the length of the data field defaulted to word Example 2 Assume memory from 20000 through 2002F is clear EPPC Bug gt BE 20000 10 4E71 B lt CR gt Effective address 00020000 Effective count amp 16 Data 71 EPPC Bug gt EPPC Bug gt MD 20000 18 H lt CR gt 00020000 7171 7171 7171 7171 7171 7171 7171 7171 qegaaceqadcaqace 00020010 0000 0000 0000 0000 0000 0000 0000 0000 eee eee eee 00020020 0000 0000 0000 0000 0000 0000 0000 0000 eee eee eee EPPC Bug gt The specified data did not fit into the specified data field size The data was truncated and the Data message was output Example 3 Assume memory from 20000 through 2002F is clear EPPC Bug gt BE 20000 20006 12345678 W lt CR gt Effective address 00020000 Effective address 00020003 EPPC Bug gt 4 8 PowerPC EPPCBug Firmware Package User s Manual BF Block of Memory Fill EPPC Bug gt MD 20000 18 H lt CR gt 00020000 1234 5678 0000 0000 0000 0000 0000 0000 4Vx 00020010 0000 0000 0000 0000 0000 0000 0000 0000 00020020 0000 0000 0000 0000 0000 0000 0000 0000 The word pattern would not fit evenly in the given range Only one word was written and the Effective address messages reflect the fact that data was not written all the way up to the specified address Example 4 Assume memory from 20000 through 2002F is clear EPPC Bug gt BE 20000 18 0 1 H
273. wn using the symbols explained in Chapter Running H F 3 In the examples shown the symbol lt CR gt represents the RETURN key on your terminal keyboard Whenever this symbol appears it means that you should enter a RETURN PowerPC EPPCBug Firmware Package User s Manual Command Descriptions AS One Line Assembler Command Input AS ADDR Description This is synonymous with the MM ADDR DI command Refer to MM Memory Modify on page 4 89 for details It provides access to the one line assembler described in Chapter Running H F 3 Accordingly it is not described further here 4 4 PowerPC EPPCBug Firmware Package User s Manual BC Block of Memory Compare BC Block of Memory Compare Command Input Options Description Examples BC RANGE DEL ADDR BIHI W B Byte H Half word W Word The BC command compares the contents of memory defined by RANGE with another place in memory beginning at ADDR The option field B H or W upper or lower case defines the size of data compared and if RANGE is specified using a count defines the size of data element to which the count refers For example a count of 4 with an option of W would mean to compare 4 words 16 bytes The default data type is word If the RANGE beginning address is greater than or equal to the end address an error message is displayed and no comparison takes place For the following examples assume that memory blocks 20000 20020 a
274. y also enter a special character either at the prompt or after typing new data for scrolling through the fields The special characters are Vorv Goto the next field This is the default and remains in effect until changed by entering one of the other special characters PowerPC EPPCBug Firmware Package User s Manual 4 37 Command Descriptions A Back up to the previous field This remains in effect until changed by entering one of the other special characters Re open the same field Terminate the ENV command and return control to the debugger ENV Command Parameters The following prompts appear with the default field values Probe System for Supported I O Controllers Y N Y Y Access the appropriate system buses PCIbus local MPU bus to determine the presence of supported controllers N Do not access the system buses to determine the presence of supported controllers Local SCSI Bus Reset on Debugger Setup Y N N Y Reset the Local SCSI bus on debugger set up N Do not reset the Local SCSI bus on debugger set up default PCI Interrupts Route Control Registers PIRQ0 1 2 3 OAOBOEOF Specifies the values to use for the PIRQ routing registers in the PCI ISA bridge This parameter defines the mapping of PCI interrupts to the ISA interrupt controller within the ISA bridge Firmware Command Buffer Offset 000002C8 Specifies the offset within NVRAM where firmware looks for the startup command
275. y using the Memory Display MD command EPPC Bug gt MD 40000 5 DI lt CR gt 00040000 7C8402A6 MFSPR R4 4 00040004 90830000 STW R4 0 R3 00041000 00040008 7C8502A6 MEFSPR R4 5 0004000C 90830004 STW R4 4 R3 00041004 00040010 4E800020 BCLR 20 0 EPPC Bug gt Suppose you want to make sure that the program has not been destroyed in memory The VE command is used to perform a verification EPPC Bug gt VE_ 65000000 X cat test mx lt CR gt cat test mx 325650400007C8402A6908300007C8502A6908300044E80002000000000650400006504002412 30D65040020000000000000000069 7056504000091 Verify passes EPPC Bug gt The verification passes The program stored in memory was the same as that in the S record file that had been downloaded PowerPC EPPCBug Firmware Package User s Manual 4 165 Command Descriptions Now change the program in memory and perform the verification again EPPC Bug gt M 40004 H lt CR gt 00040004 9083 9082 lt CR gt EPPC Bug gt EPPC Bug gt VE_ 65000000 X cat test mx lt CR gt cat test mx 325650400007C8402A69083 S RECORD Data Verification error Address 00040005 Expected data 83 Actual data 82 S RECORD 325650400007C8402A69083 EPPC Bug gt The byte which was changed in memory does not compare with the corresponding byte in the S record 4 166 PowerPC EPPCBug Firmware Package User s Manual VER
Download Pdf Manuals
Related Search
Related Contents
contenu net: 1,5 kg groupe 1a insecticide carzol® sp miticide Installationsanweisung Dampfbad MODELL: W703 Verehrter Kunde Manuale User manual FVA-E2SX 高精度なセキュリティ環境を実現する mofiria 指静脈認証 PASCO Specialty & Mfg. PS-2152 User's Manual 取扱説明書 - M Product Catalog Spring 2003 - Delta Habib® 2X Laparoscopic or Habib® 4X ZI Route de Lectoure BIOTHRIVE™ 32500 Fleurance Copyright © All rights reserved.
Failed to retrieve file