1 /* 2 * Copyright (c) 2022-2025, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef CORTEX_X4_H 8 #define CORTEX_X4_H 9 10 #define CORTEX_X4_MIDR U(0x410FD821) 11 12 /* Cortex X4 loop count for CVE-2022-23960 mitigation */ 13 #define CORTEX_X4_BHB_LOOP_COUNT U(132) 14 15 /******************************************************************************* 16 * CPU Extended Control register specific definitions 17 ******************************************************************************/ 18 #define CORTEX_X4_CPUECTLR_EL1 S3_0_C15_C1_4 19 20 /******************************************************************************* 21 * CPU Power Control register specific definitions 22 ******************************************************************************/ 23 #define CORTEX_X4_CPUPWRCTLR_EL1 S3_0_C15_C2_7 24 #define CORTEX_X4_CPUPWRCTLR_EL1_CORE_PWRDN_BIT U(1) 25 26 /******************************************************************************* 27 * CPU Auxiliary control register specific definitions 28 ******************************************************************************/ 29 #define CORTEX_X4_CPUACTLR_EL1 S3_0_C15_C1_0 30 #define CORTEX_X4_CPUACTLR3_EL1 S3_0_C15_C1_2 31 #define CORTEX_X4_CPUACTLR4_EL1 S3_0_C15_C1_3 32 33 /******************************************************************************* 34 * CPU Auxiliary control register 5 specific definitions 35 ******************************************************************************/ 36 #define CORTEX_X4_CPUACTLR5_EL1 S3_0_C15_C8_0 37 #define CORTEX_X4_CPUACTLR5_EL1_BIT_14 (ULL(1) << 14) 38 39 /******************************************************************************* 40 * CPU Auxiliary control register 6 specific definitions 41 ******************************************************************************/ 42 #define CORTEX_X4_CPUACTLR6_EL1 S3_0_C15_C8_1 43 44 #ifndef __ASSEMBLER__ 45 #if ERRATA_X4_2726228 46 long check_erratum_cortex_x4_2726228(long cpu_rev); 47 #else 48 static inline long check_erratum_cortex_x4_2726228(long cpu_rev) 49 { 50 return 0; 51 } 52 #endif /* ERRATA_X4_2726228 */ 53 54 long check_erratum_cortex_x4_3701758(long cpu_rev); 55 #endif /* __ASSEMBLER__ */ 56 57 #endif /* CORTEX_X4_H */ 58