mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
refactor(cpus): reorder Neoverse N2 errata by ascending order
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: Icf4c12f8404d2e7791bd9c008fe261314b047e14
This commit is contained in:
parent
12900c4ab6
commit
a438f434de
1 changed files with 104 additions and 105 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2022, Arm Limited. All rights reserved.
|
||||
* Copyright (c) 2020-2023, Arm Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -66,32 +66,6 @@ func check_errata_2002655
|
|||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2002655
|
||||
|
||||
/* ---------------------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2067956.
|
||||
* This applies to revision r0p0 of Neoverse N2 and is still open.
|
||||
* Inputs:
|
||||
* x0: variant[4:7] and revision[0:3] of current cpu.
|
||||
* Shall clobber: x0-x17
|
||||
* ---------------------------------------------------------------
|
||||
*/
|
||||
func errata_n2_2067956_wa
|
||||
/* Compare x0 against revision r0p0 */
|
||||
mov x17, x30
|
||||
bl check_errata_2067956
|
||||
cbz x0, 1f
|
||||
mrs x1, NEOVERSE_N2_CPUACTLR_EL1
|
||||
orr x1, x1, NEOVERSE_N2_CPUACTLR_EL1_BIT_46
|
||||
msr NEOVERSE_N2_CPUACTLR_EL1, x1
|
||||
1:
|
||||
ret x17
|
||||
endfunc errata_n2_2067956_wa
|
||||
|
||||
func check_errata_2067956
|
||||
/* Applies to r0p0 */
|
||||
mov x1, #0x00
|
||||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2067956
|
||||
|
||||
/* ---------------------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2025414.
|
||||
* This applies to revision r0p0 of Neoverse N2 and is still open.
|
||||
|
@ -120,31 +94,59 @@ func check_errata_2025414
|
|||
endfunc check_errata_2025414
|
||||
|
||||
/* ---------------------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2189731.
|
||||
* Errata Workaround for Neoverse N2 Erratum 2067956.
|
||||
* This applies to revision r0p0 of Neoverse N2 and is still open.
|
||||
* Inputs:
|
||||
* x0: variant[4:7] and revision[0:3] of current cpu.
|
||||
* Shall clobber: x0-x17
|
||||
* ---------------------------------------------------------------
|
||||
*/
|
||||
func errata_n2_2189731_wa
|
||||
func errata_n2_2067956_wa
|
||||
/* Compare x0 against revision r0p0 */
|
||||
mov x17, x30
|
||||
bl check_errata_2189731
|
||||
bl check_errata_2067956
|
||||
cbz x0, 1f
|
||||
mrs x1, NEOVERSE_N2_CPUACTLR5_EL1
|
||||
orr x1, x1, NEOVERSE_N2_CPUACTLR5_EL1_BIT_44
|
||||
msr NEOVERSE_N2_CPUACTLR5_EL1, x1
|
||||
|
||||
mrs x1, NEOVERSE_N2_CPUACTLR_EL1
|
||||
orr x1, x1, NEOVERSE_N2_CPUACTLR_EL1_BIT_46
|
||||
msr NEOVERSE_N2_CPUACTLR_EL1, x1
|
||||
1:
|
||||
ret x17
|
||||
endfunc errata_n2_2189731_wa
|
||||
endfunc errata_n2_2067956_wa
|
||||
|
||||
func check_errata_2189731
|
||||
func check_errata_2067956
|
||||
/* Applies to r0p0 */
|
||||
mov x1, #0x00
|
||||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2189731
|
||||
endfunc check_errata_2067956
|
||||
|
||||
/* --------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2138953.
|
||||
* This applies to revision r0p0 of Neoverse N2. it is still open.
|
||||
* Inputs:
|
||||
* x0: variant[4:7] and revision[0:3] of current cpu.
|
||||
* Shall clobber: x0-x1, x17
|
||||
* --------------------------------------------------
|
||||
*/
|
||||
func errata_n2_2138953_wa
|
||||
/* Check revision. */
|
||||
mov x17, x30
|
||||
bl check_errata_2138953
|
||||
cbz x0, 1f
|
||||
|
||||
/* Apply instruction patching sequence */
|
||||
mrs x1, NEOVERSE_N2_CPUECTLR2_EL1
|
||||
mov x0, #NEOVERSE_N2_CPUECTLR2_EL1_PF_MODE_CNSRV
|
||||
bfi x1, x0, #CPUECTLR2_EL1_PF_MODE_LSB, #CPUECTLR2_EL1_PF_MODE_WIDTH
|
||||
msr NEOVERSE_N2_CPUECTLR2_EL1, x1
|
||||
1:
|
||||
ret x17
|
||||
endfunc errata_n2_2138953_wa
|
||||
|
||||
func check_errata_2138953
|
||||
/* Applies to r0p0 */
|
||||
mov x1, #0x00
|
||||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2138953
|
||||
|
||||
/* --------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2138956.
|
||||
|
@ -188,63 +190,6 @@ func check_errata_2138956
|
|||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2138956
|
||||
|
||||
/* --------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2242415.
|
||||
* This applies to revision r0p0 of Neoverse N2. it is still open.
|
||||
* Inputs:
|
||||
* x0: variant[4:7] and revision[0:3] of current cpu.
|
||||
* Shall clobber: x0-x1, x17
|
||||
* --------------------------------------------------
|
||||
*/
|
||||
func errata_n2_2242415_wa
|
||||
/* Check revision. */
|
||||
mov x17, x30
|
||||
bl check_errata_2242415
|
||||
cbz x0, 1f
|
||||
|
||||
/* Apply instruction patching sequence */
|
||||
mrs x1, NEOVERSE_N2_CPUACTLR_EL1
|
||||
orr x1, x1, NEOVERSE_N2_CPUACTLR_EL1_BIT_22
|
||||
msr NEOVERSE_N2_CPUACTLR_EL1, x1
|
||||
1:
|
||||
ret x17
|
||||
endfunc errata_n2_2242415_wa
|
||||
|
||||
func check_errata_2242415
|
||||
/* Applies to r0p0 */
|
||||
mov x1, #0x00
|
||||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2242415
|
||||
|
||||
/* --------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2138953.
|
||||
* This applies to revision r0p0 of Neoverse N2. it is still open.
|
||||
* Inputs:
|
||||
* x0: variant[4:7] and revision[0:3] of current cpu.
|
||||
* Shall clobber: x0-x1, x17
|
||||
* --------------------------------------------------
|
||||
*/
|
||||
func errata_n2_2138953_wa
|
||||
/* Check revision. */
|
||||
mov x17, x30
|
||||
bl check_errata_2138953
|
||||
cbz x0, 1f
|
||||
|
||||
/* Apply instruction patching sequence */
|
||||
mrs x1, NEOVERSE_N2_CPUECTLR2_EL1
|
||||
mov x0, #NEOVERSE_N2_CPUECTLR2_EL1_PF_MODE_CNSRV
|
||||
bfi x1, x0, #CPUECTLR2_EL1_PF_MODE_LSB, #CPUECTLR2_EL1_PF_MODE_WIDTH
|
||||
msr NEOVERSE_N2_CPUECTLR2_EL1, x1
|
||||
1:
|
||||
ret x17
|
||||
endfunc errata_n2_2138953_wa
|
||||
|
||||
func check_errata_2138953
|
||||
/* Applies to r0p0 */
|
||||
mov x1, #0x00
|
||||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2138953
|
||||
|
||||
/* --------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2138958.
|
||||
* This applies to revision r0p0 of Neoverse N2. it is still open.
|
||||
|
@ -273,6 +218,33 @@ func check_errata_2138958
|
|||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2138958
|
||||
|
||||
/* ---------------------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2189731.
|
||||
* This applies to revision r0p0 of Neoverse N2 and is still open.
|
||||
* Inputs:
|
||||
* x0: variant[4:7] and revision[0:3] of current cpu.
|
||||
* Shall clobber: x0-x17
|
||||
* ---------------------------------------------------------------
|
||||
*/
|
||||
func errata_n2_2189731_wa
|
||||
/* Compare x0 against revision r0p0 */
|
||||
mov x17, x30
|
||||
bl check_errata_2189731
|
||||
cbz x0, 1f
|
||||
mrs x1, NEOVERSE_N2_CPUACTLR5_EL1
|
||||
orr x1, x1, NEOVERSE_N2_CPUACTLR5_EL1_BIT_44
|
||||
msr NEOVERSE_N2_CPUACTLR5_EL1, x1
|
||||
|
||||
1:
|
||||
ret x17
|
||||
endfunc errata_n2_2189731_wa
|
||||
|
||||
func check_errata_2189731
|
||||
/* Applies to r0p0 */
|
||||
mov x1, #0x00
|
||||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2189731
|
||||
|
||||
/* --------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2242400.
|
||||
* This applies to revision r0p0 of Neoverse N2. it is still open.
|
||||
|
@ -310,6 +282,34 @@ func check_errata_2242400
|
|||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2242400
|
||||
|
||||
/* --------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2242415.
|
||||
* This applies to revision r0p0 of Neoverse N2. it is still open.
|
||||
* Inputs:
|
||||
* x0: variant[4:7] and revision[0:3] of current cpu.
|
||||
* Shall clobber: x0-x1, x17
|
||||
* --------------------------------------------------
|
||||
*/
|
||||
func errata_n2_2242415_wa
|
||||
/* Check revision. */
|
||||
mov x17, x30
|
||||
bl check_errata_2242415
|
||||
cbz x0, 1f
|
||||
|
||||
/* Apply instruction patching sequence */
|
||||
mrs x1, NEOVERSE_N2_CPUACTLR_EL1
|
||||
orr x1, x1, NEOVERSE_N2_CPUACTLR_EL1_BIT_22
|
||||
msr NEOVERSE_N2_CPUACTLR_EL1, x1
|
||||
1:
|
||||
ret x17
|
||||
endfunc errata_n2_2242415_wa
|
||||
|
||||
func check_errata_2242415
|
||||
/* Applies to r0p0 */
|
||||
mov x1, #0x00
|
||||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2242415
|
||||
|
||||
/* --------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2280757.
|
||||
* This applies to revision r0p0 of Neoverse N2. it is still open.
|
||||
|
@ -504,7 +504,6 @@ func neoverse_n2_reset_func
|
|||
bl errata_n2_2189731_wa
|
||||
#endif
|
||||
|
||||
|
||||
#if ERRATA_N2_2138956
|
||||
mov x0, x18
|
||||
bl errata_n2_2138956_wa
|
||||
|
@ -625,21 +624,21 @@ func neoverse_n2_errata_report
|
|||
* checking functions of each errata.
|
||||
*/
|
||||
report_errata ERRATA_N2_2002655, neoverse_n2, 2002655
|
||||
report_errata ERRATA_N2_2002655, neoverse_n2, 2025414
|
||||
report_errata ERRATA_N2_2067956, neoverse_n2, 2067956
|
||||
report_errata ERRATA_N2_2025414, neoverse_n2, 2025414
|
||||
report_errata ERRATA_N2_2189731, neoverse_n2, 2189731
|
||||
report_errata ERRATA_N2_2138956, neoverse_n2, 2138956
|
||||
report_errata ERRATA_N2_2138953, neoverse_n2, 2138953
|
||||
report_errata ERRATA_N2_2242415, neoverse_n2, 2242415
|
||||
report_errata ERRATA_N2_2138956, neoverse_n2, 2138956
|
||||
report_errata ERRATA_N2_2138958, neoverse_n2, 2138958
|
||||
report_errata ERRATA_N2_2189731, neoverse_n2, 2189731
|
||||
report_errata ERRATA_N2_2242400, neoverse_n2, 2242400
|
||||
report_errata ERRATA_N2_2242415, neoverse_n2, 2242415
|
||||
report_errata ERRATA_N2_2280757, neoverse_n2, 2280757
|
||||
report_errata ERRATA_N2_2326639, neoverse_n2, 2326639
|
||||
report_errata ERRATA_N2_2376738, neoverse_n2, 2376738
|
||||
report_errata ERRATA_N2_2388450, neoverse_n2, 2388450
|
||||
report_errata ERRATA_N2_2743089, neoverse_n2, 2743089
|
||||
report_errata WORKAROUND_CVE_2022_23960, neoverse_n2, cve_2022_23960
|
||||
report_errata ERRATA_DSU_2313941, neoverse_n2, dsu_2313941
|
||||
report_errata WORKAROUND_CVE_2022_23960, neoverse_n2, cve_2022_23960
|
||||
|
||||
ldp x8, x30, [sp], #16
|
||||
ret
|
||||
|
|
Loading…
Add table
Reference in a new issue