Isla Mitchell | ea84d6b | 2017-08-03 16:04:46 +0100 | [diff] [blame] | 1 | /* |
Govindraj Raja | 331bdef | 2023-06-15 17:34:15 -0500 | [diff] [blame] | 2 | * Copyright (c) 2017-2023, Arm Limited and Contributors. All rights reserved. |
Isla Mitchell | ea84d6b | 2017-08-03 16:04:46 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 7 | #ifndef CORTEX_A76_H |
| 8 | #define CORTEX_A76_H |
Isla Mitchell | ea84d6b | 2017-08-03 16:04:46 +0100 | [diff] [blame] | 9 | |
Antonio Nino Diaz | 5e79cfe | 2019-02-11 13:34:15 +0000 | [diff] [blame] | 10 | #include <lib/utils_def.h> |
| 11 | |
Isla Mitchell | ea84d6b | 2017-08-03 16:04:46 +0100 | [diff] [blame] | 12 | /* Cortex-A76 MIDR for revision 0 */ |
Bipin Ravi | ee56a8a | 2022-02-08 19:32:38 -0600 | [diff] [blame] | 13 | #define CORTEX_A76_MIDR U(0x410fd0b0) |
| 14 | |
| 15 | /* Cortex-A76 loop count for CVE-2022-23960 mitigation */ |
| 16 | #define CORTEX_A76_BHB_LOOP_COUNT U(24) |
Isla Mitchell | ea84d6b | 2017-08-03 16:04:46 +0100 | [diff] [blame] | 17 | |
| 18 | /******************************************************************************* |
| 19 | * CPU Extended Control register specific definitions. |
| 20 | ******************************************************************************/ |
Bipin Ravi | ee56a8a | 2022-02-08 19:32:38 -0600 | [diff] [blame] | 21 | #define CORTEX_A76_CPUPWRCTLR_EL1 S3_0_C15_C2_7 |
| 22 | #define CORTEX_A76_CPUECTLR_EL1 S3_0_C15_C1_4 |
Isla Mitchell | ea84d6b | 2017-08-03 16:04:46 +0100 | [diff] [blame] | 23 | |
Bipin Ravi | ee56a8a | 2022-02-08 19:32:38 -0600 | [diff] [blame] | 24 | #define CORTEX_A76_CPUECTLR_EL1_WS_THR_L2 (ULL(3) << 24) |
| 25 | #define CORTEX_A76_CPUECTLR_EL1_BIT_51 (ULL(1) << 51) |
Louis Mayencourt | adda9d4 | 2019-02-25 11:37:38 +0000 | [diff] [blame] | 26 | |
Dimitris Papastamos | 312e17e | 2018-05-16 09:59:54 +0100 | [diff] [blame] | 27 | /******************************************************************************* |
| 28 | * CPU Auxiliary Control register specific definitions. |
| 29 | ******************************************************************************/ |
Bipin Ravi | ee56a8a | 2022-02-08 19:32:38 -0600 | [diff] [blame] | 30 | #define CORTEX_A76_CPUACTLR_EL1 S3_0_C15_C1_0 |
Louis Mayencourt | 59fa218 | 2019-02-25 15:17:44 +0000 | [diff] [blame] | 31 | |
| 32 | #define CORTEX_A76_CPUACTLR_EL1_DISABLE_STATIC_PREDICTION (ULL(1) << 6) |
| 33 | |
Bipin Ravi | ee56a8a | 2022-02-08 19:32:38 -0600 | [diff] [blame] | 34 | #define CORTEX_A76_CPUACTLR_EL1_BIT_13 (ULL(1) << 13) |
Soby Mathew | 1d3ba1c | 2019-05-01 09:43:18 +0100 | [diff] [blame] | 35 | |
Bipin Ravi | ee56a8a | 2022-02-08 19:32:38 -0600 | [diff] [blame] | 36 | #define CORTEX_A76_CPUACTLR2_EL1 S3_0_C15_C1_1 |
Dimitris Papastamos | 312e17e | 2018-05-16 09:59:54 +0100 | [diff] [blame] | 37 | |
Bipin Ravi | ee56a8a | 2022-02-08 19:32:38 -0600 | [diff] [blame] | 38 | #define CORTEX_A76_CPUACTLR2_EL1_BIT_2 (ULL(1) << 2) |
Govindraj Raja | 331bdef | 2023-06-15 17:34:15 -0500 | [diff] [blame] | 39 | #define CORTEX_A76_CPUACTLR2_EL1_BIT_59 (ULL(1) << 59) |
johpow01 | 9603f98 | 2020-05-29 14:17:38 -0500 | [diff] [blame] | 40 | |
Antonio Nino Diaz | 5e79cfe | 2019-02-11 13:34:15 +0000 | [diff] [blame] | 41 | #define CORTEX_A76_CPUACTLR2_EL1_DISABLE_LOAD_PASS_STORE (ULL(1) << 16) |
Dimitris Papastamos | 312e17e | 2018-05-16 09:59:54 +0100 | [diff] [blame] | 42 | |
Bipin Ravi | ee56a8a | 2022-02-08 19:32:38 -0600 | [diff] [blame] | 43 | #define CORTEX_A76_CPUACTLR3_EL1 S3_0_C15_C1_2 |
Soby Mathew | 1d3ba1c | 2019-05-01 09:43:18 +0100 | [diff] [blame] | 44 | |
Bipin Ravi | ee56a8a | 2022-02-08 19:32:38 -0600 | [diff] [blame] | 45 | #define CORTEX_A76_CPUACTLR3_EL1_BIT_10 (ULL(1) << 10) |
Soby Mathew | 1d3ba1c | 2019-05-01 09:43:18 +0100 | [diff] [blame] | 46 | |
| 47 | |
Isla Mitchell | ea84d6b | 2017-08-03 16:04:46 +0100 | [diff] [blame] | 48 | /* Definitions of register field mask in CORTEX_A76_CPUPWRCTLR_EL1 */ |
Bipin Ravi | ee56a8a | 2022-02-08 19:32:38 -0600 | [diff] [blame] | 49 | #define CORTEX_A76_CORE_PWRDN_EN_MASK U(0x1) |
Isla Mitchell | ea84d6b | 2017-08-03 16:04:46 +0100 | [diff] [blame] | 50 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 51 | #endif /* CORTEX_A76_H */ |