Merge "fix(cpus): workaround for Cortex-X4 erratum 2740089" into integration

This commit is contained in:
Lauren Wehrmeister 2024-04-23 16:14:02 +02:00 committed by TrustedFirmware Code Review
commit 6a4afebb0f
3 changed files with 19 additions and 1 deletions

View file

@ -826,6 +826,10 @@ For Cortex-X4, the following errata build flags are defined :
feature is enabled and can assist the Kernel in the process of feature is enabled and can assist the Kernel in the process of
mitigation of the erratum. mitigation of the erratum.
- ``ERRATA_X4_2740089``: This applies errata 2740089 workaround to Cortex-X4
CPU. This needs to be enabled for revisions r0p0 and r0p1. It is fixed
in r0p2.
For Cortex-A510, the following errata build flags are defined : For Cortex-A510, the following errata build flags are defined :
- ``ERRATA_A510_1922240``: This applies errata 1922240 workaround to - ``ERRATA_A510_1922240``: This applies errata 1922240 workaround to

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022-2023, Arm Limited. All rights reserved. * Copyright (c) 2022-2024, Arm Limited. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -26,6 +26,13 @@
wa_cve_2022_23960_bhb_vector_table CORTEX_X4_BHB_LOOP_COUNT, cortex_x4 wa_cve_2022_23960_bhb_vector_table CORTEX_X4_BHB_LOOP_COUNT, cortex_x4
#endif /* WORKAROUND_CVE_2022_23960 */ #endif /* WORKAROUND_CVE_2022_23960 */
workaround_runtime_start cortex_x4, ERRATUM(2740089), ERRATA_X4_2740089
/* dsb before isb of power down sequence */
dsb sy
workaround_runtime_end cortex_x4, ERRATUM(2740089)
check_erratum_ls cortex_x4, ERRATUM(2740089), CPU_REV(0, 1)
workaround_reset_start cortex_x4, CVE(2022, 23960), WORKAROUND_CVE_2022_23960 workaround_reset_start cortex_x4, CVE(2022, 23960), WORKAROUND_CVE_2022_23960
#if IMAGE_BL31 #if IMAGE_BL31
/* /*
@ -53,6 +60,9 @@ func cortex_x4_core_pwr_dwn
* --------------------------------------------------- * ---------------------------------------------------
*/ */
sysreg_bit_set CORTEX_X4_CPUPWRCTLR_EL1, CORTEX_X4_CPUPWRCTLR_EL1_CORE_PWRDN_BIT sysreg_bit_set CORTEX_X4_CPUPWRCTLR_EL1, CORTEX_X4_CPUPWRCTLR_EL1_CORE_PWRDN_BIT
apply_erratum cortex_x4, ERRATUM(2740089), ERRATA_X4_2740089
isb isb
ret ret
endfunc cortex_x4_core_pwr_dwn endfunc cortex_x4_core_pwr_dwn

View file

@ -823,6 +823,10 @@ CPU_FLAG_LIST += ERRATA_X3_2779509
# cpu and is fixed in r0p1. # cpu and is fixed in r0p1.
CPU_FLAG_LIST += ERRATA_X4_2701112 CPU_FLAG_LIST += ERRATA_X4_2701112
# Flag to apply erratum 2740089 workaround during powerdown. This erratum
# applies to all revisions <= r0p1 of the Cortex-X4 cpu, it is fixed in r0p2.
CPU_FLAG_LIST += ERRATA_X4_2740089
# Flag to apply erratum 1922240 workaround during reset. This erratum applies # Flag to apply erratum 1922240 workaround during reset. This erratum applies
# to revision r0p0 of the Cortex-A510 cpu and is fixed in r0p1. # to revision r0p0 of the Cortex-A510 cpu and is fixed in r0p1.
CPU_FLAG_LIST += ERRATA_A510_1922240 CPU_FLAG_LIST += ERRATA_A510_1922240