@ -1,5 +1,5 @@
/ *
* Copyright ( c ) 2021 - 2022 , Arm Limited. All rights reserved.
* Copyright ( c ) 2021 - 2023 , Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
* /
@ -117,13 +117,13 @@ func check_errata_2132064
b cpu_rev_var_range
endfunc check_errata_2132064
/ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Errata Workaround for A78C Erratum 2242638 .
* This applies to revisions r0p1 and r0p2 of the Cortex A78C
* processor and is still open.
* x0: variant [ 4 : 7 ] and revision [ 0 : 3 ] of current cpu.
* Shall clobber : x0-x17
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* /
func errata_a78c_2242638_wa
/ * Compare x0 against revisions r0p1 - r0p2 * /
@ -152,6 +152,31 @@ func check_errata_2242638
b cpu_rev_var_range
endfunc check_errata_2242638
/ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Errata Workaround for A78C Erratum 2772121 .
* This applies to revisions r0p0 , r0p1 and r0p2 of the Cortex A78C
* processor and is still open.
* x0: variant [ 4 : 7 ] and revision [ 0 : 3 ] of current cpu.
* Shall clobber : x0-x17
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* /
func errata_a78c_2772121_wa
mov x17 , x30
bl check_errata_2772121
cbz x0 , 1 f
/ * dsb before isb of power down sequence * /
dsb sy
1 :
ret x17
endfunc errata_a78c_2772121_wa
func check_errata_2772121
/ * Applies to all revisions < = r0p2 * /
mov x1 , # 0x02
b cpu_rev_var_ls
endfunc check_errata_2772121
func check_errata_cve_2022_23960
# if WORKAROUND_CVE_2022_23960
mov x0 , # ERRATA_APPLIES
@ -215,6 +240,12 @@ func cortex_a78c_core_pwr_dwn
mrs x0 , CORTEX_A78C_CPUPWRCTLR_EL1
orr x0 , x0 , # CORTEX_A78C_CPUPWRCTLR_EL1_CORE_PWRDN_EN_BIT
msr CORTEX_A78C_CPUPWRCTLR_EL1 , x0
# if ERRATA_A78C_2772121
mov x15 , x30
bl cpu_get_rev_var
bl errata_a78c_2772121_wa
mov x30 , x15
# endif / * ERRATA_A78C_2772121 * /
isb
ret
endfunc cortex_a78c_core_pwr_dwn
@ -237,6 +268,7 @@ func cortex_a78c_errata_report
rep ort_errata ERRATA_A78C_2242638 , cortex_a78c , 2242638
rep ort_errata ERRATA_A78C_2376749 , cortex_a78c , 2376749
rep ort_errata ERRATA_A78C_2395411 , cortex_a78c , 2395411
rep ort_errata ERRATA_A78C_2772121 , cortex_a78c , 2772121
rep ort_errata WORKAROUND_CVE_2022_23960 , cortex_a78c , cve_2022_23960
ldp x8 , x30 , [ sp ], # 16