![](http://datasheet.mmic.net.cn/290000/XPC801ZP25_datasheet_16187868/XPC801ZP25_101.png)
The PowerPC Core
6-10
MPC801 USER’S MANUAL
MOTOROLA
6
6.2.4.1 RESTARTABILITY AFTER AN INTERRUPT
Most interrupts in the core are restartable, but some are nonrestartable if they are only
recognized when the machine status save/restore 0 and 1 registers (SRR0 and SRR1) are
busy. System reset and machine check interrupts are the only interrupts that can be
nonrestartable within the PowerPC architecture.
Most of the interrupt types defined in the architecture should be restartable. It is assured by
convention that no interrupt generating instruction should be executed between the start of
an interrupt handler and the save of the registers altered by any interrupt or between the
restoration of these registers and the execution of the
and SRR1 registers and for some interrupt types, the data address register (DAR) and the
data storage interrupt status register (DSISR). Also, external interrupts are masked in these
areas.
rfi
instruction. These are the SRR0
In the core, two implementation specific interrupt types can have this phenomena—debug
port unmaskable interrupt and breakpoint interrupt. Since there might be a situation in which
it is preferable to be restartable, a mechanism is defined to notify the interrupt handler code
when it is in a restartable state.
The mechanism uses a bit within the machine state register (MSR) called the recoverable
interrupt bit (MSR
RI
). The MSR
RI
shadow bit in the SRR1 register indicates if the interrupt is
restartable or not. Notice that this bit does not need to be checked on interrupt types that are
restartable by convention, except those mentioned above. The MSR
behavior as the external interrupt enable bit (MSR
is copied to its shadow in the SRR1 register and cleared. Every time an
executed, MSR
RI
is copied from its shadow in the SRR1 register. In addition, it can be
altered by the software via the
mtmsr
(move to special register) instruction. The MSR
is intended to be set by the interrupt handler software after saving the machine state, and
cleared by the interrupt handler software before retrieving the machine state.
RI
bit follows a similar
EE
). Every time an interrupt occurs, MSR
RI
rfi
instruction is
RI
bit
In critical code sections where MSR
busy, MSR
RI
should be left asserted. In these cases, if an interrupt occurs, it is restartable.
To facilitate the software manipulation of the MSR
special commands implemented as move to special register. The following table defines
these special register mnemonics. A write (
mtspr
the operation specified in the following table. Any read (
treated like any other unimplemented instruction and, therefore, results in an
implementation dependent software emulation interrupt. For specific encoding,
see Table 6-3.
EE
is negated, but the SRR0 and SRR1 registers are not
RI
and MSR
EE
bits, the core includes
) of any data to these locations performs
mfspr
) from these locations is