blob: 863b8c8d3787c47fa171adffbe26a772e8dd0b9f [file] [log] [blame]
johpow01a3810e82021-05-18 15:23:31 -05001/*
Bipin Ravi2f73d972022-01-20 00:01:04 -06002 * Copyright (c) 2021-2022, 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/*******************************************************************************
johpow01a3810e82021-05-18 15:23:31 -050031 * CPU Power Control register specific definitions
32 ******************************************************************************/
33#define CORTEX_X2_CPUPWRCTLR_EL1 S3_0_C15_C2_7
34#define CORTEX_X2_CPUPWRCTLR_EL1_CORE_PWRDN_BIT U(1)
35
johpow0115f10bd2021-12-01 17:40:39 -060036/*******************************************************************************
Bipin Ravic6b65212022-03-08 10:37:43 -060037 * CPU Auxiliary Control Register definitions
38 ******************************************************************************/
39#define CORTEX_X2_CPUACTLR_EL1 S3_0_C15_C1_0
40#define CORTEX_X2_CPUACTLR_EL1_BIT_22 (ULL(1) << 22)
41
42/*******************************************************************************
Bipin Ravi4e315c32022-07-12 17:13:01 -050043 * CPU Auxiliary Control Register 2 definitions
44 ******************************************************************************/
45#define CORTEX_X2_CPUACTLR2_EL1 S3_0_C15_C1_1
46#define CORTEX_X2_CPUACTLR2_EL1_BIT_40 (ULL(1) << 40)
47
48/*******************************************************************************
johpow0115f10bd2021-12-01 17:40:39 -060049 * CPU Auxiliary Control Register 5 definitions
50 ******************************************************************************/
51#define CORTEX_X2_CPUACTLR5_EL1 S3_0_C15_C8_0
Bipin Ravi78b72082022-02-06 01:29:31 -060052#define CORTEX_X2_CPUACTLR5_EL1_BIT_17 (ULL(1) << 17)
johpow0115f10bd2021-12-01 17:40:39 -060053
Bipin Ravi9ad54782022-01-20 00:42:05 -060054/*******************************************************************************
55 * CPU Implementation Specific Selected Instruction registers
56 ******************************************************************************/
57#define CORTEX_X2_IMP_CPUPSELR_EL3 S3_6_C15_C8_0
58#define CORTEX_X2_IMP_CPUPCR_EL3 S3_6_C15_C8_1
59#define CORTEX_X2_IMP_CPUPOR_EL3 S3_6_C15_C8_2
60#define CORTEX_X2_IMP_CPUPMR_EL3 S3_6_C15_C8_3
61
johpow01a3810e82021-05-18 15:23:31 -050062#endif /* CORTEX_X2_H */