Cortex FVPs: only cluster 0 is discoverable
Open, Needs TriagePublic

Description

The problem
When TF-A Tests are executed in specific Cortex FVPs, then in some cases only cluster 0 gets discovered by TFAT. When TFAT gets executed with the generic AEMv8A FVPs, all clusters get discovered as expected.

Background
From a quick, preliminary investigation, we have concluded that this happens most probably due to MPIDR register values and, more specifically, it seems to be related with the affinity and MT fields. The confusion arises from the fact that affinity level 0 represents threads, for multithreaded cores, or cores, for non multihtreaded cores. Further confusion incurs because there are non multithreaded cores (e.g. A75) that the relevant MT field in MPIDR still has the value of 1, which would represent a multithreaded core, instead.

As the Cortex-A75 TRM explains, despite the fact that A75 is not multithreaded, the MT field is 1 to indicate that this core is still compatible to be in a system with other cores that are multithreaded.

Where the problem lies
Most probably, as a result of the above, TFAT seems to be wrongly interpreting the affinity and MT values of some cores/clusters in the system. It seems that TFAT always considers affinity level 0 as the core level, regardless of what kind of cores we actually have. As a result, when we have multithreaded or multithread-compatible cores (where affinity level 0 represents threads) TFAT misinterprets the core hierarchy of the system and fails to discover all the available cores/clusters.

Task objective
We need to examine again and possibly redefine the logic of how TFAT discovers clusters and/or, more generally, how TFAT browses the affinity levels of the system to properly discover all clusters and cores.