summaryrefslogtreecommitdiff
path: root/services/std_svc/psci/psci_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'services/std_svc/psci/psci_main.c')
-rw-r--r--services/std_svc/psci/psci_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/std_svc/psci/psci_main.c b/services/std_svc/psci/psci_main.c
index 0e10ac05..d8a00097 100644
--- a/services/std_svc/psci/psci_main.c
+++ b/services/std_svc/psci/psci_main.c
@@ -321,6 +321,10 @@ uint64_t psci_smc_handler(uint32_t smc_fid,
if (is_caller_secure(flags))
SMC_RET1(handle, SMC_UNK);
+ /* Check the fid against the capabilities */
+ if (!(psci_caps & define_psci_cap(smc_fid)))
+ SMC_RET1(handle, SMC_UNK);
+
if (((smc_fid >> FUNCID_CC_SHIFT) & FUNCID_CC_MASK) == SMC_32) {
/* 32-bit PSCI function, clear top parameter bits */