Motorola PPCBug User Manual

0 (0)

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.

Printed in the United States of America.

Motorola® and the Motorola symbol are registered trademarks of Motorola, Inc. PowerPC™ is a trademark of IBM, and is used by Motorola with permission. AIXTM is a trademark of IBM Corp.

All other products mentioned in this document are trademarks or registered trademarks 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 precautions listed below represent 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. If the equipment is supplied with a three-conductor AC power cable, the power cable must be plugged into an approved 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 adjustment. Service personnel should not replace components with power cable connected. Under certain conditions, dangerous voltages may exist even with the power cable removed. To avoid injuries, such personnel should always disconnect power and discharge circuits before touching 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 handle the CRT and avoid rough handling or jarring of the equipment. Handling of 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.

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.

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. 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.

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 not be published commercially in print or electronic form, edited, translated, or otherwise altered without the 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 available 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 the Rights in Technical Data clause at DFARS 252.227-7013 (Nov. 1995) and of the Rights in Noncommercial Computer Software and Documentation clause 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 Table 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 Tables

Table 1-1. LED/Serial Startup Diagnostic Codes ......................................................

1-8

Table 1-2. MPCR Method Remote Start Register Model ........................................

1-33

Table 1-3. GCSR Method Remote Start Register Model.........................................

1-35

Table 1-4. LM/SIG Register Bit Assignments .........................................................

1-36

Table 3-1. Debugger Commands ...............................................................................

3-1

Table 5-1. System Call Routines -- Hex Code Order.................................................

5-2

Table 5-2. System Call Routines -- Alphabetical Order ............................................

5-4

Table 5-3. Disk Packet Parameters ..........................................................................

5-20

Table 5-4. IOSATM Fields (CFGA) ........................................................................

5-22

Table 5-5. IOSPRM Fields (CFGA) ........................................................................

5-23

Table 5-6. IOSEPRM Fields (CFGA) ......................................................................

5-23

Table 5-7. IOSATW Fields (CFGA) ........................................................................

5-24

Table 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 Manual provides information on the PPCBug firmware, the start-up and boot routines, the debugger commands, the one-line assembler/disassembler, and the debugger system calls.

Information in this manual applies 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 Table of Contents, List of Figures, and List of Tables for Chapters 1 through 3, Chapters 1 through 3 and the Index.

Part 2 (PPCBUGA2/UM5) contains the Table of Contents and List of Tables for Chapters 4 and 5 and Appendices A through H, and Chapters 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 incorporates 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 Support (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 "highlevel" 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 explanation of the MPU clock speed calculation, a description of the disk I/O support, a description of the 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 language.

Chapter 5, System Calls, describes the PPCBug System Call handler, which allows system calls 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 PPCxBug> 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 describes the various disk status codes supported by PPCBug.

xxi

Appendix G, Establishing Network Connections with PPCBug, describes a procedure that can be used to establish a network connection 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 documentation. We want to know what you 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 correspondence, please list your name, position, and company. Be sure to include the title and part 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 just as it appears. Bold is also 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 displays and examples, and to introduce 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 pressing the Ctrl key and the letter simultaneously, for example, Ctrl-d.

|

separates two or more items from which to choose (one only)

[ ]

encloses an optional item that may not occur 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

General Information 1

PPCBug Overview

PPCBug is a powerful evaluation and debugging tool for systems built around the Motorola PowerPC microprocessors. PPCBug firmware consists of three parts:

Command-driven user-interactive software debugger. It is hereafter referred to as the debugger, which is described in this manual. Debugging commands are available for loading and executing user programs under complete operator control for system evaluation.

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 the diagnostics and the diagnostics utilities and selftests.

MPU, firmware, and hardware initialization routines, which are described in this manual.

The PPCBug firmware is implemented on most Motorola PowerPC-based products:

A PMCspan board added to any main board also interfaces with PPCBug.

They are collectively referred to in this manual as the PowerPC board or board.

The debugger includes:

Commands for display and modification of memory

Breakpoint and tracing capabilities

Assembler and disassembler useful for patching programs

Various PPCBug routines that handle I/O, data conversion, and string functions are available to user programs through the System Call handler.

1-1

Motorola PPCBug User Manual

1

General Information

Because PPCBug is command-driven, it performs its various operations 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 differences due to microprocessor architectures. These differences are primarily reflected in the instruction mnemonics, register displays, addressing modes of the assembler/disassembler, and argument passing to the system calls.

PPCBug Implementation

!

Caution

PPCBug is written largely in the C programming language, providing benefits of portability and maintainability. Where necessary, the assembly language has been used in separately compiled program modules 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 firmware 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 reprogramming of this Flash memory is available to you, keep in mind that reprogramming any portion of Flash memory will erase everything currently contained in Flash, including PPCBug.

1-2

Computer Group Literature Center Web Site

Memory Requirements

1

 

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

 

 

 

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 performs the MPU, hardware, and firmware initialization process (refer to MPU, Hardware, and Firmware Initialization on page 1-5). This process includes a checksum of the FLASH memory contents.

The following types of messages are displayed on the firmware console during the initialization process:

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 seconds, during which you may terminate start-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

Start-up

1

 

If you do not terminate system start-up, the system begins the boot routine that has been set up in the ENV command, either NVRAM Boot List Boot, Auto Boot, ROMboot, or Network Auto Boot.

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.

4.Clear all block address translation registers of the MPU.

5.For “dual CPU only” boards (MVME460 x 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 MPC604type 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 verify.

29.Display the amount of local read/write memory found.

30. Verify the configuration data that is resident in NVRAM, and display a warning message if the verification failed.

31.Calculate and display the MPU clock speed. Verify that the MPU clock speed matches the configuration data, and display a warning message if the verification fails.

1-6

Computer Group Literature Center Web Site

Loading...
+ 478 hidden pages