Commit 7436d5d3 authored by John Tsichritzis's avatar John Tsichritzis
Browse files

DSU erratum 936184 workaround: bug fix



The initial implementation was corrupting registers that it shouldn't.
Now this is fixed.

Change-Id: Iaa407c18e668b2d9381391bf10d6876fe936aded
Signed-off-by: default avatarJohn Tsichritzis <john.tsichritzis@arm.com>
parent 6d4f6aea
...@@ -8,15 +8,19 @@ ...@@ -8,15 +8,19 @@
#include <dsu_def.h> #include <dsu_def.h>
#include <errata_report.h> #include <errata_report.h>
/* /* -----------------------------------------------------------------------
* DSU erratum 936184 * DSU erratum 936184 check function
* Check the DSU variant, revision and configuration to determine if the * Checks the DSU variant, revision and configuration to determine if
* erratum applies. This erratum was fixed in r2p0. * the erratum applies. Erratum applies if ACP interface is present
* in the DSU and revision-variant < r2p0.
*
* The erratum was fixed in r2p0.
* *
* This function is called from both assembly and C environment. So it * This function is called from both assembly and C environment. So it
* follows AAPCS. * follows AAPCS.
* *
* Clobbers: x0-x3 * Clobbers: x0-x3
* -----------------------------------------------------------------------
*/ */
.globl check_errata_dsu_936184 .globl check_errata_dsu_936184
.globl errata_dsu_936184_wa .globl errata_dsu_936184_wa
...@@ -25,7 +29,7 @@ func check_errata_dsu_936184 ...@@ -25,7 +29,7 @@ func check_errata_dsu_936184
mov x2, #ERRATA_NOT_APPLIES mov x2, #ERRATA_NOT_APPLIES
mov x3, #ERRATA_APPLIES mov x3, #ERRATA_APPLIES
/* Erratum applies only if ACP interface is present in DSU */ /* Erratum applies only if DSU has the ACP interface */
mov x0, x2 mov x0, x2
mrs x1, CLUSTERCFR_EL1 mrs x1, CLUSTERCFR_EL1
ubfx x1, x1, #CLUSTERCFR_ACP_SHIFT, #1 ubfx x1, x1, #CLUSTERCFR_ACP_SHIFT, #1
...@@ -44,8 +48,14 @@ func check_errata_dsu_936184 ...@@ -44,8 +48,14 @@ func check_errata_dsu_936184
ret ret
endfunc check_errata_dsu_936184 endfunc check_errata_dsu_936184
/* --------------------------------------------------
* Errata Workaround for DSU erratum #936184.
*
* Can clobber only: x0-x17
* --------------------------------------------------
*/
func errata_dsu_936184_wa func errata_dsu_936184_wa
mov x20, x30 mov x17, x30
bl check_errata_dsu_936184 bl check_errata_dsu_936184
cbz x0, 1f cbz x0, 1f
...@@ -56,5 +66,5 @@ func errata_dsu_936184_wa ...@@ -56,5 +66,5 @@ func errata_dsu_936184_wa
msr CLUSTERACTLR_EL1, x0 msr CLUSTERACTLR_EL1, x0
isb isb
1: 1:
ret x20 ret x17
endfunc errata_dsu_936184_wa endfunc errata_dsu_936184_wa
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment