
1-34
MPC7400 RISC Microprocessor Users Manual
Exception Model
1.6.2 MPC7400 Microprocessor Cache Implementation
The MPC7400 cache implementation is described in Section 1.2.4, òOn-Chip Instruction
and Data Caches,ó and Section 1.2.5, òL2 Cache Implementation.ó The BPU also contains
a 64-entry BTIC that provides immediate access to cached target instructions. For more
information, see Section 1.2.2.2, òBranch Processing Unit (BPU).ó
1.7 Exception Model
The following sections describe the PowerPC exception model and the MPC7400
implementation. A detailed description of the MPC7400 exception model is provided in
Chapter 4, òExceptions.ó
1.7.1 PowerPC Exception Model
The PowerPC exception mechanism allows the processor to interrupt the instruction ow
to handle certain situations caused by external signals, errors, or unusual conditions arising
from the instruction execution. When exceptions occur, information about the state of the
processor is saved to certain registers and the processor begins execution at an address
(exception vector) predetermined for each exception. Exception processing occurs in
supervisor mode.
Although multiple exception conditions can map to a single exception vector, a more
speciTc condition may be determined by examining a register associated with the
exceptionfor example, the DSISR and the FPSCR. Additionally, some exception
conditions can be enabled or disabled explicitly by software.
The PowerPC architecture requires that exceptions be handled in program order; therefore,
although a particular implementation may recognize exception conditions out of order, they
are handled in order. When an instruction-caused exception is recognized, any unexecuted
instructions that appear earlier in the instruction stream, including any that are
undispatched, are required to complete before the exception is taken, and any exceptions
those instructions cause must also be handled Trst. Likewise, asynchronous, precise
exceptions are recognized when they occur, but are not handled until the instructions
currently in the completion queue successfully retire or generate an exception, and the
completion queue is emptied.
Unless a catastrophic condition causes a system reset or machine check exception, only one
exception is handled at a time. For example, if one instruction encounters multiple
exception conditions, those conditions are handled sequentially. After the exception handler
handles an exception, the instruction processing continues until the next exception
condition is encountered. Recognizing and handling exception conditions sequentially
guarantees that exceptions are recoverable.
When an exception is taken, information about the processor state before the exception was
taken is saved in SRR0 and SRR1. Exception handlers should save the information stored