diff options
author | Bipin Ravi <bipin.ravi@arm.com> | 2022-05-06 16:02:30 -0500 |
---|---|---|
committer | Bipin Ravi <bipin.ravi@arm.com> | 2022-05-11 19:05:48 +0200 |
commit | c2a15217c3053117f4d39233002cb1830fa96670 (patch) | |
tree | ca99dde44767929b0b428f2573c6f95fe5052b4a /include/lib/cpus | |
parent | 15ff61f5cefe44785ef963ed8cd4b3d9513a0851 (diff) | |
download | arm-trusted-firmware-c2a15217c3053117f4d39233002cb1830fa96670.tar.gz |
fix(security): workaround for CVE-2022-23960
Implements the loop workaround for Cortex Makalu/Makalu-ELP/Hunter
and Neoverse Demeter/Poseidon.
Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: If5f6689b662ecac92491e0c0902df4270051ce5b
Diffstat (limited to 'include/lib/cpus')
-rw-r--r-- | include/lib/cpus/aarch64/cortex_hunter.h | 5 | ||||
-rw-r--r-- | include/lib/cpus/aarch64/cortex_makalu.h | 5 | ||||
-rw-r--r-- | include/lib/cpus/aarch64/cortex_makalu_elp_arm.h | 5 | ||||
-rw-r--r-- | include/lib/cpus/aarch64/neoverse_demeter.h | 5 | ||||
-rw-r--r-- | include/lib/cpus/aarch64/neoverse_poseidon.h | 3 |
5 files changed, 19 insertions, 4 deletions
diff --git a/include/lib/cpus/aarch64/cortex_hunter.h b/include/lib/cpus/aarch64/cortex_hunter.h index 8b59fd9ea..24bd21760 100644 --- a/include/lib/cpus/aarch64/cortex_hunter.h +++ b/include/lib/cpus/aarch64/cortex_hunter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Arm Limited. All rights reserved. + * Copyright (c) 2021-2022, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -9,6 +9,9 @@ #define CORTEX_HUNTER_MIDR U(0x410FD810) +/* Cortex Hunter loop count for CVE-2022-23960 mitigation */ +#define CORTEX_HUNTER_BHB_LOOP_COUNT U(132) + /******************************************************************************* * CPU Extended Control register specific definitions ******************************************************************************/ diff --git a/include/lib/cpus/aarch64/cortex_makalu.h b/include/lib/cpus/aarch64/cortex_makalu.h index 4e0dc8625..ee59657da 100644 --- a/include/lib/cpus/aarch64/cortex_makalu.h +++ b/include/lib/cpus/aarch64/cortex_makalu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Arm Limited. All rights reserved. + * Copyright (c) 2021-2022, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -9,6 +9,9 @@ #define CORTEX_MAKALU_MIDR U(0x410FD4D0) +/* Cortex Makalu loop count for CVE-2022-23960 mitigation */ +#define CORTEX_MAKALU_BHB_LOOP_COUNT U(38) + /******************************************************************************* * CPU Extended Control register specific definitions ******************************************************************************/ diff --git a/include/lib/cpus/aarch64/cortex_makalu_elp_arm.h b/include/lib/cpus/aarch64/cortex_makalu_elp_arm.h index a0d788e39..9ed5ee3c7 100644 --- a/include/lib/cpus/aarch64/cortex_makalu_elp_arm.h +++ b/include/lib/cpus/aarch64/cortex_makalu_elp_arm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Arm Limited. All rights reserved. + * Copyright (c) 2021-2022, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -9,6 +9,9 @@ #define CORTEX_MAKALU_ELP_ARM_MIDR U(0x410FD4E0) +/* Cortex Makalu ELP loop count for CVE-2022-23960 mitigation */ +#define CORTEX_MAKALU_ELP_ARM_BHB_LOOP_COUNT U(132) + /******************************************************************************* * CPU Extended Control register specific definitions ******************************************************************************/ diff --git a/include/lib/cpus/aarch64/neoverse_demeter.h b/include/lib/cpus/aarch64/neoverse_demeter.h index 230ed6651..f1afae7b0 100644 --- a/include/lib/cpus/aarch64/neoverse_demeter.h +++ b/include/lib/cpus/aarch64/neoverse_demeter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Arm Limited. All rights reserved. + * Copyright (c) 2021-2022, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -9,6 +9,9 @@ #define NEOVERSE_DEMETER_MIDR U(0x410FD4F0) +/* Neoverse Demeter loop count for CVE-2022-23960 mitigation */ +#define NEOVERSE_DEMETER_BHB_LOOP_COUNT U(132) + /******************************************************************************* * CPU Extended Control register specific definitions ******************************************************************************/ diff --git a/include/lib/cpus/aarch64/neoverse_poseidon.h b/include/lib/cpus/aarch64/neoverse_poseidon.h index 0a8b1d1f7..798ecd1f6 100644 --- a/include/lib/cpus/aarch64/neoverse_poseidon.h +++ b/include/lib/cpus/aarch64/neoverse_poseidon.h @@ -10,6 +10,9 @@ #define NEOVERSE_POSEIDON_MIDR U(0x410FD830) +/* Neoverse Poseidon loop count for CVE-2022-23960 mitigation */ +#define NEOVERSE_POSEIDON_BHB_LOOP_COUNT U(132) + /******************************************************************************* * CPU Extended Control register specific definitions. ******************************************************************************/ |