Merge "fix(cpus): workaround for Cortex-A720 erratum 2926083" into integration

This commit is contained in:
Mark Dykes 2024-03-25 22:08:14 +01:00 committed by TrustedFirmware Code Review
commit 3daf936b0e
5 changed files with 30 additions and 0 deletions

View file

@ -918,6 +918,10 @@ For Cortex-A715, the following errata build flags are defined :
For Cortex-A720, the following errata build flags are defined : For Cortex-A720, the following errata build flags are defined :
- ``ERRATA_A720_2926083``: This applies errata 2926083 workaround to
Cortex-A720 CPU. This needs to be enabled for revisions r0p0 and r0p1.
It is fixed in r0p2.
- ``ERRATA_A720_2940794``: This applies errata 2940794 workaround to - ``ERRATA_A720_2940794``: This applies errata 2940794 workaround to
Cortex-A720 CPU. This needs to be enabled for revisions r0p0 and r0p1. Cortex-A720 CPU. This needs to be enabled for revisions r0p0 and r0p1.
It is fixed in r0p2. It is fixed in r0p2.

View file

@ -12,6 +12,11 @@
/* Cortex A720 loop count for CVE-2022-23960 mitigation */ /* Cortex A720 loop count for CVE-2022-23960 mitigation */
#define CORTEX_A720_BHB_LOOP_COUNT U(132) #define CORTEX_A720_BHB_LOOP_COUNT U(132)
/*******************************************************************************
* CPU Auxiliary Control register 1 specific definitions.
******************************************************************************/
#define CORTEX_A720_CPUACTLR_EL1 S3_0_C15_C1_0
/******************************************************************************* /*******************************************************************************
* CPU Auxiliary Control register 2 specific definitions. * CPU Auxiliary Control register 2 specific definitions.
******************************************************************************/ ******************************************************************************/

View file

@ -26,6 +26,22 @@
wa_cve_2022_23960_bhb_vector_table CORTEX_A720_BHB_LOOP_COUNT, cortex_a720 wa_cve_2022_23960_bhb_vector_table CORTEX_A720_BHB_LOOP_COUNT, cortex_a720
#endif /* WORKAROUND_CVE_2022_23960 */ #endif /* WORKAROUND_CVE_2022_23960 */
workaround_reset_start cortex_a720, ERRATUM(2926083), ERRATA_A720_2926083
/* Erratum 2926083 workaround is required only if SPE is enabled */
#if ENABLE_SPE_FOR_NS != 0
/* Check if Static profiling extension is implemented or present. */
mrs x1, id_aa64dfr0_el1
ubfx x0, x1, ID_AA64DFR0_PMS_SHIFT, #4
cbz x0, 1f
/* Apply the workaround by setting CPUACTLR_EL1[58:57] = 0b11. */
sysreg_bit_set CORTEX_A720_CPUACTLR_EL1, BIT(57)
sysreg_bit_set CORTEX_A720_CPUACTLR_EL1, BIT(58)
1:
#endif
workaround_reset_end cortex_a720, ERRATUM(2926083)
check_erratum_ls cortex_a720, ERRATUM(2926083), CPU_REV(0, 1)
workaround_reset_start cortex_a720, ERRATUM(2940794), ERRATA_A720_2940794 workaround_reset_start cortex_a720, ERRATUM(2940794), ERRATA_A720_2940794
sysreg_bit_set CORTEX_A720_CPUACTLR2_EL1, BIT(37) sysreg_bit_set CORTEX_A720_CPUACTLR2_EL1, BIT(37)
workaround_reset_end cortex_a720, ERRATUM(2940794) workaround_reset_end cortex_a720, ERRATUM(2940794)

View file

@ -940,6 +940,10 @@ CPU_FLAG_LIST += ERRATA_A715_2429384
# only to revision r1p0. It is fixed in r1p1. # only to revision r1p0. It is fixed in r1p1.
CPU_FLAG_LIST += ERRATA_A715_2561034 CPU_FLAG_LIST += ERRATA_A715_2561034
# Flag to apply erratum 2926083 workaround during reset. This erratum applies
# to revisions r0p0 and r0p1. It is fixed in r0p2.
CPU_FLAG_LIST += ERRATA_A720_2926083
# Flag to apply erratum 2940794 workaround during reset. This erratum applies # Flag to apply erratum 2940794 workaround during reset. This erratum applies
# to revisions r0p0 and r0p1. It is fixed in r0p2. # to revisions r0p0 and r0p1. It is fixed in r0p2.
CPU_FLAG_LIST += ERRATA_A720_2940794 CPU_FLAG_LIST += ERRATA_A720_2940794

View file

@ -205,6 +205,7 @@ else
lib/cpus/aarch64/cortex_a78c.S \ lib/cpus/aarch64/cortex_a78c.S \
lib/cpus/aarch64/cortex_a710.S \ lib/cpus/aarch64/cortex_a710.S \
lib/cpus/aarch64/cortex_a715.S \ lib/cpus/aarch64/cortex_a715.S \
lib/cpus/aarch64/cortex_a720.S \
lib/cpus/aarch64/neoverse_n_common.S \ lib/cpus/aarch64/neoverse_n_common.S \
lib/cpus/aarch64/neoverse_n1.S \ lib/cpus/aarch64/neoverse_n1.S \
lib/cpus/aarch64/neoverse_n2.S \ lib/cpus/aarch64/neoverse_n2.S \