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: Alexei Fedorov <Alexei.Fedorov@arm.com>
Change-Id: If7b2d8eba7560126aeff29c6b8c9355198aad453
1 file changed