Motorola PPCBug User Manual

PPCBug
Firmware Package
User’s Manual
Part 1 and 2
PPCBUGA1/UM5 and PPCBUGA2/UM5
February 2001 Edition
© Copyright 2001 Motorola, Inc.
All rights reserved.
®
Motorola
and the Motorola symbol are registered trademarks of Motorola, Inc.
PowerPC™ is a trademark of IBM, and is used by Motorola with permission.
TM
AIX
is a trademark of IBM Corp.
All other products ment io ned i n this document are trademarks or registered trade ma rk s of their respective holders.
Safety Summary
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 could result in personal injury or damage to the equipment.
The safety precaut ions listed be low represent warnings of ce rtain danger s of which Mot orola is awar e. 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. If the equipment is su pplied wi th a three-c onductor A C power ca ble, the po wer cable m ust be plug ged into an a pproved three-contact electrical outlet, with the grounding wire (green/yellow) reliably connected to an electrical ground (safety ground) at the power outlet. The power jack and mating plug of the power cable meet International Electrotechnical Commission (IEC) safety standards and local electrical regulatory codes.
Do Not Operate in an Explosive Atmosphere.
Do not operate the equipment in any explosive atmosphere such as in the presence of flammable gases or fumes. Operation of any electrical equipment in such an environment could result in an explosion and cause injury or damage.
Keep Away From Live Circuits Inside the Equipment.
Operating personnel must not remove equipment covers. Only Factory Authorized Service Personnel or other qualified service personnel may remove equipment covers for internal subassembly or component replacement or any internal adjust ment. Service pe rsonnel should n ot replace compon ents with power c able connected. Under certain conditions, dangerous voltages may exist even with the power cable removed. To avoid injuries, such personnel should always disconnect power and d is charge circuits before touc hi ng components.
Use Caution When Exposing or Handling a CRT.
Breakage of a Cathode-Ray Tube (CRT) causes a high-velocity scattering of glass fragments (implosion). To prevent CRT implosion, do not handl e the CRT and avoid rough handling o r jarring of t he equipment . Handling o f a CRT should be done only by qualified service personnel using approved safety mask and gloves.
Do Not Substitute Parts or Modify Equipment.
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 all safety features are maintained.
Observe Warnings in Manual.
W arn ings , such as th e exa mple be low, preced e pote ntia lly da nger ous pro cedure s thro ugh out th is manual . In struc tion s contained in the warnings m ust be follow ed. You should also employ all ot her safety precautions w hich you dee m necessary for the operation of the equi pm ent in your operating en vi ronment.
To prevent serious injury or death from dangerous voltages, use extreme caution when handling, testing, and adjusting this equipment and its
Warning
components.
Notice
While reasonable efforts have been made to assure the accuracy of this document, Motorola, Inc. a ssumes n o lia bility r esulti ng from any omissio ns in this docu ment, or from the use of the information ob tained therein. Motorola reserv es the right to r evise this document and to ma ke c hanges from time to time in the content he reof without obligation of Motorola to notify any person of such revision or changes.
Electronic versions of this material may be read online, downloaded for personal use, or referenced in another document as a URL to the Motorola Computer Group website. The text itself may n ot be publishe d commercially in print or ele ctronic form, e dited, transla ted, or otherwise altered without the permission of Motorola, Inc.
It is possible th at t hi s publication may contain r ef erence to or information about Motorola products (machines and pr ograms), progra mming, or services that are not av ailable 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.
Limited and 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 (b)(3) of t he Rig hts i n Tech nical Data clause at DFARS 252.227-7013 (Nov.
1995) and of the Rights in Noncommerc ial Computer Software and Docume ntation c lause at DFARS 252.227-7014 (Jun. 1995).
Motorola, Inc. Computer Group 2900 South Diablo Way Tempe, Arizona 85282

Contents

About This Manual
Summary of Changes.................................................................................................xvi
Overview of Contents................................................................................................xvi
Comments and Suggestions.....................................................................................xviii
Conventions Used in This Manual...........................................................................xviii
CHAPTER 1 General Information
PPCBug Overview.....................................................................................................1-1
Comparison with other Motorola Bugs......................................................................1-2
PPCBug Implementation ...........................................................................................1-2
Memory Requirements....................................... ..... ........................................ ...........1-3
Size and Address Requirements for NVRAM....................................................1-3
Set-up.........................................................................................................................1-3
Start-up.......................................................................................................................1-4
MPU, Hardware, and Firmware Initialization....................................................1-5
LED/Serial Startup Diagnostic Codes.........................................................1-7
Running the Diagnostics and Debugger ..................................................................1-12
Auto Boot.................................................................................................................1-13
ROMboot .................................................................................................................1-14
Sample ROMboot Routine............................... ...... ...... .....................................1-16
Network Auto Boot..................................................................................................1-18
Restarting the System ..............................................................................................1-19
Reset..................................................................................................................1-19
Abort.................................................................................................................1-19
Reset/Abort.......................................................................................................1-20
Break.................................................................................................................1-20
Board Failure ....................................................................................................1-21
SYSFAIL* Assertion and Negation (VMEbus Boards)............................1-21
MPU Clock Speed Calculation.........................................................................1-22
Disk I/O Support......................................................................................................1-22
Blocks and Sectors............................................................................................1-23
Device Probe.......................................................... ...... .....................................1-23
Disk I/O via Debugger Commands...................................................................1-24
IOI (Input/Output Inquiry).........................................................................1-24
v
IOP (Physical I/O to Disk)........................................................................1-24
IOT (I/O Configure)............................................................................. .....1-24
IOC (I/O Control)......................................................................................1-24
PBOOT (Bootstrap Operating System).....................................................1-25
Disk I/O via Debugger System Calls ...............................................................1-26
Default PPCBug Controller and Device Parameters........................................1-27
Disk I/O Error Codes........................................................................................1-27
Network I/O Support .............................................................................................1-28
Physical Layer Manager Ethernet Driver .........................................................1-28
UDP and IP Modules........................................................................................1-28
RARP and ARP Modules................................................................................. 1-30
BOOTP Module ...............................................................................................1-30
TFTP Module................................................................... .................................1-30
Network Boot Control Module.........................................................................1-30
Network I/O Error Codes.................................................................................1-31
Multiprocessor Support (Remote Start)................................................................... 1-31
Multiprocessor Control Register (MPCR) Method..........................................1-32
GCSR Method..................................................................................................1-35
Data and Address Sizes ...........................................................................................1-37
Byte Ordering.......................................................................................................... 1-37
CHAPTER 2 Using the Debugger
Entering Commands....................... ...... ....................................... ..............................2-1
Command Syntax...............................................................................................2-1
Command Arguments.........................................................................................2-2
EXP .............................................................................................................2-2
ADDR .........................................................................................................2-4
PORT...........................................................................................................2-6
Command Options..............................................................................................2-6
Control Characters..............................................................................................2-6
Entering and Debugging Programs............................................................................2-7
System Call Routines in User Programs....................................................................2-8
Preserving the Operating Environment ............................................. ...... ..................2-8
Memory Requirements........................................ ........................................ .......2-9
Exception Vectors............................................................................. ..................2-9
MPU Registers .................................................................................................2-10
MPU Register SPR275..............................................................................2-10
MPU Registers SPR272-SPR274..............................................................2-10
Context Switching ................................................. ..... ........................................ .....2-10
Floating Point Support.............................................................................................2-12
vi
Single Precision Real........................................................................................2-13
Double Precision Real ......................................................................................2-13
Scientific Notation............................................................................................2-14
CHAPTER 3 Debugger Commands
Introduction................................................................................................................3-1
Debugger Commands.................................................................................................3-1
AS - One-Line Assembler...................................................................................3-5
BC - Block of Memory Compare.......................................................................3-6
BF - Block of Memory Fill.................................................................................3-8
BI - Block of Memory Initialize.......................................................................3-11
BM - Block of Memory Move..........................................................................3-13
BR - Breakpoint Insert
NOBR - Breakpoint Delete...............................................................................3-16
BS - Block of Memory Search..........................................................................3-18
BV - Block of Memory Verify..........................................................................3-23
CACHE - Cache Control ............................................. ..... ................................3-26
CM - Concurrent Mode
NOCM - No Concurrent Mode.........................................................................3-27
CNFG - Configure Board Information Block...................................................3-31
CS - Checksum ................................................ ...... ...... .....................................3-35
CSAR - PCI Configuration Space READ Access............................................3-37
CSAW - PCI Configuration Space WRITE Access..........................................3-38
DC - Data Conversion.......................................................................................3-39
DMA - Block of Memory Move.......................................................................3-42
DS - One-Line Disassembler............................................................................3-49
DU - Dump S-Records...................................................... ...... ..........................3-50
ECHO - Echo String.........................................................................................3-52
ENV - Set Environment....................................................................................3-54
FORK - Fork Idle MPU at Address..................................................................3-59
FORKWR - Fork Idle MPU with Registers......................................................3-60
GD - Go Direct (Ignore Breakpoints)...............................................................3-61
GEVBOOT - Global Environment Variable Boot............................................3-63
GEVDEL - Global Environment Variable Delete.............................................3-69
GEVDUMP - Global Environment Variable(s) Dump.....................................3-70
GEVEDIT - Global Environment Variable Edit...............................................3-72
GEVINIT - Global Environment Variable Initialization..................................3-73
GEVSHOW - Global Environment Variable(s) Display ..................................3-74
GN - Go to Next Instruction.............................................................................3-75
G, GO - Go Execute User Program..................................................................3-77
vii
GT - Go to Temporary Breakpoint...................................................................3-80
HE - Help..........................................................................................................3-83
IBM - Indirect Block Move..............................................................................3-86
IDLE - Idle Master MPU..................................................................................3-88
IOC - I/O Control for Disk...............................................................................3-89
IOI - I/O Inquiry...............................................................................................3-92
IOP - I/O Physical (Direct Disk Access)..........................................................3-95
IOT - I/O Configure Disk Controller .............................................................3-101
IRD, IRM, IRS - Idle MPU Register Display/Modify/Set............................. 3-109
LO - Load S-Records from Host....................................................................3-110
MA - Macro Define/Display
NOMA - Macro Delete...................................................................................3-115
MAE - Macro Edit..........................................................................................3-118
MAL - Enable Macro Listing
NOMAL - Disable Macro Listing..................................................................3-120
MAR - Load Macros ......................................................................................3-121
MAW - Save Macros......................................................................................3-123
MD, MDS - Memory Display ........................................................................3-125
MENU - System Menu............................. ...... ..... ...... ...... ...............................3-129
M, MM - Memory Modify .............................................. ..... ..........................3-130
MMD - Memory Map Diagnostic..................................................................3-134
MMGR - Memory Manager...........................................................................3-136
MS - Memory Set...........................................................................................3-140
MW - Memory Write......................................................................................3-141
NAB - Network Auto Boot ............................................................................3-143
NAP - NAP MPU........................................................................................... 3-144
NBH - Network Boot Operating System, Halt...............................................3-145
NBO - Network Boot Operating System........................................................3-147
NIOC - Network I/O Control.........................................................................3-151
NIOP - Network I/O Physical ........................................................................3-157
NIOT - Network I/O Teach (Configuration) ..................................................3-161
NPING - Network Ping..................................................................................3-168
OF - Offset Registers Display/Modify...........................................................3-170
PA - Printer Attach
NOPA - Printer Detach...................................................................................3-173
PBOOT - Bootstrap Operating System..........................................................3-175
PF - Port Format
NOPF - Port Detach .......................................................................................3-183
PFLASH - Program FLASH Memory............................................................3-188
PS - Put RTC into Power Save Mode.............................................................3-192
RB - ROMboot Enable
NORB - ROMboot Disable............................................................................3-193
viii
RD - Register Display.....................................................................................3-195
REMOTE - Remote........................................................................................3-201
RESET - Cold/Warm Reset ............................................................................3-202
RL - Read Loop..............................................................................................3-204
RM - Register Modify.....................................................................................3-205
RS - Register Set.......................................................... ..... ...... ........................3-208
RUN - MPU Execution/Status........................................................................3-210
SD - Switch Directories..................................................................................3-212
SET - Set Time and Date ................................................................................3-213
SROM - SROM Examine/Modify..................................................................3-214
SYM - Symbol Tabl e Attach
NOSYM - Symbol Table Detach ....................................................................3-218
SYMS - Symbol Table Display/Search ..........................................................3-221
T - Trace..........................................................................................................3-223
TA - Terminal Attach......................................................................................3-227
TIME - Display Time and Date......................................................................3-228
TM - Transparent Mode..................................................................................3-229
TT - Trace to Temporary Breakpoint..............................................................3-231
VE - Verify S-Records Against Memory........................................................3-234
VER - Revision/Version Display....................................................................3-238
WL - Write Loop ............................................................................................3-242
CHAPTER 4 One-Line Assembler/ Disassembler
Introduction................................................................................................................4-1
PowerPC Assembly Language...................................................................................4-1
Machine-Instruction Operation Codes................................................................4-2
Directives............................................................................................................4-2
Comparison with the Standard Assembler.................................................................4-2
Source Program Coding.............................................................................................4-3
Source Line Format ............................................................................................4-3
Operation Field............................................................................................4-3
Operand Field...................................... ....................................... .................4-4
Disassembled Source Line...........................................................................4-4
Mnemonics and Delimiters..........................................................................4-4
Instructions ..................................................................................................4-6
Character Set........................................ ....................................... .................4-7
Addressing Modes..............................................................................................4-8
WORD Define Constant Directive.....................................................................4-9
SYSCALL System Call Directive ....................................................................4-10
Entering and Modifying Source Programs ..............................................................4-11
ix
Invoking the Assembler/Disassembler.............................................................4-11
Entering a Source Line.................................................... .................................4-12
Entering Branch Operands ........................................ ...... .................................4-13
Assembler Output/Program Listings................................................................4-13
Assembler Error Messages ...............................................................................4-14
CHAPTER 5 System Calls
Introduction ...............................................................................................................5-1
Invoking System Calls.............................. ...... ....................................... .............5-1
String Formats for I/O........................................................................................5-2
System Call Routines.................................................................................................5-2
.INCHR..............................................................................................................5-7
.INSTAT ............................................................................................................5-8
.INLN .................................................................................................................5-9
.READSTR .....................................................................................................5-10
.READLN .......................................................................................................5-12
.CHKBRK ....................................................................................................... 5-13
.DSKRD
.DSKWR ..........................................................................................................5-14
.DSKCFIG ....................................................................................................... 5-17
Configuration Area Block CFGA Fields...................................................5-22
.DSKFMT .......................................................................................................5-27
.DSKCTRL ......................................................................................................5-30
.NETRD
.NETWR .......................................................................................................... 5-32
.NETCFIG ......................................................................................................5-34
.NETFOPN ......................................................................................................5-40
.NETFRD ........................................................................................................ 5-42
.NETCTRL....................................................................................................... 5-44
.OUTCHR ....................................................................................................... 5-47
.OUTSTR
.OUTLN ..........................................................................................................5-48
.WRITE
.WRITELN ...................................................................................................... 5-49
.PCRLF ...........................................................................................................5-50
.ERASLN ........................................................................................................ 5-51
.WRITD
.WRITDLN ......................................................................................................5-52
.SNDBRK .......................................................................................................5-54
.DELAY ..........................................................................................................5-55
.RTC_TM ........................................................................................................ 5-56
x
.RTC_DT .........................................................................................................5-57
.RTC_DSP .......................................................................................................5-58
.RTC_RD .........................................................................................................5-59
.REDIR ............................................................................................................5-60
.REDIR_I
.REDIR_O ........................................................................................................5-61
.RETURN ........................................................................................................5-62
.BINDEC ..........................................................................................................5-63
.CHANGEV .....................................................................................................5-64
.STRCMP ........................................................................................................5-65
.MULU32 ........................................................................................................5-66
.DIVU32 ..........................................................................................................5-67
.CHK_SUM .....................................................................................................5-68
.BRD_ID ..........................................................................................................5-69
.ENVIRON ......................................................................................................5-72
.PFLASH Function ..........................................................................................5-76
.DIAGFCN .......................................................................................................5-79
.SIOPEPS ........................................................................................................5-91
.FORKMPU Function.......................................................................................5-93
.FORKMPUR Function....................................................................................5-94
.IDLEMPU Function ............................................................. ..........................5-99
.IOINQ ...........................................................................................................5-100
.IOINFORM ..................................................................................................5-105
.IOCONFIG ...................................................................................................5-107
.IODELETE ...................................................................................................5-108
.SYMBOLTA .................................................................................................5-110
.SYMBOLTD ................................................................................................5-112
APPENDIX A Related Documentation
Motorola Computer Group Documents....................................................................A-1
Microprocessor and Controller Documents..............................................................A-3
Related Specifications...............................................................................................A-9
APPENDIX B System Menu
Introduction...............................................................................................................B-1
Menu Items ...............................................................................................................B-1
Continue System Start-up..................................................................................B-1
Select Alternate Boot Device.............................................................................B-1
Go to System Diagnostics.................................................................................. B-2
xi
Initiate Service Call........................................................................................... B-2
Display System Test Errors ............................................................................... B-2
Dump Memory to Tape .....................................................................................B-2
Using the Service Call Function............................................................................... B-5
Operation........................................................................................................... B-5
Sending Messages......................................................................................B-7
Concurrent Mode .......................................................................................B-7
Terminating the Conversation and Concurrent Modes.............................. B-8
Manual Connection ........................................................................................... B-9
Terminal Connection.......................................................................................B-10
APPENDIX C PPCBug Messages
Introduction .............................................................................................................. C-1
Error Messages....................................................................... ..................................C-2
Other Messages.........................................................................................................C-3
APPENDIX D S-Record Format
Introduction ..............................................................................................................D-1
S-Record Content .....................................................................................................D-1
S-Record Types.........................................................................................................D-2
Creating S-Records........................................................... ...... ..... .............................D-3
Example................................................ ..... ........................................ .......................D-4
APPENDIX E Disk and Tape Controllers
Disk and Tape Support ..............................................................................................E-1
Floppy Drive Configuration Parameters....................................................................E-2
APPENDIX F Disk Status Codes
Introduction ...............................................................................................................F-1
SCSI....................................................................................................................F-1
ATA (Hard Disks/CD-ROM Drives)..................................................................F-2
ATAPI (CD-ROM Drives)..................................................................................F-2
Controller-Independent Status Codes........................................................................F-3
SCSI Firmware Status Codes ....................................................................................F-3
ATA/ATAPI Firmware Status Codes ......................................................................... F-6
xii
APPENDIX G Establishing Network Connections with PPCBug
APPENDIX H Network Communication Status Codes
xiii
xiv

List of Figures

Figure 1-1. Network Boot Modules.........................................................................1-29
Figure 3-1. Boot Record ........................................................................................3-177
Figure 3-2. PowerPC Reference Platform Partition Table Entry...........................3-178
Figure 3-3. Layout of the $41-Type Partition ........................................................3-179
xv
xvi

List of T ables

Table 1-1. LED/Serial Startup Diagnostic Codes ......................................................1-8
T ab le 1-2. MPCR Method Remote Start Register Model........................................1-33
T ab le 1-3. GCSR Method Remote Start Register Model.........................................1-35
Table 1-4. LM/SIG Register Bit Assignments.........................................................1-36
T ab le 3-1. Debugger Command s........................................ .......................................3-1
Table 5-1. System Call Routines -- Hex Code Order.................................................5-2
Table 5-2. System Call Routines -- Alphabetical Order............................................5-4
Table 5-3. Disk Packet Parameters ..........................................................................5-20
T ab le 5-4. IOSATM Fields (CFGA) ............................................................... .........5-22
T ab le 5-5. IOSPRM Fields (CFGA) .............................................. ...... ..... ...............5-23
T ab le 5-6. IOSEPRM Fields (CFGA)...................................... ...... ..........................5-23
Table 5-7. IOSATW Fields (CFGA) ........................................................................5-24
T ab le 5-8. CFGA Fields..................................... ....................................... ...............5-25
Table A-1. Motorola Computer Group Documents .................................................A-1
Table A-2. Microprocessor and Controller Documents ...........................................A-3
Table A-3. Related Specifications ...........................................................................A-9
Table C-1. Debugger Error Messages ......................................................................C-2
Table C-2. Other Messages ......................................................................................C-3
Table D-1. S-Record Fields .....................................................................................D-1
Table E-1. Disk and Tape Controllers Supported ................................................ ....E-1
Table E-2. Floppy Drive Configuration Parameters ................................................E-2
Table F-1. Controller-Independent Status Codes ..................................................... F-3
Table F-2. SCSI Firmware Status Codes ................................................................. F-4
Table F-3. ATA/ATAPI Controller-Dependent Errors ............................................ F-7
Table H-1. Controller-Independent Status Codes ....................................................H-1
Table H-2. DEC21040/21140/21143 Controller Status Codes ................................H-2
Table H-3. Intel 82559/ER Controller Status Codes................................................H-3
xvii
xviii

About This Manual

The PPCBug Firmware Package User’s Ma nual provides infor mation on the PPCBug firmware, the start-up and boot routines, the debugger commands, the one-li ne assembler/disas sembler, and the debugger system calls.
Information in thi s manua l ap plies to Motorola PowerPC™-based boards that use PPCBug as its resident debugger program. The majority of Motorola’s PowerPC™-based boards including most VME, CompactPCI and ATX form factors are equipped with PPCBug.
This document is bound in two parts: Part 1 (PPCBUGA1/UM5) contains the Tabl e of Contents, List of Figures,
and List of Tables fo r Cha pte rs 1 t hr ough 3, Chapters 1 through 3 and th e Index.
Part 2 (PPCBUGA2/UM5) contains the Table of Contents and List of Tables for Chapters 4 and 5 and Appendi ces A th rough H, a nd Chapte rs 4 and 5, Appendixes A through H, and the Index.
The diagnostics are covered in the PPCBug Diagnostics Manual (PPCDIAA/UM).
xix

Summary of Changes

This is the fifth edition of the PPCbug Firmware Package User’s Manual. It supersedes the fourth edition (UM4) and in corporates the following updates.
Where Updated Description of Change
Overall Change Most instances of PPC1Bug or PPC1 were changed to
PPCxBug or PPCx to accommodate multiple versions of Bug, which have been released.
Chapter 1 Since PPCBug resides on most PowerPC boards, specific
boards are no longer listed at the beginning of this chapter. A correction was made to the starting address (from
$03F80000 to $03F40000) of the example described in the section titled Memory Requirements on page 1-3.
A second example for the size and address requirements of NVRAM was added in the sections titled Size and Address
Requirements for NVRAM on page 1-3.
New LED/Serial Startup Diagnostic codes were added to
Table 1-1 on page 1-8.
The section titled Multiprocessor Su pport (Remote Start) on
page 1-31 was completely revised.
Chapter 3 Several new commands were added (e.g., CACHE, IBM and
MMGR), and several existing command descriptions were updated (e.g., ENV, NIOT, SROM, and TA).
Appendix G The content was completely revised from the previous
version of this manual.
Appendix H Status codes were added for the 21143 and 82559ER
controllers.

Overview of Contents

Chapter 1, General Information, provides an overview of PPCBug,
memory requirements, an explanation of the start-up process, a "high­level" list of what PPCBug checks, a list of the LED/Serial startup diagnostic codes, a brief explanation on how to run the Debugger and Diagnostics firmware interactively, an explanation of the auto boot
xx
process, an explanation of the ROMboot process, an explanation of the network auto boot process, an explanation on restarting the system, a description of the types of board failures, an ex planation of the MPU c lock speed calculation, a des cription of the disk I/O s upport, a description of t he network I/O support, and an explanation of the multiprocessor support (remote start).
Chapter 2, Using the Debugger, contains a series of explanations on the
various aspects of Debugger use including such subjects as command syntax, command arguments, command options, control characters, entering and debugging programs, system call routines in user programs, preserving the operating environment, context switching, and floating point support.
Chapter 3, Debugger Commands, a list of all current commands, and a
detailed explanation of each command including command input and description.
Chapter 4, One-Line Assembler/ Disassembler, describes a PPCBug tool
that allows you to create, modify and debug code written in PowerPC assembly languag e.
Chapter 5, System Calls, describes the PPCBug System Call handler, which allows system call s from user programs.
Appendix A, Related Documentation, lists related Motorola documentation, as well as other vendor documents and specifications.
Appendix B, System Menu, describes each menu item within the PPCx­Bug> or PPCx-Diag> environment.
Appendix C, PPCBug Messages, contains a series of tables listing all PPCBug messages and their meaning.
Appendix D, S-Record Format, describes the purpose and use of the S- Record format.
Appendix E, Disk and Tape Controllers, lists and describes the types of disk and tape controllers supported by PPCBug.
Appendix F, Disk Status Codes, lists and descr ibes the various disk status codes supported by PPCBug.
xxi
Appendix G, Establishing Network Connections with PPCBug, describes a procedure that can be used to establis h a netw ork conn ect ion using standard PPCBug commands from a PowerPC board with a compatible network connectivity device.
Appendix H, Network Communication Status Codes, lists and describes two main types of network communication status codes: controller independent and controller dependent.

Comments and Suggestions

Motorola welcomes and appreciates your comments on its doc umentation. We want to know what y ou think about our manuals and how we can make them better. Mail comments to:
Motorola Computer Group Reader Comments DW164 2900 S. Diablo Way Tempe, Arizona 85282
You can also submit comments to the following e-mail address:
reader-comments@mcg.mot.com
In all your corres pondence , plea se li st your name, po si tion, a nd compan y. Be sure to include the title and par t number of the manual and tell how you used it. Then tell us your feelings about its strengths and weaknesses and any recommendations for improvements.

Conventions Used in This Manual

The following typographical conventions are used in this document:
bold
is used for user input that you type j ust as it appe ars. Bold is al so used for commands, options and arguments to commands, and names of programs, directories and files.
italic
xxii
is used for names of variables to which you assign values. Italic is also used for comments in screen dis plays and examples, and to intr odu ce new terms.
courier
is used for system output (for example, screen displays, reports), examples, and system prompts.
<Enter>, <Return> or <CR>
<CR> represents the carriage return or Enter key.
CTRL
represents the Control key. Execute control characters by pr essing the Ctrl key and the letter simultaneously, for example, Ctrl-d.
|
separates two or more items from which to choose (one only)
[ ]
encloses an optiona l item th at may not occ ur at all , or may occur once.
{ }
encloses an optional item that may not occur at all, or may occur one or more times.
A character precedes a data or address parameter to specify the numberic format, as follows (if not specified, the format is hexadecimal):
$dollar
a hexadecimal character.
0x Zero-x % percent a binary number. & ampersand a decimal number.
Data and address sizes are defined as follows: A byte is eight bits, numbered 0 through 7, with bit 0 being the least
significant.
xxiii
A half-word is 16 bits, numbered 0 through 15, with bit 0 being the least significant.
A word is 32 bits, numbered 0 through 31, with bit 0 being the least significant.
The MPU on the PowerPC board is programmed to big-endian byte ordering. Any attempt to use little-endian byte ordering will immediately render the debugger unusable
xxiv

1General Information

PPCBug Overview

PPCBug is a powerful evaluation and debugging tool for systems built around the Motorola PowerPC microprocessors. PPCBug firmware consists of three parts:
Command-driven user-interactive software debugger. It is hereafter
referred to as the debugger, which is described in this manual. Debugging commands are ava ilabl e for lo adi ng and exec uting us er programs under complete operator control for system evaluation.
Command-driven diagnostic package for testing and
troubleshooting the PowerPC board, which is hereafter called the diagnostics. Refer to the PPCBug Diagnostics Manual for information on th e diag nost ics and the diagn ost ics ut ili ties and se lf­tests.
MPU, firmware, and hardware initialization routines, which are
described in this manual.
1
The PPCBug firmware is implemented on most Motorola PowerPC-based products:
A PMCspan board ad ded to an y mai n boar d als o in terf ac es wi th PP CBug. They are collectively referred to in this manual as the PowerPC board or
board. The debugger includes:
Commands for display and modification of memoryBreakpoint and tracing capabilitiesAssembler and disassembler useful for patching programs
Various PPCBug routines that handle I/O, data conversion, and string functions are available to user programs through the System Call handler.
1-1
1
General Information
Because PPCBug is command-driv en, it performs it s various operatio ns in response to user commands entered at the keyboard.

Comparison with other Motorola Bugs

The PPCBug is similar to previous Motorola firmware packages (e.g., MVME147Bug, MVME167Bug, MVME187Bug), with dif ferences due to microprocessor archi te ct ures. These differences ar e pr i ma rily r ef le ct ed i n the instruction mnemonics, register displays, addressing modes of the assembler/disassembler, and argument passing to the system calls.

PPCBug Implementation

PPCBug is written largely in the C programming language, providing benefits of porta bility and maintainabili ty. Where nece ssary, the a ssembly language has been used in sep arately compiled program module s that deal with processor-specific issues. No mixed-language modules are used.
Physically, PPCBug is contained in two socketed 32-pin PLCC Flash devices that together provide 1MB (256KB words) of storage. PPCBug uses the entire memory contained in the two devices.
The executable code is checksummed at every power-on or reset firmwa re entry. The result is checked with a pre-calculated checksum contained in the last 16-bit word of the Flash image.
Although a command to allow the erasing and repr ogramming
!
Caution
1-2 Computer Group Literature Center Web Site
of this Flash memory is available to you, keep in mind that reprogramming any portion of Flash memory will erase everything currently contained in Flash, including PPCBug.

Memory Requirements

The debugger requires approximately 768KB of read/write memory (i.e., DRAM). The debugger allocates this memory from the top, down. For example, on a system which contains 64MB ($04000000) of read/write memory, the debugger’s memory page will be located at $03F40000 to $03FFFFFF.

Size and Address Requirements for NVRAM

Currently, Motorola uses the SGS-Thompson Timekeeper SRAM device (48T559, or M48T35), or equivalent. This is used on the PowerPlus boards and is structured by the Debugger as follows:
Example 1: NVRAM = 8192 bytes total size (with rtc):
Size/Area Offset
5880 bytes user area 0000 - 16f7 2048 bytes debugger area 16f8 - 1ef7 256 bytes configuration area 1ef8 - 1ff7 8 bytes real time clock registers 1ff8 - 1fff
Memory Requirements
1
Example 2: NVRAM = 32768 bytes total size
Size/Area Offset
30456 bytes user area 0000 - 76f7 2048 bytes debugger area 76f8 - 7ef7 256 bytes configuration area 7ef8 - 7ff7 8 bytes real time clock registers 7ff8 - 7fff

Set-up

Refer to the board installation and use manual for information on installing the hardware, configuring jumpers, and assigning the console monitor.
http://www.motorola.com/computer/literature 1-3
1
General Information

Start-up

At either power-up or system reset, PPCBug perfo rms the MPU, hardware, and firmware initialization process (refer to MPU, Hardware, and
Firmware Initializat ion on page 1-5). This process inc ludes a check sum of
the FLASH memory contents. The following types of messages are displayed on the firmware console
during the in itialization pr ocess:
Copyright Motorola Inc. 1988 - 1997, All Rights Reserved PPCx Debugger/Diagnostics Release Version 4.x - xx/xx/xx/RMxx
COLDStart Local Memory Found =04000000 (&67108864) MPU Clock Speed =167Mhz BUS Clock Speed =67Mhz Reset Vector Location : ROM Bank B
Mezzanine Configuration: Single-MPU Current 60X-Bus Master : MPU0 Idle MPU(s) : NONE
System Memory: 64MB, ECC Enabled (ECC-Memory Detected) L2 Cache: NONE PPCx-Bug>
At this point, PPCBug is waiting for you to enter one of the commands described in Chapter 3, of this manual.
PPCBug may alternatively be configured via the ENV command to run selftest and/or autoboot automatically during startup. If so, then PPCBug will instead behave as follows:
The system pauses five se conds, during which y ou may terminate st art-up, and exit to the diagnostics prompt, by pressing ESC or the Break key.
The system performs the self test diagnostics if you do not terminate system start-up. Upon successful completion of these tests, the system pauses another five seconds. You may terminate start-up, and exit to the diagnostics prompt, by pressing ESC or the Break key.
1-4 Computer Group Literature Center Web Site
If you do not terminate system start-up , the s ystem begi ns the boot ro utine that has been set up in the ENV command, ei ther NVRAM Boot List Boot, Auto Boot, ROMboot, or Network Auto Boot.
If the self-tests fail, various error messages appear, and the diagnostics prompt appears.
Refer to Chapter 3, for information on setting the ENV command parameters.

MPU, Hardware, and Firmware Initialization

The MPU, hardware, and firmware initialization process is performed by the PPCBug power-up or system reset. The steps below are a high-level outline; not all of the detailed steps are listed.
1. Set MPU.MSR to known value.
2. Invalidate the MPU’s data/instruction caches.
3. Clear all segment registers of the MPU.
Start-up
1
4. Clear all block address translation registers of the MPU.
5. For “du al CPU only” boards (MVME460x or MTX), catch one CPU
of a dual CPU and place it in a waiting loop.
6. Initialize the MPU bus to PCI bus bridge device.
7. Initialize the PCI bus to ISA bus bridge device.
8. Calculate the external bus clock speed of the MPU.
9. Delay for 750 milliseconds.
10. Determine the CPU board type.
11. Size the local read/write memory (i.e., DRAM).
12. Initialize the read/write memory controller.
13. Set base address of memory to $00000000.
14. Retrieve the speed of read/write memory.
http://www.motorola.com/computer/literature 1-5
1
General Information
15. Initialize read/write memory controller with the speed of read/write memory.
16. Retrieve the speed of read only memory (Flash).
17. Initialize read only memory controller with the speed of read only memory.
18. Enable the MPU’s instruction cache.
19. Copy the MPU’s exception vector table from $FFF00000 to $00000000.
20. Initialize the SIO (PC87303/PC87307/PC87308) resources’ base addresses for boards that have the SIO device.
21. Initialize the Z8536 device if the board has the device.
22. Verify MPU type.
23. Enable the super-scalar feature of the MPU (boards with MPC604­type chips only).
24. Initialize the Keyboard Controller (PC87303/PC87307/PC87308) for boards that have the device.
25. Determine the debugger’s Console/Host ports, and initialize the appropriate UART or Graphic devices.
26. Display the debugger’s copyright message.
27. Display any hardware initialization errors that may have occurred.
28. Checksum the debugger object, and display a warning message if the checksum failed to verif y.
29. Display the amount of local read/write memory found.
30. Verify the configuration data that is resident in NVRAM, and display a war ning message if the verificatio n failed.
31. Calculate and display the MPU clock speed. Verify that the MPU clock speed matches the configuration data, and display a warning message if the verification fails.
1-6 Computer Group Literature Center Web Site
Loading...
+ 478 hidden pages