mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
fix(cpus): workaround for Neoverse-N2 erratum 2388450
Neoverse-N2 erratum 2388450 is a cat B erratum that applies to revision r0p0 and is fixed in r0p1. The workaround is to set bit[40] of CPUACTLR2_EL1 to disable folding of demand requests into older prefetches with L2 miss requests outstanding. SDEN can be found here: https://developer.arm.com/documentation/SDEN1982442/latest Change-Id: I6dd949c79cea8dbad322e569aa5de86cf8cf9639 Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
This commit is contained in:
parent
e45ffa18d3
commit
884d515625
4 changed files with 49 additions and 0 deletions
|
@ -498,6 +498,10 @@ For Neoverse N2, the following errata build flags are defined :
|
|||
- ``ERRATA_N2_2280757``: This applies errata 2280757 workaround to Neoverse-N2
|
||||
CPU. This needs to be enabled for revision r0p0 of the CPU and is still open.
|
||||
|
||||
- ``ERRATA_N2_2388450``: This applies errata 2388450 workaround to Neoverse-N2
|
||||
CPU. This needs to be enabled for revision r0p0 of the CPU, it is fixed in
|
||||
r0p1.
|
||||
|
||||
For Cortex-X2, the following errata build flags are defined :
|
||||
|
||||
- ``ERRATA_X2_2002765``: This applies errata 2002765 workaround to Cortex-X2
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
******************************************************************************/
|
||||
#define NEOVERSE_N2_CPUACTLR2_EL1 S3_0_C15_C1_1
|
||||
#define NEOVERSE_N2_CPUACTLR2_EL1_BIT_2 (ULL(1) << 2)
|
||||
#define NEOVERSE_N2_CPUACTLR2_EL1_BIT_40 (ULL(1) << 40)
|
||||
|
||||
/*******************************************************************************
|
||||
* CPU Auxiliary Control register 5 specific definitions.
|
||||
|
|
|
@ -338,6 +338,36 @@ func check_errata_2280757
|
|||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2280757
|
||||
|
||||
/* --------------------------------------------------
|
||||
* Errata Workaround for Neoverse N2 Erratum 2388450.
|
||||
* This applies to revision r0p0 of Neoverse N2,
|
||||
* fixed in r0p1.
|
||||
* Inputs:
|
||||
* x0: variant[4:7] and revision[0:3] of current cpu.
|
||||
* Shall clobber: x0-x1, x17
|
||||
* --------------------------------------------------
|
||||
*/
|
||||
func errata_n2_2388450_wa
|
||||
/* Check revision. */
|
||||
mov x17, x30
|
||||
bl check_errata_2388450
|
||||
cbz x0, 1f
|
||||
|
||||
/*Set bit 40 in ACTLR2_EL1 */
|
||||
mrs x1, NEOVERSE_N2_CPUACTLR2_EL1
|
||||
orr x1, x1, #NEOVERSE_N2_CPUACTLR2_EL1_BIT_40
|
||||
msr NEOVERSE_N2_CPUACTLR2_EL1, x1
|
||||
isb
|
||||
1:
|
||||
ret x17
|
||||
endfunc errata_n2_2388450_wa
|
||||
|
||||
func check_errata_2388450
|
||||
/* Applies to r0p0, fixed in r0p1 */
|
||||
mov x1, #0x00
|
||||
b cpu_rev_var_ls
|
||||
endfunc check_errata_2388450
|
||||
|
||||
func check_errata_cve_2022_23960
|
||||
#if WORKAROUND_CVE_2022_23960
|
||||
mov x0, #ERRATA_APPLIES
|
||||
|
@ -417,6 +447,11 @@ func neoverse_n2_reset_func
|
|||
bl errata_n2_2280757_wa
|
||||
#endif
|
||||
|
||||
#if ERRATA_N2_2388450
|
||||
mov x0, x18
|
||||
bl errata_n2_2388450_wa
|
||||
#endif
|
||||
|
||||
#if ENABLE_AMU
|
||||
/* Make sure accesses from EL0/EL1 and EL2 are not trapped to EL3 */
|
||||
mrs x0, cptr_el3
|
||||
|
@ -496,6 +531,7 @@ func neoverse_n2_errata_report
|
|||
report_errata ERRATA_N2_2138958, neoverse_n2, 2138958
|
||||
report_errata ERRATA_N2_2242400, neoverse_n2, 2242400
|
||||
report_errata ERRATA_N2_2280757, neoverse_n2, 2280757
|
||||
report_errata ERRATA_N2_2388450, neoverse_n2, 2388450
|
||||
report_errata WORKAROUND_CVE_2022_23960, neoverse_n2, cve_2022_23960
|
||||
report_errata ERRATA_DSU_2313941, neoverse_n2, dsu_2313941
|
||||
|
||||
|
|
|
@ -556,6 +556,10 @@ ERRATA_N2_2242400 ?=0
|
|||
# to revision r0p0 of the Neoverse N2 cpu and is still open.
|
||||
ERRATA_N2_2280757 ?=0
|
||||
|
||||
# Flag to apply erratum 2388450 workaround during reset. This erratum applies
|
||||
# to revision r0p0 of the Neoverse N2 cpu, it is fixed in r0p1.
|
||||
ERRATA_N2_2388450 ?=0
|
||||
|
||||
# Flag to apply erratum 2002765 workaround during reset. This erratum applies
|
||||
# to revisions r0p0, r1p0, and r2p0 of the Cortex-X2 cpu and is still open.
|
||||
ERRATA_X2_2002765 ?=0
|
||||
|
@ -1103,6 +1107,10 @@ $(eval $(call add_define,ERRATA_N2_2242400))
|
|||
$(eval $(call assert_boolean,ERRATA_N2_2280757))
|
||||
$(eval $(call add_define,ERRATA_N2_2280757))
|
||||
|
||||
# Process ERRATA_N2_2388450 flag
|
||||
$(eval $(call assert_boolean,ERRATA_N2_2388450))
|
||||
$(eval $(call add_define,ERRATA_N2_2388450))
|
||||
|
||||
# Process ERRATA_X2_2002765 flag
|
||||
$(eval $(call assert_boolean,ERRATA_X2_2002765))
|
||||
$(eval $(call add_define,ERRATA_X2_2002765))
|
||||
|
|
Loading…
Add table
Reference in a new issue