Programmers Model
ARM DDI 0363G
Copyright © 2006-2011 ARM Limited. All rights reserved.
3-22
ID073015
Non-Confidential
Aborts in Strongly-ordered and Device memory
When a memory access generates an abort, the instruction generating that access is abandoned,
even if it has not completed all its memory accesses, and the abort exception is taken. The abort
handler can then do one of the following:
•
fix the error and return to the instruction that was abandoned, to re-execute it
•
perform the appropriate data transfers on behalf of the aborted instruction and return to
the instruction after the abandoned instruction
•
treat the error as fatal and terminate the process.
If the abort handler returns to the abandoned instruction, some of the memory accesses
generated are repeated. The effect is that multiword load/store instructions can access the same
memory location twice. The first access occurs before the abort is detected, and the second when
the instruction is restarted.
In Strongly-ordered or Device type memory, repeating memory accesses might have
unacceptable side-effects. Therefore, if the abort handler can fix the error and re-execute the
aborted instruction, you must ensure that for all memory errors on multiword load/store
instructions, either:
•
all side effects of repeating accesses are inconsequential
•
the error must either occur on the first word accessed or not at all.
The instructions that this rule applies to are:
•
All forms of ARM instructions
LDM
, and
LDRD
, all forms of
STM
,
STRD
including VFP
variants, and unaligned
LDR
,
STR
,
LDRH
, and
STRH
•
Thumb instructions
LDMIA
,
LDRD
,
SDRD
,
PUSH
,
POP
, and
STMIA
including VFP variants, and
unaligned
LDR
,
STR
,
LDRH
, and
STRH
.
Abort handler
If you configure the processor with parity or ECC on the caches or the TCMs, and the abort
handler is in one of these memories, then it is possible for a parity or ECC error to occur in the
abort handler. If the error is not recoverable, then a synchronous abort occurs and the processor
loops until the next interrupt. The LR and SPSR values for the original abort are also lost.
Therefore, you must construct software that ensures that no synchronous aborts occur when in
the abort handler. This means the abort handler must be in external memory and not cached.
3.7.5
Supervisor call instruction
You can use the
SuperVisor Call
(SVC) instruction (formerly SWI) to enter Supervisor mode,
usually to request a particular supervisor function. The SVC handler reads the opcode to extract
the SVC function number. A SVC 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 SVC.
IRQs are disabled when a software interrupt occurs.