
Chapter 2. ColdFire Core
2-31
Exception Processing Overview
2.8 Exception Processing Overview
Exception processing for ColdFire processors is streamlined for performance. Differences
from previous M68000 Family processors include the following:
A simplied exception vector table
Reduced relocation capabilities using the vector base register
A single exception stack frame format
Use of a single, self-aligning system stack pointer
ColdFire processors use an instruction restart exception model but require more software
support to recover from certain access errors. See
Table 2-19 for details.
Exception processing can be dened as the time from the detection of the fault condition
until the fetch of the rst handler instruction has been initiated. It is comprised of the
following four major steps:
1. The processor makes an internal copy of the 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 forces SR[M] to be cleared and the interrupt priority mask
to be set to the level of the current interrupt request.
2. The processor determines the exception vector number. For all faults except
interrupts, the processor performs this calculation based on the exception type. For
interrupts, the processor performs an interrupt-acknowledge (IACK) bus cycle to
obtain the vector number from a peripheral device. 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. ColdFire processors support a single stack pointer in the A7 address
register; therefore, there is no notion of separate supervisor and user stack pointers.
As a result, the exception stack frame is created at a 0-modulo-4 address on the top
of the current system stack. Additionally, the processor uses a simplied
xed-length stack frame for all exceptions. The exception type determines whether
the program counter in the exception stack frame denes the address of the faulting
instruction (fault) or of the next instruction to be executed (next).
4. The processor acquires the address of the rst instruction of the exception handler.
The exception vector table is aligned on a 1-Mbyte boundary. This instruction
address is obtained by fetching a value from the table at the address dened in the
vector base register. The index into the exception table is calculated as
4 x vector_number. When the index value is generated, the vector table contents
determine the address of the rst instruction of the desired handler. After the fetch
of the rst opcode of the handler is initiated, exception processing terminates and
normal instruction processing continues in the handler.
ColdFire processors support a 1024-byte vector table aligned on any 1-Mbyte address
boundary; see
Table 2-19. The table contains 256 exception vectors where the rst 64 are