123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #include <common/debug.h>
- #include <plat/common/platform.h>
- #include <platform_def.h>
- #include <plat_private.h>
- static const uint8_t plat_power_domain_tree_desc[] = {
-
- 1,
-
- PLATFORM_CLUSTER_COUNT,
-
- PLATFORM_CORE_COUNT_PER_CLUSTER,
-
- PLATFORM_CORE_COUNT_PER_CLUSTER,
-
- PLATFORM_CORE_COUNT_PER_CLUSTER,
-
- PLATFORM_CORE_COUNT_PER_CLUSTER,
- };
- const uint8_t *plat_get_power_domain_tree_desc(void)
- {
- return plat_power_domain_tree_desc;
- }
- int32_t plat_core_pos_by_mpidr(u_register_t mpidr)
- {
- uint32_t cluster_id, cpu_id;
- mpidr &= MPIDR_AFFINITY_MASK;
- cluster_id = MPIDR_AFFLVL2_VAL(mpidr);
- cpu_id = MPIDR_AFFLVL1_VAL(mpidr);
- if (cluster_id >= PLATFORM_CLUSTER_COUNT) {
- return -3;
- }
-
- if (cpu_id >= PLATFORM_CORE_COUNT_PER_CLUSTER) {
- return -1;
- }
- return (cpu_id + (cluster_id * PLATFORM_CORE_COUNT_PER_CLUSTER));
- }
|