mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-21 20:14:29 +00:00
fix(errata): workaround for Cortex-X2 errata 2017096
Cortex-X2 erratum 2017096 is a Cat B erratum that applies to revisions r0p0, r1p0 & r2p0. The workaround is to set CPUECLTR_EL1[8] to 1 which disables store issue prefetching. SDEN can be found here: https://developer.arm.com/documentation/SDEN1775100 Signed-off-by: Bipin Ravi <bipin.ravi@arm.com> Change-Id: I3b740aedc95c2394f6b8d1186014d2b2f640ae05
This commit is contained in:
parent
0586c41b3f
commit
e7ca4433fa
4 changed files with 54 additions and 6 deletions
|
@ -454,6 +454,10 @@ For Cortex-X2, the following errata build flags are defined :
|
||||||
- ``ERRATA_X2_2083908``: This applies errata 2083908 workaround to Cortex-X2
|
- ``ERRATA_X2_2083908``: This applies errata 2083908 workaround to Cortex-X2
|
||||||
CPU. This needs to be enabled for revision r2p0 of the CPU, it is still open.
|
CPU. This needs to be enabled for revision r2p0 of the CPU, it is still open.
|
||||||
|
|
||||||
|
- ``ERRATA_X2_2017096``: This applies errata 2017096 workaround to
|
||||||
|
Cortex-X2 CPU. This needs to be enabled only for revisions r0p0, r1p0 and
|
||||||
|
r2p0 of the CPU, it is fixed in r2p1.
|
||||||
|
|
||||||
DSU Errata Workarounds
|
DSU Errata Workarounds
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Arm Limited. All rights reserved.
|
* Copyright (c) 2021-2022, Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
* CPU Extended Control register specific definitions
|
* CPU Extended Control register specific definitions
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#define CORTEX_X2_CPUECTLR_EL1 S3_0_C15_C1_4
|
#define CORTEX_X2_CPUECTLR_EL1 S3_0_C15_C1_4
|
||||||
|
#define CORTEX_X2_CPUECTLR_EL1_PFSTIDIS_BIT (ULL(1) << 8)
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* CPU Extended Control register 2 specific definitions
|
* CPU Extended Control register 2 specific definitions
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Arm Limited. All rights reserved.
|
* Copyright (c) 2021-2022, Arm Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -113,6 +113,34 @@ func check_errata_2083908
|
||||||
b cpu_rev_var_range
|
b cpu_rev_var_range
|
||||||
endfunc check_errata_2083908
|
endfunc check_errata_2083908
|
||||||
|
|
||||||
|
/* --------------------------------------------------
|
||||||
|
* Errata Workaround for Cortex-X2 Errata 2017096.
|
||||||
|
* This applies only to revisions r0p0, r1p0 and r2p0
|
||||||
|
* and is fixed in r2p1.
|
||||||
|
* Inputs:
|
||||||
|
* x0: variant[4:7] and revision[0:3] of current cpu.
|
||||||
|
* Shall clobber: x0, x1, x17
|
||||||
|
* --------------------------------------------------
|
||||||
|
*/
|
||||||
|
func errata_x2_2017096_wa
|
||||||
|
/* Compare x0 against revision r0p0 to r2p0 */
|
||||||
|
mov x17, x30
|
||||||
|
bl check_errata_2017096
|
||||||
|
cbz x0, 1f
|
||||||
|
mrs x1, CORTEX_X2_CPUECTLR_EL1
|
||||||
|
orr x1, x1, CORTEX_X2_CPUECTLR_EL1_PFSTIDIS_BIT
|
||||||
|
msr CORTEX_X2_CPUECTLR_EL1, x1
|
||||||
|
|
||||||
|
1:
|
||||||
|
ret x17
|
||||||
|
endfunc errata_x2_2017096_wa
|
||||||
|
|
||||||
|
func check_errata_2017096
|
||||||
|
/* Applies to r0p0, r1p0, r2p0 */
|
||||||
|
mov x1, #0x20
|
||||||
|
b cpu_rev_var_ls
|
||||||
|
endfunc check_errata_2017096
|
||||||
|
|
||||||
/* ----------------------------------------------------
|
/* ----------------------------------------------------
|
||||||
* HW will do the cache maintenance while powering down
|
* HW will do the cache maintenance while powering down
|
||||||
* ----------------------------------------------------
|
* ----------------------------------------------------
|
||||||
|
@ -146,6 +174,7 @@ func cortex_x2_errata_report
|
||||||
report_errata ERRATA_X2_2002765, cortex_x2, 2002765
|
report_errata ERRATA_X2_2002765, cortex_x2, 2002765
|
||||||
report_errata ERRATA_X2_2058056, cortex_x2, 2058056
|
report_errata ERRATA_X2_2058056, cortex_x2, 2058056
|
||||||
report_errata ERRATA_X2_2083908, cortex_x2, 2083908
|
report_errata ERRATA_X2_2083908, cortex_x2, 2083908
|
||||||
|
report_errata ERRATA_X2_2017096, cortex_x2, 2017096
|
||||||
|
|
||||||
ldp x8, x30, [sp], #16
|
ldp x8, x30, [sp], #16
|
||||||
ret
|
ret
|
||||||
|
@ -178,6 +207,11 @@ func cortex_x2_reset_func
|
||||||
bl errata_cortex_x2_2083908_wa
|
bl errata_cortex_x2_2083908_wa
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ERRATA_X2_2017096
|
||||||
|
mov x0, x18
|
||||||
|
bl errata_x2_2017096_wa
|
||||||
|
#endif
|
||||||
|
|
||||||
ret x19
|
ret x19
|
||||||
endfunc cortex_x2_reset_func
|
endfunc cortex_x2_reset_func
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021, ARM Limited and Contributors. All rights reserved.
|
# Copyright (c) 2014-2022, ARM Limited and Contributors. All rights reserved.
|
||||||
# Copyright (c) 2020-2021, NVIDIA Corporation. All rights reserved.
|
# Copyright (c) 2020-2021, NVIDIA Corporation. All rights reserved.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
@ -507,6 +507,11 @@ ERRATA_X2_2058056 ?=0
|
||||||
# to revision r2p0 of the Cortex-X2 cpu and is still open.
|
# to revision r2p0 of the Cortex-X2 cpu and is still open.
|
||||||
ERRATA_X2_2083908 ?=0
|
ERRATA_X2_2083908 ?=0
|
||||||
|
|
||||||
|
# Flag to apply erratum 2017096 workaround during reset. This erratum applies
|
||||||
|
# only to revisions r0p0, r1p0 and r2p0 of the Cortex-X2 cpu, it is fixed in
|
||||||
|
# r2p1.
|
||||||
|
ERRATA_X2_2017096 ?=0
|
||||||
|
|
||||||
# Flag to apply DSU erratum 798953. This erratum applies to DSUs revision r0p0.
|
# Flag to apply DSU erratum 798953. This erratum applies to DSUs revision r0p0.
|
||||||
# Applying the workaround results in higher DSU power consumption on idle.
|
# Applying the workaround results in higher DSU power consumption on idle.
|
||||||
ERRATA_DSU_798953 ?=0
|
ERRATA_DSU_798953 ?=0
|
||||||
|
@ -944,6 +949,10 @@ $(eval $(call add_define,ERRATA_X2_2058056))
|
||||||
$(eval $(call assert_boolean,ERRATA_X2_2083908))
|
$(eval $(call assert_boolean,ERRATA_X2_2083908))
|
||||||
$(eval $(call add_define,ERRATA_X2_2083908))
|
$(eval $(call add_define,ERRATA_X2_2083908))
|
||||||
|
|
||||||
|
# Process ERRATA_X2_2017096 flag
|
||||||
|
$(eval $(call assert_boolean,ERRATA_X2_2017096))
|
||||||
|
$(eval $(call add_define,ERRATA_X2_2017096))
|
||||||
|
|
||||||
# Process ERRATA_DSU_798953 flag
|
# Process ERRATA_DSU_798953 flag
|
||||||
$(eval $(call assert_boolean,ERRATA_DSU_798953))
|
$(eval $(call assert_boolean,ERRATA_DSU_798953))
|
||||||
$(eval $(call add_define,ERRATA_DSU_798953))
|
$(eval $(call add_define,ERRATA_DSU_798953))
|
||||||
|
|
Loading…
Add table
Reference in a new issue