mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-22 20:38:03 +00:00
driver/arm/css: minor bug fix
The cpu index was wrongly checked causing it to assert always. Since this code path is exercised only during TF test "NODE_HW_STAT", which queries Power state from SCP, this bug was not detected earlier. Change-Id: Ia25cef4c0aa23ed08092df39134937a2601c21ac Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
This commit is contained in:
parent
2403813779
commit
cc7f89de5a
1 changed files with 4 additions and 4 deletions
|
@ -224,8 +224,8 @@ void css_scp_on(u_register_t mpidr)
|
||||||
|
|
||||||
SCMI_SET_PWR_STATE_MAX_PWR_LVL(scmi_pwr_state, lvl - 1);
|
SCMI_SET_PWR_STATE_MAX_PWR_LVL(scmi_pwr_state, lvl - 1);
|
||||||
|
|
||||||
core_pos = plat_core_pos_by_mpidr(mpidr);
|
core_pos = (unsigned int)plat_core_pos_by_mpidr(mpidr);
|
||||||
assert(core_pos >= 0 && (core_pos < PLATFORM_CORE_COUNT));
|
assert(core_pos < PLATFORM_CORE_COUNT);
|
||||||
|
|
||||||
css_scp_core_pos_to_scmi_channel(core_pos, &domain_id,
|
css_scp_core_pos_to_scmi_channel(core_pos, &domain_id,
|
||||||
&channel_id);
|
&channel_id);
|
||||||
|
@ -256,8 +256,8 @@ int css_scp_get_power_state(u_register_t mpidr, unsigned int power_level)
|
||||||
return PSCI_E_INVALID_PARAMS;
|
return PSCI_E_INVALID_PARAMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
cpu_idx = plat_core_pos_by_mpidr(mpidr);
|
cpu_idx = (unsigned int)plat_core_pos_by_mpidr(mpidr);
|
||||||
assert(cpu_idx > -1);
|
assert(cpu_idx < PLATFORM_CORE_COUNT);
|
||||||
|
|
||||||
css_scp_core_pos_to_scmi_channel(cpu_idx, &domain_id, &channel_id);
|
css_scp_core_pos_to_scmi_channel(cpu_idx, &domain_id, &channel_id);
|
||||||
ret = scmi_pwr_state_get(scmi_handles[channel_id],
|
ret = scmi_pwr_state_get(scmi_handles[channel_id],
|
||||||
|
|
Loading…
Add table
Reference in a new issue