summaryrefslogtreecommitdiff
path: root/services/arm_arch_svc/arm_arch_svc_setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'services/arm_arch_svc/arm_arch_svc_setup.c')
-rw-r--r--services/arm_arch_svc/arm_arch_svc_setup.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/services/arm_arch_svc/arm_arch_svc_setup.c b/services/arm_arch_svc/arm_arch_svc_setup.c
index a809c429..f75a737e 100644
--- a/services/arm_arch_svc/arm_arch_svc_setup.c
+++ b/services/arm_arch_svc/arm_arch_svc_setup.c
@@ -6,9 +6,11 @@
#include <arm_arch_svc.h>
#include <debug.h>
+#include <errata_report.h>
#include <runtime_svc.h>
#include <smcc.h>
#include <smcc_helpers.h>
+#include <workaround_cve_2017_5715.h>
static int32_t smccc_version(void)
{
@@ -17,14 +19,19 @@ static int32_t smccc_version(void)
static int32_t smccc_arch_features(u_register_t arg)
{
+ int ret;
+
switch (arg) {
case SMCCC_VERSION:
case SMCCC_ARCH_FEATURES:
return SMC_OK;
-#if WORKAROUND_CVE_2017_5715
case SMCCC_ARCH_WORKAROUND_1:
- return SMC_OK;
-#endif
+ ret = check_workaround_cve_2017_5715();
+ if (ret == ERRATA_APPLIES)
+ return 0;
+ else if (ret == ERRATA_NOT_APPLIES)
+ return 1;
+ return -1; /* ERRATA_MISSING */
default:
return SMC_UNK;
}