
5-16
G2 PowerPC Core Reference Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
Exception Processing
5.2.4
Setting MSR[RI]
The operating system should handle MSR[RI] as follows:
In the machine check and system reset exceptions—If SRR1[RI] is cleared, the
exception is not recoverable. If it is set, the exception is recoverable with respect to
the processor.
In each exception handler—When enough state information has been saved that a
machine check or system reset exception can reconstruct the previous state, set
MSR[RI].
In each exception handler—Clear MSR[RI], set the SRR0 and SRR1 (or CSRR0 and
CSRR1) registers appropriately, and then execute
rfi
(or
rfci
).
Note that the RI bit being set indicates that, with respect to the processor, enough
processor state data is valid for the processor to continue, but it does not guarantee
that the interrupted process can resume.
5.2.5
Returning From an Exception Handler with rfi
The Return From Interrupt (
rfi
) instruction performs context synchronization by allowing
previously issued instructions to complete before returning to the interrupted process. In
general, execution of the
rfi
instruction ensures the following:
All previous instructions have completed to a point where they can no longer cause
an exception. If a previous instruction causes a direct-store interface error exception,
the results must be determined before this instruction is executed.
Previous instructions complete execution in the context (privilege, protection, and
address translation) under which they were issued.
The
rfi
instruction copies SRR1 bits back into the MSR.
The instructions following this instruction execute in the context established by this
instruction.
For a complete description of context synchronization, refer to Chapter 6, “Exceptions,” in
the
Programming Environments Manual.
5.2.6
Returning From an Interrupt with rfci
The Return From Critical Interrupt (
rfci
) is a G2_LE core-only supervisor level instruction
that performs context synchronization by allowing previously issued instructions to
complete before returning to the interrupted process. The
rfci
instruction performs the same
F
Freescale Semiconductor, Inc.
n
.