Typewriter User Manual

5- 52 MC68340 USER’S MANUAL MOTOROLA
attempting to read the stack frame. The version number is located in the most significant
byte (bits 15–8) of the internal register word at location SP + $14 in the stack frame. The
validity check ensures that stack frame data will be properly interpreted in multiprocessor
systems.
If a frame is invalid, a format error exception is taken. If it is inaccessible, a bus error
exception is taken. Otherwise, the processor reads the entire frame into the proper
internal registers, de-allocates the stack (12 words), and resumes normal processing. Bus
error frames for faults during exception processing require the RTE instruction to rewrite
the faulted stack frame. If an error occurs during any of the bus cycles required by rewrite,
the processor halts.
If a format error occurs during RTE execution, the processor creates a normal four-word
fault stack frame below the frame that it was attempting to use. If a bus error occurs, a
bus-error stack frame will be created. The faulty stack frame remains intact, so that it may
be examined and repaired by an exception handler or used by a different type of
processor (e.g., MC68010, MC68020, or future M68000 processor) in a multiprocessor
system.
5.5.3 Fault Recovery
There are four phases of recovery from a fault: recognizing the fault, saving the processor
state, repairing the fault (if possible), and restoring the processor state. Saving and
restoring the processor state are described in the following paragraphs.
The stack contents are identified by the special status word (SSW). In addition to
identifying the fault type represented by the stack frame, the SSW contains the internal
processor state corresponding to the fault.
1514131211109876543210
TP MV 0 TR B1 B0 RR RM IN RW LG SIZ FUNC
TP—BERR frame type
MV—MOVEM in progress
TR—Trace pending
B1—Breakpoint channel 1 pending
B0—Breakpoint channel 0 pending
RR—Rerun write cycle after RTE
RM—Faulted cycle was read-modify-write
IN—Instruction/other
RW—Read/write of faulted bus cycle
LG—Original operand size was long word
SIZ—Remaining size of faulted bus cycle
FUNC—Function code of faulted bus cycle
Frees
cale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...