summaryrefslogtreecommitdiff
path: root/include/linux/arm-smccc.h
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2021-11-18 16:59:46 +0300
committerJames Morse <james.morse@arm.com>2022-02-16 16:16:08 +0300
commitba2689234be92024e5635d30fe744f4853ad97db (patch)
treea036f6b212587807ad27974073aacc854bfd05c8 /include/linux/arm-smccc.h
parentaff65393fa1401e034656e349abd655cfe272de0 (diff)
downloadlinux-ba2689234be92024e5635d30fe744f4853ad97db.tar.xz
arm64: entry: Add vectors that have the bhb mitigation sequences
Some CPUs affected by Spectre-BHB need a sequence of branches, or a firmware call to be run before any indirect branch. This needs to go in the vectors. No CPU needs both. While this can be patched in, it would run on all CPUs as there is a single set of vectors. If only one part of a big/little combination is affected, the unaffected CPUs have to run the mitigation too. Create extra vectors that include the sequence. Subsequent patches will allow affected CPUs to select this set of vectors. Later patches will modify the loop count to match what the CPU requires. Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
Diffstat (limited to 'include/linux/arm-smccc.h')
-rw-r--r--include/linux/arm-smccc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
index 63ccb5252190..220c8c60e021 100644
--- a/include/linux/arm-smccc.h
+++ b/include/linux/arm-smccc.h
@@ -92,6 +92,11 @@
ARM_SMCCC_SMC_32, \
0, 0x7fff)
+#define ARM_SMCCC_ARCH_WORKAROUND_3 \
+ ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \
+ ARM_SMCCC_SMC_32, \
+ 0, 0x3fff)
+
#define ARM_SMCCC_VENDOR_HYP_CALL_UID_FUNC_ID \
ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \
ARM_SMCCC_SMC_32, \