From c4a96088776e43f9ab74f6b3dc1b28304601af7c Mon Sep 17 00:00:00 2001 From: Sandrine Bailleux Date: Thu, 15 Mar 2018 10:03:29 +0100 Subject: Cactus (legacy): Fix MM_COMMUNICATE calls test Service ID #42 is not recognized by Cactus (it used to be in a previous version of the code) so the test fails. Introduce a new service ID (#2) that just makes Cactus return success. This service may be used to simply check the communication channel between a client and Cactus. Use this new service ID from TFTF instead of ID #42. Note that using this new service over the existing "sleep" service has 2 advantages: - It speeds up the tests. The timer service is mostly useful for testing the interrupt routing model but there's no point using it in the MM_COMMUNICATE tests. - It may be concurrently called from different CPUs. This is not the case of the "sleep" service, which involves a shared buffer. Change-Id: Ifa4391b69314845066912777b1db03ab78239547 Signed-off-by: Sandrine Bailleux --- .../secure_service/legacy/test_secure_service_handle.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/runtime_services/secure_service/legacy/test_secure_service_handle.c b/tests/runtime_services/secure_service/legacy/test_secure_service_handle.c index effa873..421e4a0 100644 --- a/tests/runtime_services/secure_service/legacy/test_secure_service_handle.c +++ b/tests/runtime_services/secure_service/legacy/test_secure_service_handle.c @@ -17,15 +17,13 @@ #include #include -#define MM_COMMUNICATE_DUMMY_ID 42 - static event_t cpu_has_finished_test; /* Test routine for test_secure_partition_secondary_cores_seq() */ static test_result_t test_secure_partition_secondary_cores_seq_fn(void) { secure_partition_request_info_t *sps_request - = create_sps_request(MM_COMMUNICATE_DUMMY_ID, NULL, 0); + = create_sps_request(SPS_CHECK_ALIVE, NULL, 0); INFO("Sending MM_COMMUNICATE_AARCH64 from CPU %u\n", platform_get_core_pos(read_mpidr_el1() & MPID_MASK)); @@ -111,7 +109,7 @@ static test_result_t test_secure_partition_secondary_cores_sim_fn(void) u_register_t cpu_mpid = read_mpidr_el1() & MPID_MASK; unsigned int core_pos = platform_get_core_pos(cpu_mpid); secure_partition_request_info_t *sps_request - = create_sps_request(MM_COMMUNICATE_DUMMY_ID, NULL, 0); + = create_sps_request(SPS_CHECK_ALIVE, NULL, 0); smc_args mm_communicate_smc = { MM_COMMUNICATE_AARCH64, -- cgit v1.2.3