diff options
author | Javier Almansa Sobrino <javier.almansasobrino@arm.com> | 2020-09-04 12:52:23 +0100 |
---|---|---|
committer | Manish Pandey <manish.pandey2@arm.com> | 2020-10-09 15:17:01 +0000 |
commit | 109d5c1b53779b18c98aa21d959d1182164b2eb7 (patch) | |
tree | ac7a65620ecba8d80bef1abe2462b3494c944688 | |
parent | da5f4e36b2bb34f4df3b7ddb3f5424005b8f5bb4 (diff) |
Remove dependencies from FVP to generic code
Some generic parts of TFTF have dependencies from FVP platform
macros which can cause some trouble when porting the tests to a
different platform.
Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I11eb1af142b8c0ee1de2fcc8f298658bceedf306
-rw-r--r-- | include/lib/tftf_lib.h | 4 | ||||
-rw-r--r-- | plat/arm/fvp/include/platform_def.h | 2 | ||||
-rw-r--r-- | tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/include/lib/tftf_lib.h b/include/lib/tftf_lib.h index c3ad105..f9d1a6e 100644 --- a/include/lib/tftf_lib.h +++ b/include/lib/tftf_lib.h @@ -208,7 +208,7 @@ void tftf_notify_reboot(void); unsigned int tftf_is_rebooted(void); static inline unsigned int make_mpid(unsigned int clusterid, -#if FVP_MAX_PE_PER_CPU > 1 +#if PLAT_MAX_PE_PER_CPU > 1 unsigned int coreid, unsigned int threadid) #else @@ -221,7 +221,7 @@ static inline unsigned int make_mpid(unsigned int clusterid, */ if ((read_mpidr_el1() & MPIDR_MT_MASK) != 0) return MPIDR_MT_MASK | -#if FVP_MAX_PE_PER_CPU > 1 +#if PLAT_MAX_PE_PER_CPU > 1 ((threadid & MPIDR_AFFLVL_MASK) << MPIDR_AFF0_SHIFT) | #endif ((coreid & MPIDR_AFFLVL_MASK) << MPIDR_AFF1_SHIFT) | diff --git a/plat/arm/fvp/include/platform_def.h b/plat/arm/fvp/include/platform_def.h index 3abeb03..ed45642 100644 --- a/plat/arm/fvp/include/platform_def.h +++ b/plat/arm/fvp/include/platform_def.h @@ -160,6 +160,8 @@ PLATFORM_CORE_COUNT) #define PLATFORM_MAX_AFFLVL MPIDR_AFFLVL2 +#define PLAT_MAX_PE_PER_CPU FVP_MAX_PE_PER_CPU + /* TODO : Migrate complete TFTF from affinity level to power levels */ #define PLAT_MAX_PWR_LEVEL PLATFORM_MAX_AFFLVL #define PLAT_MAX_PWR_STATES_PER_LVL 2 diff --git a/tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c b/tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c index 708ea13..f58b6e4 100644 --- a/tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c +++ b/tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c @@ -214,7 +214,7 @@ test_result_t test_affinity_info_level1_off(void) * CPU on the platform. The PSCI implementation should ignore the * affinity 0 field. */ -#if FVP_MAX_PE_PER_CPU > 1 +#if PLAT_MAX_PE_PER_CPU > 1 target_mpid = make_mpid(cluster_id, 0, 0xE1); #else target_mpid = make_mpid(cluster_id, 0xE1); |