Skip to content
Commit 8dec8452 authored by Alexei Fedorov's avatar Alexei Fedorov
Browse files

TF-TF: Fix bug in calculation of number of CPUs



This patch fixes the bug in tftf_get_total_aff_count()
which incorrectly calculates the number of CPUs for
aff_lvl = 0. The function reads tftf_pd_nodes[] array
only based on condition
`tftf_pd_nodes[node_idx].level == aff_lvl` but
doesn't check for `indexes < PLATFORM_NUM_AFFS`.
This causes reads of the array beyond its boundaries
which results in incorrect calculation of number of CPUs,
and some of the tests entering infinite loops.

Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
Change-Id: If7b2d8eba7560126aeff29c6b8c9355198aad453
parent 7bdfa0b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment