Verify capabilities before handling PSCI calls
authorSoby Mathew <soby.mathew@arm.com>
Thu, 15 Jan 2015 11:49:49 +0000 (11:49 +0000)
committerDan Handley <dan.handley@arm.com>
Mon, 26 Jan 2015 12:42:45 +0000 (12:42 +0000)
commitb234b2c4a06169aa965b77dd40c17be454a9f609
tree850b407b7cfbfe76f8c6822fd26d85e2cf81147f
parent90e8258eec95bcad556426597489a34208232e39
Verify capabilities before handling PSCI calls

This patch implements conditional checks in psci_smc_handler() to verify
that the psci function invoked by the caller is supported by the platform
or SPD implementation. The level of support is saved in the 'psci_caps'
variable. This check allows the PSCI implementation to return an error
early.

As a result of the above verification, the checks performed within the psci
handlers for the pm hooks are now removed and replaced with assertions.

Change-Id: I9b5b646a01d8566dc28c4d77dd3aa54e9bf3981a
services/std_svc/psci/psci_afflvl_off.c
services/std_svc/psci/psci_afflvl_on.c
services/std_svc/psci/psci_afflvl_suspend.c
services/std_svc/psci/psci_main.c
services/std_svc/psci/psci_system_off.c