summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2023-08-04 15:46:50 +0200
committerStephan Gerhold <stephan@gerhold.net>2023-08-04 16:02:28 +0200
commitd1f2748ed25748237e894c68c5a163326a8c33b9 (patch)
tree341b7a654d8375bb4fb5b40cf97e6d487f2ccb38
parentf560a13cad363681d81c4e24227aee13ecb6f693 (diff)
fix(services): disable workaround discovery on aarch32 for now
The Arm Architecture Service (arm_arch_svc) is required for SP_MIN on AArch32 because the PSCI_FEATURES call implementation in TF-A always indicates support for SMCCC_VERSION. However, currently it cannot be built for AArch32 because all the workaround check functions (check_wa_cve_2017_5715(), check_smccc_arch_wa3_applies(), ...) are not implemented for AArch32. While this should be ideally fixed at some point, disable the SMCCC_ARCH_WORKAROUND implementations for AArch32 for now so at least the rest of the calls can be built correctly. This still helps overall because implementing SMCCC_VERSION is mandatory while the workaround calls are optional. Change-Id: Ic19973a8e4d50a97f274d4461794c117b337396b Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
-rw-r--r--services/arm_arch_svc/arm_arch_svc_setup.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/arm_arch_svc/arm_arch_svc_setup.c b/services/arm_arch_svc/arm_arch_svc_setup.c
index bb042c70e..57d211ed7 100644
--- a/services/arm_arch_svc/arm_arch_svc_setup.c
+++ b/services/arm_arch_svc/arm_arch_svc_setup.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2022, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2018-2023, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -28,6 +28,8 @@ static int32_t smccc_arch_features(u_register_t arg1)
return SMC_ARCH_CALL_SUCCESS;
case SMCCC_ARCH_SOC_ID:
return plat_is_smccc_feature_available(arg1);
+#ifdef __aarch64__
+ /* Workaround checks are currently only implemented for aarch64 */
#if WORKAROUND_CVE_2017_5715
case SMCCC_ARCH_WORKAROUND_1:
if (check_wa_cve_2017_5715() == ERRATA_NOT_APPLIES)
@@ -88,6 +90,7 @@ static int32_t smccc_arch_features(u_register_t arg1)
}
return 0; /* ERRATA_APPLIES || ERRATA_MISSING */
#endif
+#endif /* __aarch64__ */
/* Fallthrough */
@@ -128,6 +131,7 @@ static uintptr_t arm_arch_svc_smc_handler(uint32_t smc_fid,
SMC_RET1(handle, smccc_arch_features(x1));
case SMCCC_ARCH_SOC_ID:
SMC_RET1(handle, smccc_arch_id(x1));
+#ifdef __aarch64__
#if WORKAROUND_CVE_2017_5715
case SMCCC_ARCH_WORKAROUND_1:
/*
@@ -156,6 +160,7 @@ static uintptr_t arm_arch_svc_smc_handler(uint32_t smc_fid,
*/
SMC_RET0(handle);
#endif
+#endif /* __aarch64__ */
default:
WARN("Unimplemented Arm Architecture Service Call: 0x%x \n",
smc_fid);