Programmer’s Model
2-24
Copyright 2000 ARM Limited. All rights reserved.
ARM DDI 0165B
The ARM9E-S implements the base restored Data Abort model, which differs from the
base updated Data Abort model implemented by the ARM7TDMI-S.
The difference in the Data Abort model affects only a very small section of operating
system code, in the Data Abort handler. It does not affect user code.
With the base restored Data Abort model, when a Data Abort exception occurs during
the execution of a memory access instruction, the base register is always restored by the
processor hardware to the value it contained before the instruction was executed. This
removes the need for the Data Abort handler to unwind any base register update, which
might have been specified by the aborted instruction. This greatly simplifies the
software Data Abort handler.
The abort mechanism allows you to implement a demand-paged virtual memory
system. In such a system, the processor is allowed to generate arbitrary addresses. When
the data at an address is unavailable, the Memory Management Unit (MMU) signals an
abort. The abort handler must then work out the cause of the abort, make the requested
data available, and retry the aborted instruction. The application program needs no
knowledge of the amount of memory available to it, and its state is not affected by the
abort.
After dealing with the cause of the abort, the handler must execute the following return
instruction irrespective of the processor operating state at the point of entry:
SUBS PC,R14_abt,#8
This action restores both the PC and the CPSR, and retries the aborted instruction.
2.9.8
Software interrupt instruction
You can use the Software Interrupt Instruction (SWI) to enter Supervisor mode, usually
to request a particular supervisor function. A SWI handler returns by executing the
following instruction, irrespective of the processor operating state:
MOVS PC, R14_svc
This action restores the PC and CPSR, and returns to the instruction following the SWI.
The SWI handler reads the opcode to extract the SWI function number.
IRQs are disabled when a software interrupt occurs.