Cache Protection
ARM DDI 0500D
Copyright © 2013-2014 ARM. All rights reserved.
8-2
ID021414
Non-Confidential
8.1
Cache protection behavior
The Cortex-A53 processor protects against soft errors that result in a RAM bitcell temporarily
holding the incorrect value. The processor writes a new value to the RAM to correct the error.
If the error is a hard error, that is not corrected by writing to the RAM, for example a physical
defect in the RAM, then the processor might get into a livelock as it continually detects and then
tries to correct the error.
Some RAMs have
Single Error Detect
(SED) capability, while others have
Single Error
Correct, Double Error Detect
(SECDED) capability. The L1 data cache dirty RAM is
Single
Error Detect, Single Error Correct
(SEDSEC). The processor can make progress and remain
functionally correct when there is a single bit error in any RAM. If there are multiple single bit
errors in different RAMs, or within different protection granules within the same RAM, then the
processor also remains functionally correct. If there is a double bit error in a single RAM within
the same protection granule, then the behavior depends on the RAM:
•
For RAMs with SECDED capability listed in
Table 8-1
, the error is detected and reported
as described in
Error reporting
on page 8-4
. If the error is in a cache line containing dirty
data, then that data might be lost, resulting in data corruption.
•
For RAMs with only SED, a double bit error is not detected and therefore might cause
data corruption.
If there are three or more bit errors, then depending on the RAM and the position of the errors
within the RAM, the errors might be detected or might not be detected.
The Cortex-A53 CPU cache protection support has a minimal performance impact when no
errors are present. When an error is detected, the access that caused the error is stalled while the
correction takes place. When the correction is complete, the access either continues with the
corrected data, or is retried. If the access is retried, it either hits in the cache again with the
corrected data, or misses in the cache and re-fetches the data from a lower level cache or from
main memory. The behavior for each RAM is shown in
Table 8-1
.
Table 8-1 Cache protection behavior
RAM
Protection
type
Configuration option
Protection
granule
Correction behavior
L1 I-cache tag
Parity, SED
CPU_CACHE_PROTECTION
31 bits
Both lines in the cache set are invalidated, then
the line requested is refetched from L2 or
external memory.
L1 I-cache data
Parity, SED
CPU_CACHE_PROTECTION
20 bits
Both lines in the cache set are invalidated, then
the line requested is refetched from L2 or
external memory.
TLB
Parity, SED
CPU_CACHE_PROTECTION
31 bits or
52 bits
Entry invalidated, new pagewalk started to
refetch it.
L1 D-cache tag
Parity, SED
CPU_CACHE_PROTECTION
32 bits
Line cleaned and invalidated from L1. SCU
duplicate tags are used to get the correct
address. Line refetched from L2 or external
memory.
L1 D-cache data
ECC,
SECDED
CPU_CACHE_PROTECTION
32 bits
Line cleaned and invalidated from L1, with
single bit errors corrected as part of the
eviction. Line refetched from L2 or external
memory.