aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig26
-rw-r--r--arch/arm/mm/proc-v7.S27
2 files changed, 53 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 90542db1220d..39cd37f29aaf 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1186,6 +1186,32 @@ config ARM_ERRATA_773022
1186 loop buffer may deliver incorrect instructions. This 1186 loop buffer may deliver incorrect instructions. This
1187 workaround disables the loop buffer to avoid the erratum. 1187 workaround disables the loop buffer to avoid the erratum.
1188 1188
1189config ARM_ERRATA_818325_852422
1190 bool "ARM errata: A12: some seqs of opposed cond code instrs => deadlock or corruption"
1191 depends on CPU_V7
1192 help
1193 This option enables the workaround for:
1194 - Cortex-A12 818325: Execution of an UNPREDICTABLE STR or STM
1195 instruction might deadlock. Fixed in r0p1.
1196 - Cortex-A12 852422: Execution of a sequence of instructions might
1197 lead to either a data corruption or a CPU deadlock. Not fixed in
1198 any Cortex-A12 cores yet.
1199 This workaround for all both errata involves setting bit[12] of the
1200 Feature Register. This bit disables an optimisation applied to a
1201 sequence of 2 instructions that use opposing condition codes.
1202
1203config ARM_ERRATA_852423
1204 bool "ARM errata: A17: some seqs of opposed cond code instrs => deadlock or corruption"
1205 depends on CPU_V7
1206 help
1207 This option enables the workaround for:
1208 - Cortex-A17 852423: Execution of a sequence of instructions might
1209 lead to either a data corruption or a CPU deadlock. Not fixed in
1210 any Cortex-A17 cores yet.
1211 This is identical to Cortex-A12 erratum 852422. It is a separate
1212 config option from the A12 erratum due to the way errata are checked
1213 for and handled.
1214
1189endmenu 1215endmenu
1190 1216
1191source "arch/arm/common/Kconfig" 1217source "arch/arm/common/Kconfig"
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 6fcaac8e200f..b20b02e0b727 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -362,6 +362,23 @@ __ca15_errata:
362#endif 362#endif
363 b __errata_finish 363 b __errata_finish
364 364
365__ca12_errata:
366#ifdef CONFIG_ARM_ERRATA_818325_852422
367 mrc p15, 0, r10, c15, c0, 1 @ read diagnostic register
368 orr r10, r10, #1 << 12 @ set bit #12
369 mcr p15, 0, r10, c15, c0, 1 @ write diagnostic register
370#endif
371 b __errata_finish
372
373__ca17_errata:
374#ifdef CONFIG_ARM_ERRATA_852423
375 cmp r6, #0x12 @ only present up to r1p2
376 mrcle p15, 0, r10, c15, c0, 1 @ read diagnostic register
377 orrle r10, r10, #1 << 12 @ set bit #12
378 mcrle p15, 0, r10, c15, c0, 1 @ write diagnostic register
379#endif
380 b __errata_finish
381
365__v7_pj4b_setup: 382__v7_pj4b_setup:
366#ifdef CONFIG_CPU_PJ4B 383#ifdef CONFIG_CPU_PJ4B
367 384
@@ -443,6 +460,16 @@ __v7_setup_cont:
443 teq r0, r10 460 teq r0, r10
444 beq __ca9_errata 461 beq __ca9_errata
445 462
463 /* Cortex-A12 Errata */
464 ldr r10, =0x00000c0d @ Cortex-A12 primary part number
465 teq r0, r10
466 beq __ca12_errata
467
468 /* Cortex-A17 Errata */
469 ldr r10, =0x00000c0e @ Cortex-A17 primary part number
470 teq r0, r10
471 beq __ca17_errata
472
446 /* Cortex-A15 Errata */ 473 /* Cortex-A15 Errata */
447 ldr r10, =0x00000c0f @ Cortex-A15 primary part number 474 ldr r10, =0x00000c0f @ Cortex-A15 primary part number
448 teq r0, r10 475 teq r0, r10