
MOTOROLA
Chapter 4. Exceptions
4-15
4.2.2 Steps for Exception Processing
After it is determined that the exception can be taken (by confirming that any instruction-
caused exceptions occurring earlier in the instruction stream have been handled, and by
confirming that the exception is enabled for the exception condition), the processor does
the following:
1. The machine status save/restore register 0 (SRR0) is loaded with an instruction
address that depends on the type of exception. See the individual exception
description for details about how this register is used for specific exceptions.
2. Bits 1–4 and 10–15 of SRR1 are loaded with information specific to the exception
type.
3. Bits 5–9 and 16–31 of SRR1 are loaded with a copy of the corresponding bits of the
MSR.
4. The MSR is set as described in Table 4-5. The new values take effect beginning with
the fetching of the first instruction of the exception-handler routine located at the
exception vector address.
Note that MSR[IR] and MSR[DR] are cleared for all exception types; therefore,
address translation is disabled for both instruction fetches and data accesses
beginning with the first instruction of the exception-handler routine.
5. Instruction fetch and execution resumes, using the new MSR value, at a location
specific to the exception type. The location is determined by adding the exception's
vector (see Figure 4-1) to the base address determined by MSR[IP]. If IP is cleared,
exceptions are vectored to the physical address 0x000
n_nnnn
. If IP is set, exceptions
are vectored to the physical address 0xFFF
n_nnnn
. For a machine check exception
that occurs when MSR[ME] = 0 (machine check exceptions are disabled), the
processor enters the checkstop state (the machine stops executing instructions). See
Section 4.5.2, “Machine Check Exception (0x00200).”
4.2.3 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 registers
appropriately, and then execute
rfi
.
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.