11/ *
2- * Copyright (c) 2021 - 2022 , Arm Limited. All rights reserved.
2+ * Copyright (c) 2021 - 2023 , Arm Limited. All rights reserved.
33 *
44 * SPDX - License - Identifier: BSD - 3 - Clause
55 * /
@@ -117,13 +117,13 @@ func check_errata_2132064
117117 b cpu_rev_var_range
118118endfunc check_errata_2132064
119119
120- / * --------------------------------------------------------------------
120+ / * ----------------------------------------------------------
121121 * Errata Workaround for A78C Erratum 2242638 .
122122 * This applies to revisions r0p1 and r0p2 of the Cortex A78C
123123 * processor and is still open.
124124 * x0: variant [ 4 : 7 ] and revision [ 0 : 3 ] of current cpu .
125125 * Shall clobber: x0 - x17
126- * --------------------------------------------------------------------
126+ * ----------------------------------------------------------
127127 * /
128128func errata_a78c_2242638_wa
129129 / * Compare x0 against revisions r0p1 - r0p2 * /
@@ -152,6 +152,31 @@ func check_errata_2242638
152152 b cpu_rev_var_range
153153endfunc check_errata_2242638
154154
155+ / * ----------------------------------------------------------------
156+ * Errata Workaround for A78C Erratum 2772121 .
157+ * This applies to revisions r0p0 , r0p1 and r0p2 of the Cortex A78C
158+ * processor and is still open.
159+ * x0: variant [ 4 : 7 ] and revision [ 0 : 3 ] of current cpu .
160+ * Shall clobber: x0 - x17
161+ * ----------------------------------------------------------------
162+ * /
163+ func errata_a78c_2772121_wa
164+ mov x17 , x30
165+ bl check_errata_2772121
166+ cbz x0 , 1f
167+
168+ / * dsb before isb of power down sequence * /
169+ dsb sy
170+ 1 :
171+ ret x17
172+ endfunc errata_a78c_2772121_wa
173+
174+ func check_errata_2772121
175+ / * Applies to all revisions <= r0p2 * /
176+ mov x1 , # 0x02
177+ b cpu_rev_var_ls
178+ endfunc check_errata_2772121
179+
155180func check_errata_cve_2022_23960
156181#if WORKAROUND_CVE_2022_23960
157182 mov x0 , #ERRATA_APPLIES
@@ -215,6 +240,12 @@ func cortex_a78c_core_pwr_dwn
215240 mrs x0 , CORTEX_A78C_CPUPWRCTLR_EL1
216241 orr x0 , x0 , #CORTEX_A78C_CPUPWRCTLR_EL1_CORE_PWRDN_EN_BIT
217242 msr CORTEX_A78C_CPUPWRCTLR_EL1 , x0
243+ #if ERRATA_A78C_2772121
244+ mov x15 , x30
245+ bl cpu_get_rev_var
246+ bl errata_a78c_2772121_wa
247+ mov x30 , x15
248+ #endif / * ERRATA_A78C_2772121 * /
218249 isb
219250 ret
220251endfunc cortex_a78c_core_pwr_dwn
@@ -237,6 +268,7 @@ func cortex_a78c_errata_report
237268 report_errata ERRATA_A78C_2242638 , cortex_a78c , 2242638
238269 report_errata ERRATA_A78C_2376749 , cortex_a78c , 2376749
239270 report_errata ERRATA_A78C_2395411 , cortex_a78c , 2395411
271+ report_errata ERRATA_A78C_2772121 , cortex_a78c , 2772121
240272 report_errata WORKAROUND_CVE_2022_23960 , cortex_a78c , cve_2022_23960
241273
242274 ldp x8 , x30 , [ sp ], # 16
0 commit comments