diff options
author | John Tsichritzis <john.tsichritzis@arm.com> | 2019-06-07 15:20:45 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2019-06-07 15:20:45 +0000 |
commit | 5441ed2463ef21bb26bbbc1a48b3866039eeb85e (patch) | |
tree | 6b9278fe7765c34a870c2d7f5b1fd89deea643f3 /lib/cpus/aarch64/neoverse_n1.S | |
parent | 74eaf2666df8cf33bf74f7c08b3d96ad2166c1d5 (diff) | |
parent | 5f5d0763875218893d3831a685886c17d20be940 (diff) |
Merge "Neoverse N1: Introduce workaround for Neoverse N1 erratum 1315703" into integration
Diffstat (limited to 'lib/cpus/aarch64/neoverse_n1.S')
-rw-r--r-- | lib/cpus/aarch64/neoverse_n1.S | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/lib/cpus/aarch64/neoverse_n1.S b/lib/cpus/aarch64/neoverse_n1.S index dadaf98b4..d685b7e9b 100644 --- a/lib/cpus/aarch64/neoverse_n1.S +++ b/lib/cpus/aarch64/neoverse_n1.S @@ -21,7 +21,7 @@ #endif /* -------------------------------------------------- - * Errata Workaround for Neoverse N1 Errata + * Errata Workaround for Neoverse N1 Erratum 1043202. * This applies to revision r0p0 and r1p0 of Neoverse N1. * Inputs: * x0: variant[4:7] and revision[0:3] of current cpu. @@ -75,6 +75,35 @@ func neoverse_n1_disable_speculative_loads ret endfunc neoverse_n1_disable_speculative_loads +/* -------------------------------------------------- + * Errata Workaround for Neoverse N1 Erratum 1315703. + * This applies to revision <= r3p0 of Neoverse N1. + * Inputs: + * x0: variant[4:7] and revision[0:3] of current cpu. + * Shall clobber: x0-x17 + * -------------------------------------------------- + */ +func errata_n1_1315703_wa + /* Compare x0 against revision r3p1 */ + mov x17, x30 + bl check_errata_1315703 + cbz x0, 1f + + mrs x0, NEOVERSE_N1_CPUACTLR2_EL1 + orr x0, x0, #NEOVERSE_N1_CPUACTLR2_EL1_BIT_16 + msr NEOVERSE_N1_CPUACTLR2_EL1, x0 + isb + +1: + ret x17 +endfunc errata_n1_1315703_wa + +func check_errata_1315703 + /* Applies to everything <= r3p0. */ + mov x1, #0x30 + b cpu_rev_var_ls +endfunc check_errata_1315703 + func neoverse_n1_reset_func mov x19, x30 @@ -94,6 +123,11 @@ func neoverse_n1_reset_func bl errata_n1_1043202_wa #endif +#if ERRATA_N1_1315703 + mov x0, x18 + bl errata_n1_1315703_wa +#endif + #if ENABLE_AMU /* Make sure accesses from EL0/EL1 and EL2 are not trapped to EL3 */ mrs x0, actlr_el3 @@ -146,6 +180,7 @@ func neoverse_n1_errata_report * checking functions of each errata. */ report_errata ERRATA_N1_1043202, neoverse_n1, 1043202 + report_errata ERRATA_N1_1315703, neoverse_n1, 1315703 ldp x8, x30, [sp], #16 ret |