diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2016-04-22 13:00:19 +0100 |
---|---|---|
committer | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2016-04-25 12:55:45 +0100 |
commit | 1ad9f93e8da8245237b01bea23b0a61bd42be9b8 (patch) | |
tree | 664c930f9d243f568e72a1f9ac34066aee9d05b8 /services/std_svc | |
parent | 81b491ff37a7027766410a91d9837e093248300d (diff) |
Validate psci_cpu_on_start() arguments
This patch introduces some debug assertions in the function
psci_cpu_on_start() to check the arguments it receives are
valid.
Change-Id: If4d23c9f668fb46f2d18c5e2ed1929498cc6736b
Diffstat (limited to 'services/std_svc')
-rw-r--r-- | services/std_svc/psci/psci_on.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/std_svc/psci/psci_on.c b/services/std_svc/psci/psci_on.c index 200e6222..9d2295e7 100644 --- a/services/std_svc/psci/psci_on.c +++ b/services/std_svc/psci/psci_on.c @@ -74,6 +74,10 @@ int psci_cpu_on_start(u_register_t target_cpu, unsigned int target_idx = plat_core_pos_by_mpidr(target_cpu); aff_info_state_t target_aff_state; + /* Calling function must supply valid input arguments */ + assert((int) target_idx >= 0); + assert(ep != NULL); + /* * This function must only be called on platforms where the * CPU_ON platform hooks have been implemented. |