blob: 0f97b1e115c59aa0daef17c17021a4a495864a74 [file] [log] [blame]
johpow01a3810e82021-05-18 15:23:31 -05001/*
Sona Mathewc3813332023-12-09 13:09:30 -06002 * Copyright (c) 2021-2023, Arm Limited. All rights reserved.
johpow01a3810e82021-05-18 15:23:31 -05003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef CORTEX_X2_H
8#define CORTEX_X2_H
9
10#define CORTEX_X2_MIDR U(0x410FD480)
11
Bipin Ravi86499742022-01-18 01:59:06 -060012/* Cortex-X2 loop count for CVE-2022-23960 mitigation */
13#define CORTEX_X2_BHB_LOOP_COUNT U(32)
14
johpow01a3810e82021-05-18 15:23:31 -050015/*******************************************************************************
16 * CPU Extended Control register specific definitions
17 ******************************************************************************/
18#define CORTEX_X2_CPUECTLR_EL1 S3_0_C15_C1_4
Bipin Ravi2f73d972022-01-20 00:01:04 -060019#define CORTEX_X2_CPUECTLR_EL1_PFSTIDIS_BIT (ULL(1) << 8)
johpow01a3810e82021-05-18 15:23:31 -050020
21/*******************************************************************************
johpow01f6c37de2021-12-03 11:27:33 -060022 * CPU Extended Control register 2 specific definitions
23 ******************************************************************************/
24#define CORTEX_X2_CPUECTLR2_EL1 S3_0_C15_C1_5
25
26#define CORTEX_X2_CPUECTLR2_EL1_PF_MODE_SHIFT U(11)
27#define CORTEX_X2_CPUECTLR2_EL1_PF_MODE_WIDTH U(4)
28#define CORTEX_X2_CPUECTLR2_EL1_PF_MODE_CNSRV ULL(0x9)
29
30/*******************************************************************************
Sona Mathewc3813332023-12-09 13:09:30 -060031 * CPU Auxiliary Control register 3 specific definitions.
32 ******************************************************************************/
33#define CORTEX_X2_CPUACTLR3_EL1 S3_0_C15_C1_2
34
35/*******************************************************************************
johpow01a3810e82021-05-18 15:23:31 -050036 * CPU Power Control register specific definitions
37 ******************************************************************************/
38#define CORTEX_X2_CPUPWRCTLR_EL1 S3_0_C15_C2_7
39#define CORTEX_X2_CPUPWRCTLR_EL1_CORE_PWRDN_BIT U(1)
40
johpow0115f10bd2021-12-01 17:40:39 -060041/*******************************************************************************
Bipin Ravic6b65212022-03-08 10:37:43 -060042 * CPU Auxiliary Control Register definitions
43 ******************************************************************************/
44#define CORTEX_X2_CPUACTLR_EL1 S3_0_C15_C1_0
45#define CORTEX_X2_CPUACTLR_EL1_BIT_22 (ULL(1) << 22)
46
47/*******************************************************************************
Bipin Ravi4e315c32022-07-12 17:13:01 -050048 * CPU Auxiliary Control Register 2 definitions
49 ******************************************************************************/
50#define CORTEX_X2_CPUACTLR2_EL1 S3_0_C15_C1_1
51#define CORTEX_X2_CPUACTLR2_EL1_BIT_40 (ULL(1) << 40)
52
53/*******************************************************************************
johpow0115f10bd2021-12-01 17:40:39 -060054 * CPU Auxiliary Control Register 5 definitions
55 ******************************************************************************/
56#define CORTEX_X2_CPUACTLR5_EL1 S3_0_C15_C8_0
Bipin Ravi78b72082022-02-06 01:29:31 -060057#define CORTEX_X2_CPUACTLR5_EL1_BIT_17 (ULL(1) << 17)
johpow0115f10bd2021-12-01 17:40:39 -060058
Bipin Ravi9ad54782022-01-20 00:42:05 -060059/*******************************************************************************
60 * CPU Implementation Specific Selected Instruction registers
61 ******************************************************************************/
62#define CORTEX_X2_IMP_CPUPSELR_EL3 S3_6_C15_C8_0
63#define CORTEX_X2_IMP_CPUPCR_EL3 S3_6_C15_C8_1
64#define CORTEX_X2_IMP_CPUPOR_EL3 S3_6_C15_C8_2
65#define CORTEX_X2_IMP_CPUPMR_EL3 S3_6_C15_C8_3
66
johpow01a3810e82021-05-18 15:23:31 -050067#endif /* CORTEX_X2_H */