MOTOROLA
Chapter 7. Exceptions
7-17
Part II. PowerPC Microprocessor Module
7.1.5 Recoverability after an Exception
The processor cannot always recover from system reset and machine check interrupts,
either because the conditions that cause the interrupt are catastrophic or because they
caused the save/restore information in SRR0 and SRR1to be overwritten.
All other PowerPC exceptions should be restartable.
Registers such as SRR0 and SRR1
(and for some exceptions the data address register (DAR) and DSI status register (DSISR))
that may be affected by subsequent exceptions should be saved early in the routine to avoid
being overwritten. Likewise, the saved values should be restored to those registers at the
end of the handler routine in such a way that protects them from an exception before the
instruction returns control to the interrupted process. Interrupts should also be masked in
these areas by clearing (disabling) MSR[ME] for system reset and machine check
interrupts and MSR[EE] for external interrupt, decrementer and two
implementation-speciÞc exceptionsÑdebug port unmaskable interrupt and breakpoint
interrupt in nonmaskable mode.
The recoverable exception bit (MSR[RI]) is deÞned to notify the exception handler code
whether it is in a restartable state. The MSR[RI] shadow bit in SRR1 indicates if the
exception is restartable. This bit does not need to be checked on exception types that are
restartable by convention, except those previously mentioned. When an exception occurs,
MSR[RI] is copied to the equivalent bit in SRR1 and cleared. When an rÞ instruction is
executed, MSR[RI] is copied from SRR1 or software can change the bit by using it the
mtmsr instruction. The MSR[RI] bit is intended to be set by the exception handler after
saving the machine state, in SRR0 and SRR1 (and DAR and DSISR if needed) and cleared
by the exception handler before retrieving the machine state.
In critical code sections where MSR[EE] is cleared but SRR0 and SRR1 are not busy,
MSR[RI] should remain set. In such cases, if an exception occurs, the process is restartable.
Table 7-18 lists SPRs that facilitate manipulation of MSR[RI] and MSR[EE]. Writing to
these locations performs the speciÞed operation. Attempting to read these locations is
treated as an unimplemented instruction and causes a software emulation exception.
Table 7-18. Additional SPRs that Affect MSR Bits
Name
SPR
MSR[EE]
MSR[RI]
Used For
EIE
80
1
1
External interrupt enable:
End of handlerÕs prologue, enable nested external interrupts;
End of critical code segment in which external interrupts were disabled
EID
81
0
1
External interrupt disable, but other exception are recoverable:
End of handlerÕs prologue, keep external nested interrupts disabled;
Start of critical code segment in which external interrupts are disabled
NRI
82
0
0
Nonrecoverable interrupt:
Start of handlerÕs epilogue
Содержание MPC860 PowerQUICC
Страница 3: ...MPC860UM AD 07 98 REV 1 MPC860 PowerQUICC ª UserÕs Manual ...
Страница 36: ...xxxvi MPC860 PowerQUICC UserÕs Manual MOTOROLA CONTENTS Paragraph Number Title Page Number ...
Страница 78: ...I iv MPC860 PowerQUICC UserÕs Manual MOTOROLA Part I Overview ...
Страница 88: ...1 10 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part I Overview ...
Страница 114: ...3 16 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part I Overview ...
Страница 226: ...8 32 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part II PowerPC Microprocessor Module ...
Страница 262: ...9 36 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part II PowerPC Microprocessor Module ...
Страница 274: ...III iv MPC860 PowerQUICC UserÕs Manual MOTOROLA Part III Configuration ...
Страница 320: ...12 12 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part III Configuration ...
Страница 325: ...MOTOROLA Part IV Hardware Interface IV v Part IV Hardware Interface ...
Страница 326: ...IV vi MPC860 PowerQUICC UserÕs Manual MOTOROLA Part IV Hardware Interface ...
Страница 352: ...13 26 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part IV Hardware Interface ...
Страница 394: ...14 42 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part IV Hardware Interface ...
Страница 426: ...15 32 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part IV Hardware Interface ...
Страница 530: ...17 26 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part IV Hardware Interface ...
Страница 632: ...21 44 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 660: ...22 28 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 708: ...24 24 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 748: ...27 20 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 846: ...31 20 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 914: ...35 12 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 948: ...36 34 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part V The Communications Processor Module ...
Страница 998: ...37 48 MPC860 PowerQUICC UserÕs Manual MOTOROLA Part VI Debug and Test ...
Страница 1016: ...A 10 MPC860 PowerQUICC UserÕs Manual MOTOROLA Appendixes ...
Страница 1024: ...B 8 MPC860 PowerQUICC UserÕs Manual MOTOROLA Appendixes ...
Страница 1030: ...C 6 MPC860 PowerQUICC UserÕs Manual MOTOROLA Appendixes ...
Страница 1086: ...Glossary 12 MPC860 PowerQUICC UserÕs Manual MOTOROLA ...
Страница 1106: ......