mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
Merge "fix(psci): do not panic on illegal MPIDR" into integration
This commit is contained in:
commit
8700c6f784
2 changed files with 6 additions and 6 deletions
|
@ -829,8 +829,11 @@ void psci_release_pwr_domain_locks(unsigned int end_pwrlvl,
|
|||
******************************************************************************/
|
||||
int psci_validate_mpidr(u_register_t mpidr)
|
||||
{
|
||||
if (plat_core_pos_by_mpidr(mpidr) < 0)
|
||||
int pos = plat_core_pos_by_mpidr(mpidr);
|
||||
|
||||
if ((pos < 0) || ((unsigned int)pos >= PLATFORM_CORE_COUNT)) {
|
||||
return PSCI_E_INVALID_PARAMS;
|
||||
}
|
||||
|
||||
return PSCI_E_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -65,13 +65,10 @@ int psci_cpu_on_start(u_register_t target_cpu,
|
|||
unsigned int target_idx;
|
||||
|
||||
/* Calling function must supply valid input arguments */
|
||||
assert(ret >= 0);
|
||||
assert((unsigned int)ret < PLATFORM_CORE_COUNT);
|
||||
assert(ep != NULL);
|
||||
|
||||
if ((ret < 0) || (ret >= (int)PLATFORM_CORE_COUNT)) {
|
||||
ERROR("Unexpected core index.\n");
|
||||
panic();
|
||||
}
|
||||
|
||||
target_idx = (unsigned int)ret;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue