aboutsummaryrefslogtreecommitdiff
path: root/lib/cpus
diff options
context:
space:
mode:
authorjohpow01 <john.powell@arm.com>2021-08-03 14:35:20 -0500
committerJohn <john.powell@arm.com>2021-08-10 17:23:01 +0200
commit100d4029a926a7d0df28072d9674787c09e37d85 (patch)
treea62ca829edaa2bcfe71a6df80b348d78ac500455 /lib/cpus
parent1a8804c3834966f8177eb9211bb24f546420ba9b (diff)
downloadarm-trusted-firmware-100d4029a926a7d0df28072d9674787c09e37d85.tar.gz
errata: workaround for Neoverse V1 errata 2139242
Neoverse V1 erratum 2139242 is a Cat B erratum present in the V1 processor core. This issue is present in revisions r0p0, r1p0, and r1p1, and it is still open. SDEN can be found here: https://documentation-service.arm.com/static/60d499080320e92fa40b4625 Signed-off-by: John Powell <john.powell@arm.com> Change-Id: I5c2e9beec72a64ac4131fb6dd76199821a934ebe
Diffstat (limited to 'lib/cpus')
-rw-r--r--lib/cpus/aarch64/neoverse_v1.S41
-rw-r--r--lib/cpus/cpu-ops.mk8
2 files changed, 49 insertions, 0 deletions
diff --git a/lib/cpus/aarch64/neoverse_v1.S b/lib/cpus/aarch64/neoverse_v1.S
index f20202739..0bcf52a78 100644
--- a/lib/cpus/aarch64/neoverse_v1.S
+++ b/lib/cpus/aarch64/neoverse_v1.S
@@ -224,6 +224,41 @@ func check_errata_1966096
b cpu_rev_var_range
endfunc check_errata_1966096
+ /* --------------------------------------------------
+ * Errata Workaround for Neoverse V1 Errata #2139242.
+ * This applies to revisions r0p0, r1p0, and r1p1, it
+ * is still open.
+ * x0: variant[4:7] and revision[0:3] of current cpu.
+ * Shall clobber: x0-x17
+ * --------------------------------------------------
+ */
+func errata_neoverse_v1_2139242_wa
+ /* Check workaround compatibility. */
+ mov x17, x30
+ bl check_errata_2139242
+ cbz x0, 1f
+
+ /* Apply the workaround. */
+ mov x0, #0x3
+ msr S3_6_C15_C8_0, x0
+ ldr x0, =0xEE720F14
+ msr S3_6_C15_C8_2, x0
+ ldr x0, =0xFFFF0FDF
+ msr S3_6_C15_C8_3, x0
+ ldr x0, =0x40000005003FF
+ msr S3_6_C15_C8_1, x0
+ isb
+
+1:
+ ret x17
+endfunc errata_neoverse_v1_2139242_wa
+
+func check_errata_2139242
+ /* Applies to r0p0, r1p0, r1p1 */
+ mov x1, #0x11
+ b cpu_rev_var_ls
+endfunc check_errata_2139242
+
/* ---------------------------------------------
* HW will do the cache maintenance while powering down
* ---------------------------------------------
@@ -260,6 +295,7 @@ func neoverse_v1_errata_report
report_errata ERRATA_V1_1925756, neoverse_v1, 1925756
report_errata ERRATA_V1_1940577, neoverse_v1, 1940577
report_errata ERRATA_V1_1966096, neoverse_v1, 1966096
+ report_errata ERRATA_V1_2139242, neoverse_v1, 2139242
ldp x8, x30, [sp], #16
ret
@@ -303,6 +339,11 @@ func neoverse_v1_reset_func
bl errata_neoverse_v1_1966096_wa
#endif
+#if ERRATA_V1_2139242
+ mov x0, x18
+ bl errata_neoverse_v1_2139242_wa
+#endif
+
ret x19
endfunc neoverse_v1_reset_func
diff --git a/lib/cpus/cpu-ops.mk b/lib/cpus/cpu-ops.mk
index 4677f914c..050a56e4f 100644
--- a/lib/cpus/cpu-ops.mk
+++ b/lib/cpus/cpu-ops.mk
@@ -397,6 +397,10 @@ ERRATA_V1_1940577 ?=0
# exists in r0p0 as well but there is no workaround for that revision.
ERRATA_V1_1966096 ?=0
+# Flag to apply erratum 2139242 workaround during reset. This erratum applies
+# to revisions r0p0, r1p0, and r1p1 of the Neoverse V1 cpu and is still open.
+ERRATA_V1_2139242 ?=0
+
# Flag to apply DSU erratum 798953. This erratum applies to DSUs revision r0p0.
# Applying the workaround results in higher DSU power consumption on idle.
ERRATA_DSU_798953 ?=0
@@ -726,6 +730,10 @@ $(eval $(call add_define,ERRATA_V1_1940577))
$(eval $(call assert_boolean,ERRATA_V1_1966096))
$(eval $(call add_define,ERRATA_V1_1966096))
+# Process ERRATA_V1_2139242 flag
+$(eval $(call assert_boolean,ERRATA_V1_2139242))
+$(eval $(call add_define,ERRATA_V1_2139242))
+
# Process ERRATA_DSU_798953 flag
$(eval $(call assert_boolean,ERRATA_DSU_798953))
$(eval $(call add_define,ERRATA_DSU_798953))