diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2019-07-31 12:09:50 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2019-07-31 12:09:50 +0000 |
commit | c78987eee6cc5b9f0c02da288c3a4331429a6014 (patch) | |
tree | 89f6a460b4d075671de8b4bbc9879d1722dd2f69 | |
parent | 31db80cc6d39f506fb2913c93380c2acde391094 (diff) | |
parent | 8dec845212bede5e127ef7293e0b20c9e02195ed (diff) | |
download | tf-a-tests-c78987eee6cc5b9f0c02da288c3a4331429a6014.tar.gz |
Merge "TF-TF: Fix bug in calculation of number of CPUs"
-rw-r--r-- | plat/common/plat_topology.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plat/common/plat_topology.c b/plat/common/plat_topology.c index 01e346191..33b6e57cc 100644 --- a/plat/common/plat_topology.c +++ b/plat/common/plat_topology.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Arm Limited. All rights reserved. + * Copyright (c) 2018-2019, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -86,7 +86,8 @@ unsigned int tftf_get_total_aff_count(unsigned int aff_lvl) node_idx = tftf_pwr_domain_start_idx[aff_lvl]; - while (tftf_pd_nodes[node_idx].level == aff_lvl) { + while ((node_idx < PLATFORM_NUM_AFFS) && + (tftf_pd_nodes[node_idx].level == aff_lvl)) { if (tftf_pd_nodes[node_idx].is_present) count++; node_idx++; |