![Intel XScale Core Developer'S Manual Download Page 35](http://html.mh-extra.com/html/intel/xscale-core/xscale-core_developers-manual_2073165035.webp)
Developer’s Manual
January, 2004
35
Intel XScale® Core
Developer’s Manual
Programming Model
Although the core guarantees the Base Restored Abort Model for precise aborts, it cannot do so in
the case of imprecise aborts. A Data Abort handler may encounter an updated base register if it is
invoked because of an imprecise abort.
Imprecise data aborts may create scenarios difficult for an abort handler to recover. Both external data
aborts and data cache parity errors may result in corrupted targeted register data. Because these faults
are imprecise, it is possible corrupted data will have been used before the Data Abort fault handler is
invoked. Because of this, software should treat imprecise data aborts as unrecoverable.Even memory
accesses marked as “stall until complete” (see
Section 3.2.2.4
) can result in imprecise data aborts.
For these types of accesses, the fault is somewhat less imprecise than the general case: it is
guaranteed to be raised within three instructions of the instruction that caused it. In other words, if
a “stall until complete” LD or ST instruction triggers an imprecise fault, then that fault will be seen
by the program within three instructions.
With this knowledge, it is possible to write code that accesses “stall until complete” memory with
impunity. Simply place several NOP instructions after such an access. If an imprecise fault occurs,
it will do so during the NOPs; the data abort handler will see identical register and memory state as
it would with a precise exception, and so should be able to recover. An example of this is shown in
Example 2-2 on page 2-35
.
If a system design precludes events that could cause external aborts, then such precautions are not
necessary.
Multiple Data Aborts
Multiple data aborts may be detected by hardware but only the highest priority one will be
reported. If the reported data abort is precise, software can correct the cause of the abort and
re-execute the aborted instruction. If the lower priority abort still exists, it will be reported.
Software can handle each abort separately until the instruction successfully executes.
If the reported data abort is imprecise, software needs to check the SPSR to see if the previous
context was executing in abort mode. If this is the case, the link back to the current process has
been lost and the data abort is unrecoverable.
2.3.4.5
Events from Preload Instructions
A PLD instruction will never cause the Data MMU to fault for any of the following reasons:
•
Domain Fault
•
Permission Fault
•
Translation Fault
If execution of the PLD would cause one of the above faults, then the PLD causes no effect.
Example 2-2. Shielding Code from Potential Imprecise Aborts
;; Example of code that maintains architectural state through the
;; window where an imprecise fault might occur.
LD
R0, [R1]
; R1 points to stall-until-complete
;
region of memory
NOP
NOP
NOP
; Code beyond this point is guaranteed not to see any aborts
; from the LD.