Chapter 7. Exception Processing
For More Information On This Product,
Go to: www.freescale.com
7-1
Chapter 7
Exception Processing
This chapter describes CF4e exception processing, focusing on differences from previous
ColdFire versions. In particular, additional encodings have been added to the fault status
(FS) field in the exception stack frame to indicate exceptions related to translation
lookaside buffers (TLBs). This provides CF4e core designs with precise, recoverable faults
for all K-Bus references to support demand-paged memory accesses.
7.1 Overview
Exception processing for ColdFire processors is streamlined for performance. Differences
from previous ColdFire Family processors include the following:
An instruction restart model for translation (TLB miss) and access faults. This new
functionality extends the existing ColdFire access error fault vector and exception
stack frames.
Use of separate system stack pointers for user and supervisor modes.
Previous ColdFire processors use an instruction restart exception model but require
additional software support to recover from certain access errors.
Exception processing can be defined as the time from the detection of the fault condition
until the fetch of the first handler instruction has been initiated. It consists of the following
four major steps:
1. The processor makes an internal copy of the status register (SR) and then enters
supervisor mode by setting SR[S] and disabling trace mode by clearing SR[T]. The
occurrence of an interrupt exception also clears SR[M] and sets the interrupt priority
mask, SR[I] to the level of the current interrupt request.
2. The processor determines the exception vector number. For all faults except
interrupts, the processor bases this calculation on exception type. For interrupts, the
processor performs an interrupt acknowledge (IACK) bus cycle to obtain the vector
number from peripheral. The IACK cycle is mapped to a special acknowledge
address space with the interrupt level encoded in the address.
3. The processor saves the current context by creating an exception stack frame on the
system stack. As a result, the exception stack frame is created at a 0-modulo-4
address on top of the system stack pointed to by the supervisor stack pointer (SSP).
F
Freescale Semiconductor, Inc.
n
.