From bbdf75e32caf5276446d624f2f7416d56eab1046 Mon Sep 17 00:00:00 2001 From: Sandrine Bailleux Date: Mon, 29 Oct 2018 15:14:09 +0100 Subject: [PATCH] Output of MPIDR_CPU/CLUSTER_ID macros Change-Id: I6c0081542e7938e67be728b5724e9d008300d61b --- tftf/tests/template_tests/test_template_multi_core.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tftf/tests/template_tests/test_template_multi_core.c b/tftf/tests/template_tests/test_template_multi_core.c index 0986532..9d45c45 100644 --- a/tftf/tests/template_tests/test_template_multi_core.c +++ b/tftf/tests/template_tests/test_template_multi_core.c @@ -13,6 +13,8 @@ #include #include +#include + static event_t cpu_has_entered_test[PLATFORM_CORE_COUNT]; /* @@ -21,9 +23,13 @@ static event_t cpu_has_entered_test[PLATFORM_CORE_COUNT]; */ static test_result_t non_lead_cpu_fn(void) { - unsigned int mpid = read_mpidr_el1() & MPID_MASK; + u_register_t mpid = read_mpidr_el1(); unsigned int core_pos = platform_get_core_pos(mpid); + mp_printf("MPID=0x%lx\n", mpid); + mp_printf("cluster ID: %llu\n", MPIDR_CLUSTER_ID(mpid)); + mp_printf("CPU ID: %llu\n", MPIDR_CPU_ID(mpid)); + /* Signal to the lead CPU that the calling CPU has entered the test */ tftf_send_event(&cpu_has_entered_test[core_pos]); @@ -44,12 +50,15 @@ static test_result_t non_lead_cpu_fn(void) */ test_result_t test_template_multi_core(void) { - unsigned int lead_mpid; - unsigned int cpu_mpid, cpu_node; + u_register_t lead_mpid, cpu_mpid; + unsigned int cpu_node; unsigned int core_pos; int psci_ret; lead_mpid = read_mpidr_el1() & MPID_MASK; + mp_printf("MPID=0x%lx\n", lead_mpid); + mp_printf("cluster ID: %llu\n", MPIDR_CLUSTER_ID(lead_mpid)); + mp_printf("CPU ID: %llu\n", MPIDR_CPU_ID(lead_mpid)); SKIP_TEST_IF_LESS_THAN_N_CPUS(2); @@ -63,7 +72,7 @@ test_result_t test_template_multi_core(void) psci_ret = tftf_cpu_on(cpu_mpid, (uintptr_t) non_lead_cpu_fn, 0); if (psci_ret != PSCI_E_SUCCESS) { tftf_testcase_printf( - "Failed to power on CPU 0x%x (%d)\n", + "Failed to power on CPU 0x%lx (%d)\n", cpu_mpid, psci_ret); return TEST_RESULT_SKIPPED; } -- 2.7.4