diff --git a/docs/porting-guide.md b/docs/porting-guide.md index d97019063dd805349c212810a579253a1278b0d8..f854af918e50eb95ba67a87fc607ec00a03bc8eb 100644 --- a/docs/porting-guide.md +++ b/docs/porting-guide.md @@ -150,6 +150,11 @@ file is found in [plat/fvp/include/platform_def.h]. Defines the maximum number of CPUs that can be implemented within a cluster on the platform. +* **#define : PLATFORM_NUM_AFFS** + + Defines the total number of nodes in the affinity heirarchy at all affinity + levels used by the platform. + * **#define : PRIMARY_CPU** Defines the `MPIDR` of the primary CPU on the platform. This value is used diff --git a/include/bl31/services/psci.h b/include/bl31/services/psci.h index 887c4ceab5fbd299a82e8f937f9ae04f42d3eede..77f406d282c97789d785707159bd6ccfa7df9ec0 100644 --- a/include/bl31/services/psci.h +++ b/include/bl31/services/psci.h @@ -128,9 +128,6 @@ #define psci_validate_power_state(pstate) (pstate & PSTATE_VALID_MASK) -/* Number of affinity instances whose state this psci imp. can track */ -#define PSCI_NUM_AFFS 32ull - #ifndef __ASSEMBLY__ #include <stdint.h> diff --git a/plat/fvp/include/platform_def.h b/plat/fvp/include/platform_def.h index 46a9f24c22d09c629012a828a97b4ba6c6521a62..98d3004fbc5e2c14dae6ee102bd296c775025c3f 100644 --- a/plat/fvp/include/platform_def.h +++ b/plat/fvp/include/platform_def.h @@ -75,6 +75,8 @@ #define PLATFORM_CORE_COUNT (PLATFORM_CLUSTER1_CORE_COUNT + \ PLATFORM_CLUSTER0_CORE_COUNT) #define PLATFORM_MAX_CPUS_PER_CLUSTER 4 +#define PLATFORM_NUM_AFFS (PLATFORM_CLUSTER_COUNT + \ + PLATFORM_CORE_COUNT) #define PRIMARY_CPU 0x0 #define MAX_IO_DEVICES 3 #define MAX_IO_HANDLES 4 diff --git a/services/std_svc/psci/psci_private.h b/services/std_svc/psci/psci_private.h index 08a4a34a59d5ff597ae0b22e2e258d8e91efee48..f534087400917b9394ca5f4a53693fbe564187cb 100644 --- a/services/std_svc/psci/psci_private.h +++ b/services/std_svc/psci/psci_private.h @@ -33,8 +33,16 @@ #include <arch.h> #include <bakery_lock.h> +#include <platform_def.h> /* for PLATFORM_NUM_AFFS */ #include <psci.h> +/* Number of affinity instances whose state this psci imp. can track */ +#ifdef PLATFORM_NUM_AFFS +#define PSCI_NUM_AFFS PLATFORM_NUM_AFFS +#else +#define PSCI_NUM_AFFS (2 * PLATFORM_CORE_COUNT) +#endif + /******************************************************************************* * The following two data structures hold the topology tree which in turn tracks * the state of the all the affinity instances supported by the platform.