mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 18:14:24 +00:00

This patch implements errata functions for two errata, both of them disable TRBE as a workaround. This patch doesn't have functions that disable TRBE but only implemented helper functions that are used to detect cores affected by Errata 2938996(Cortex-A520) & 2726228(Cortex-X4) Cortex-X4 SDEN documentation: https://developer.arm.com/documentation/SDEN2432808/latest Cortex-A520 SDEN Documentation: https://developer.arm.com/documentation/SDEN-2444153/latest Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I8f886a1c21698f546a0996c719cc27dc0a23633a
48 lines
1.7 KiB
C
48 lines
1.7 KiB
C
/*
|
|
* Copyright (c) 2022-2024, Arm Limited. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef CORTEX_X4_H
|
|
#define CORTEX_X4_H
|
|
|
|
#define CORTEX_X4_MIDR U(0x410FD821)
|
|
|
|
/* Cortex X4 loop count for CVE-2022-23960 mitigation */
|
|
#define CORTEX_X4_BHB_LOOP_COUNT U(132)
|
|
|
|
/*******************************************************************************
|
|
* CPU Extended Control register specific definitions
|
|
******************************************************************************/
|
|
#define CORTEX_X4_CPUECTLR_EL1 S3_0_C15_C1_4
|
|
|
|
/*******************************************************************************
|
|
* CPU Power Control register specific definitions
|
|
******************************************************************************/
|
|
#define CORTEX_X4_CPUPWRCTLR_EL1 S3_0_C15_C2_7
|
|
#define CORTEX_X4_CPUPWRCTLR_EL1_CORE_PWRDN_BIT U(1)
|
|
|
|
/*******************************************************************************
|
|
* CPU Auxiliary control register specific definitions
|
|
******************************************************************************/
|
|
#define CORTEX_X4_CPUACTLR3_EL1 S3_0_C15_C1_2
|
|
|
|
/*******************************************************************************
|
|
* CPU Auxiliary control register 5 specific definitions
|
|
******************************************************************************/
|
|
#define CORTEX_X4_CPUACTLR5_EL1 S3_0_C15_C8_0
|
|
#define CORTEX_X4_CPUACTLR5_EL1_BIT_14 (ULL(1) << 14)
|
|
|
|
#ifndef __ASSEMBLER__
|
|
#if ERRATA_X4_2726228
|
|
long check_erratum_cortex_x4_2726228(long cpu_rev);
|
|
#else
|
|
static inline long check_erratum_cortex_x4_2726228(long cpu_rev)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif /* ERRATA_X4_2726228 */
|
|
#endif /* __ASSEMBLER__ */
|
|
|
|
#endif /* CORTEX_X4_H */
|