fix(errata): check for SCU before accessing DSU

The DSU contains system control registers in the SCU and L3 logic to
control the functionality of the cluster. If "DIRECT CONNECT" L3 memory
system variant is used, there won't be any L3 cache, snoop filter, and
SCU logic present hence no system control register will be present.
Hence check SCU presence before accessing DSU register for DSU_2313941
errata.

(commit message taken from commit
942013e1dd by Pramod Kumar
<pramod.kumar@broadcom.com> just errata number changed)

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Change-Id: I38cee6085d6e49ba23de95b3de08bc98798ab2b3
This commit is contained in:
Marcin Juszkiewicz 2023-11-14 10:38:49 +01:00
parent e7781c84e9
commit 5b5562b2e5

View file

@ -151,13 +151,22 @@ endfunc errata_dsu_936184_wa
* This function is called from both assembly and C environment. So it
* follows AAPCS.
*
* Clobbers: x0-x3
* Clobbers: x0-x4
* -----------------------------------------------------------------------
*/
.globl check_errata_dsu_2313941
.globl errata_dsu_2313941_wa
func check_errata_dsu_2313941
mov x4, x30
bl is_scu_present_in_dsu
cmp x0, xzr
/* Default error status */
mov x0, #ERRATA_NOT_APPLIES
/* If SCU is not present, return without applying patch */
b.eq 1f
mov x2, #ERRATA_APPLIES
mov x3, #ERRATA_NOT_APPLIES
@ -170,7 +179,8 @@ func check_errata_dsu_2313941
mov x1, #(0x31 << CLUSTERIDR_REV_SHIFT)
cmp x0, x1
csel x0, x2, x3, LS
ret
1:
ret x4
endfunc check_errata_dsu_2313941
/* --------------------------------------------------