blob: fdc540137db2eb88b4b053fecf484e383217d589 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001/*
Jayanth Dodderi Chidanandb3ffd3c2023-02-13 12:15:11 +00002 * Copyright (c) 2018-2023, Arm Limited. All rights reserved.
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
J-Alvesd708c032020-11-19 12:14:21 +00007#ifndef TEST_HELPERS_H__
8#define TEST_HELPERS_H__
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02009
Joel Hutton8790f022019-03-15 14:47:02 +000010#include <arch_features.h>
Daniel Boulbyce386b12022-03-29 18:36:36 +010011#include <ffa_helpers.h>
J-Alves7581c382020-05-07 18:34:20 +010012#include <ffa_svc.h>
J-Alvesd56c53c2021-07-01 16:32:16 +010013#include <events.h>
J-Alvesf7535f42021-07-30 11:58:41 +010014#include <plat_topology.h>
J-Alves8f08a052020-05-26 17:14:40 +010015#include <psci.h>
Jayanth Dodderi Chidanandb3ffd3c2023-02-13 12:15:11 +000016#include <sme.h>
Max Shvetsov103e0562021-02-04 16:58:31 +000017#include <spm_common.h>
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020018#include <tftf_lib.h>
19#include <trusted_os.h>
20#include <tsp.h>
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020021#include <uuid_utils.h>
Max Shvetsov103e0562021-02-04 16:58:31 +000022#include <uuid.h>
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020023
24typedef struct {
25 uintptr_t addr;
26 size_t size;
27 unsigned int attr;
28 void *arg;
29} map_args_unmap_t;
30
31typedef test_result_t (*test_function_arg_t)(void *arg);
32
Deepika Bhavnanic249d5e2020-02-06 16:29:45 -060033#ifndef __aarch64__
Joel Hutton8790f022019-03-15 14:47:02 +000034#define SKIP_TEST_IF_AARCH32() \
35 do { \
36 tftf_testcase_printf("Test not supported on aarch32\n"); \
37 return TEST_RESULT_SKIPPED; \
38 } while (0)
39#else
40#define SKIP_TEST_IF_AARCH32()
41#endif
42
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020043#define SKIP_TEST_IF_LESS_THAN_N_CLUSTERS(n) \
44 do { \
45 unsigned int clusters_cnt; \
46 clusters_cnt = tftf_get_total_clusters_count(); \
47 if (clusters_cnt < (n)) { \
48 tftf_testcase_printf( \
49 "Need at least %u clusters, only found %u\n", \
50 (n), clusters_cnt); \
51 return TEST_RESULT_SKIPPED; \
52 } \
53 } while (0)
54
55#define SKIP_TEST_IF_LESS_THAN_N_CPUS(n) \
56 do { \
57 unsigned int cpus_cnt; \
58 cpus_cnt = tftf_get_total_cpus_count(); \
59 if (cpus_cnt < (n)) { \
60 tftf_testcase_printf( \
61 "Need at least %u CPUs, only found %u\n", \
62 (n), cpus_cnt); \
63 return TEST_RESULT_SKIPPED; \
64 } \
65 } while (0)
66
67#define SKIP_TEST_IF_TRUSTED_OS_NOT_PRESENT() \
68 do { \
69 uuid_t tos_uuid; \
70 \
71 if (!is_trusted_os_present(&tos_uuid)) { \
72 tftf_testcase_printf("No Trusted OS detected\n"); \
73 return TEST_RESULT_SKIPPED; \
74 } \
75 } while (0)
76
77#define SKIP_TEST_IF_TSP_NOT_PRESENT() \
78 do { \
79 uuid_t tos_uuid; \
80 char tos_uuid_str[UUID_STR_SIZE]; \
81 \
82 if (!is_trusted_os_present(&tos_uuid)) { \
83 tftf_testcase_printf("No Trusted OS detected\n"); \
84 return TEST_RESULT_SKIPPED; \
85 } \
86 \
87 if (!uuid_equal(&tos_uuid, &tsp_uuid)) { \
88 tftf_testcase_printf( \
89 "Trusted OS is not the TSP, its UUID is: %s\n", \
90 uuid_to_str(&tos_uuid, tos_uuid_str)); \
91 return TEST_RESULT_SKIPPED; \
92 } \
93 } while (0)
94
Daniel Boulby0e4629f2021-10-26 14:01:23 +010095#define SKIP_TEST_IF_DIT_NOT_SUPPORTED() \
96 do { \
97 if (!is_armv8_4_dit_present()) { \
98 tftf_testcase_printf( \
99 "DIT not supported\n"); \
100 return TEST_RESULT_SKIPPED; \
101 } \
102 } while (0)
103
Joel Hutton8790f022019-03-15 14:47:02 +0000104#define SKIP_TEST_IF_PAUTH_NOT_SUPPORTED() \
105 do { \
106 if (!is_armv8_3_pauth_present()) { \
107 tftf_testcase_printf( \
108 "Pointer Authentication not supported\n"); \
109 return TEST_RESULT_SKIPPED; \
110 } \
111 } while (0)
112
Jimmy Brisson90f1d5c2020-04-16 10:54:51 -0500113#define SKIP_TEST_IF_FGT_NOT_SUPPORTED() \
114 do { \
115 if (!is_armv8_6_fgt_present()) { \
116 tftf_testcase_printf( \
117 "Fine Grained Traps not supported\n"); \
118 return TEST_RESULT_SKIPPED; \
119 } \
120 } while (0)
121
Max Shvetsov959be332021-03-16 14:18:13 +0000122#define SKIP_TEST_IF_SVE_NOT_SUPPORTED() \
123 do { \
124 if (!is_armv8_2_sve_present()) { \
125 tftf_testcase_printf("SVE not supported\n"); \
126 return TEST_RESULT_SKIPPED; \
127 } \
128 } while (0)
129
Jimmy Brisson945095a2020-04-16 10:54:59 -0500130#define SKIP_TEST_IF_ECV_NOT_SELF_SYNC() \
131 do { \
132 if (get_armv8_6_ecv_support() != \
133 ID_AA64MMFR0_EL1_ECV_SELF_SYNCH) { \
134 tftf_testcase_printf("ARMv8.6-ECV not supported\n"); \
135 return TEST_RESULT_SKIPPED; \
136 } \
137 } while (0)
138
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200139#define SKIP_TEST_IF_MM_NOT_PRESENT() \
140 do { \
141 smc_args version_smc = { MM_VERSION_AARCH32 }; \
142 smc_ret_values smc_ret = tftf_smc(&version_smc); \
143 uint32_t version = smc_ret.ret0; \
144 \
145 if (version == (uint32_t) SMC_UNKNOWN) { \
146 tftf_testcase_printf("SPM not detected.\n"); \
147 return TEST_RESULT_SKIPPED; \
148 } \
149 } while (0)
150
Sandrine Bailleux277fb762019-10-08 12:10:45 +0200151#define SKIP_TEST_IF_MTE_SUPPORT_LESS_THAN(n) \
152 do { \
153 if (get_armv8_5_mte_support() < (n)) { \
154 tftf_testcase_printf( \
155 "Memory Tagging Extension not supported\n"); \
156 return TEST_RESULT_SKIPPED; \
157 } \
158 } while (0)
159
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200160#define SKIP_TEST_IF_MM_VERSION_LESS_THAN(major, minor) \
161 do { \
162 smc_args version_smc = { MM_VERSION_AARCH32 }; \
163 smc_ret_values smc_ret = tftf_smc(&version_smc); \
164 uint32_t version = smc_ret.ret0; \
165 \
166 if (version == (uint32_t) SMC_UNKNOWN) { \
167 tftf_testcase_printf("SPM not detected.\n"); \
168 return TEST_RESULT_SKIPPED; \
169 } \
170 \
171 if (version < MM_VERSION_FORM(major, minor)) { \
J-Alves8f08a052020-05-26 17:14:40 +0100172 tftf_testcase_printf("MM_VERSION returned %u.%u\n" \
173 "The required version is %u.%u\n", \
174 version >> MM_VERSION_MAJOR_SHIFT, \
175 version & MM_VERSION_MINOR_MASK, \
176 major, minor); \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200177 return TEST_RESULT_SKIPPED; \
178 } \
179 \
J-Alves8f08a052020-05-26 17:14:40 +0100180 VERBOSE("MM_VERSION returned %u.%u\n", \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200181 version >> MM_VERSION_MAJOR_SHIFT, \
182 version & MM_VERSION_MINOR_MASK); \
183 } while (0)
184
J-Alves7581c382020-05-07 18:34:20 +0100185#define SKIP_TEST_IF_FFA_VERSION_LESS_THAN(major, minor) \
Antonio Nino Diaz652d20a2018-12-10 17:17:33 +0000186 do { \
Daniel Boulbyce386b12022-03-29 18:36:36 +0100187 struct ffa_value ret = ffa_version( \
J-Alves8f08a052020-05-26 17:14:40 +0100188 MAKE_FFA_VERSION(major, minor)); \
Daniel Boulbyce386b12022-03-29 18:36:36 +0100189 uint32_t version = ret.fid; \
Antonio Nino Diaz652d20a2018-12-10 17:17:33 +0000190 \
J-Alves8f08a052020-05-26 17:14:40 +0100191 if (version == FFA_ERROR_NOT_SUPPORTED) { \
192 tftf_testcase_printf("FFA_VERSION not supported.\n"); \
Antonio Nino Diaz652d20a2018-12-10 17:17:33 +0000193 return TEST_RESULT_SKIPPED; \
194 } \
195 \
Daniel Boulbyce386b12022-03-29 18:36:36 +0100196 if ((version & FFA_VERSION_BIT31_MASK) != 0U) { \
J-Alves8f08a052020-05-26 17:14:40 +0100197 tftf_testcase_printf("FFA_VERSION bad response: %x\n", \
198 version); \
199 return TEST_RESULT_FAIL; \
200 } \
201 \
202 if (version < MAKE_FFA_VERSION(major, minor)) { \
203 tftf_testcase_printf("FFA_VERSION returned %u.%u\n" \
204 "The required version is %u.%u\n", \
205 version >> FFA_VERSION_MAJOR_SHIFT, \
206 version & FFA_VERSION_MINOR_MASK, \
207 major, minor); \
Antonio Nino Diaz652d20a2018-12-10 17:17:33 +0000208 return TEST_RESULT_SKIPPED; \
209 } \
210 } while (0)
211
Petre-Ionut Tudorf68ebdb2019-09-18 16:13:00 +0100212#define SKIP_TEST_IF_ARCH_DEBUG_VERSION_LESS_THAN(version) \
213 do { \
Petre-Ionut Tudorf1a45f72019-10-08 16:51:45 +0100214 uint32_t debug_ver = arch_get_debug_version(); \
Petre-Ionut Tudorf68ebdb2019-09-18 16:13:00 +0100215 \
Petre-Ionut Tudorf1a45f72019-10-08 16:51:45 +0100216 if (debug_ver < version) { \
Petre-Ionut Tudorf68ebdb2019-09-18 16:13:00 +0100217 tftf_testcase_printf("Debug version returned %d\n" \
218 "The required version is %d\n", \
Petre-Ionut Tudorf1a45f72019-10-08 16:51:45 +0100219 debug_ver, \
Petre-Ionut Tudorf68ebdb2019-09-18 16:13:00 +0100220 version); \
221 return TEST_RESULT_SKIPPED; \
222 } \
223 } while (0)
224
J-Alvesd708c032020-11-19 12:14:21 +0000225#define SKIP_TEST_IF_FFA_ENDPOINT_NOT_DEPLOYED(mb, ffa_uuid) \
J-Alvesf4743062020-10-27 19:39:57 +0000226 do { \
Daniel Boulbyce386b12022-03-29 18:36:36 +0100227 struct ffa_value sc_ret = ffa_partition_info_get(ffa_uuid); \
J-Alvesf4743062020-10-27 19:39:57 +0000228 ffa_rx_release(); \
Daniel Boulbyce386b12022-03-29 18:36:36 +0100229 if (ffa_func_id(sc_ret) == FFA_ERROR && \
230 ffa_error_code(sc_ret) == FFA_ERROR_INVALID_PARAMETER) { \
J-Alvesf4743062020-10-27 19:39:57 +0000231 tftf_testcase_printf("FFA endpoint not deployed!\n"); \
232 return TEST_RESULT_SKIPPED; \
Daniel Boulbyce386b12022-03-29 18:36:36 +0100233 } else if (ffa_func_id(sc_ret) != FFA_SUCCESS_SMC32) { \
J-Alvesf4743062020-10-27 19:39:57 +0000234 ERROR("ffa_partition_info_get failed!\n"); \
235 return TEST_RESULT_FAIL; \
236 } \
237 } while (0)
238
J-Alvesd708c032020-11-19 12:14:21 +0000239#define GET_TFTF_MAILBOX(mb) \
240 do { \
241 if (!get_tftf_mailbox(&mb)) { \
J-Alves08b78602023-01-24 15:54:50 +0000242 ERROR("Mailbox RXTX buffers not configured!\n"); \
nabkah01d5c67b82022-03-22 22:54:23 +0000243 return TEST_RESULT_FAIL; \
244 } \
245 } while (false);
246
J-Alves04469302021-01-21 14:48:13 +0000247#define CHECK_SPMC_TESTING_SETUP(ffa_major, ffa_minor, expected_uuids) \
J-Alvesd708c032020-11-19 12:14:21 +0000248 do { \
Max Shvetsov959be332021-03-16 14:18:13 +0000249 SKIP_TEST_IF_AARCH32(); \
J-Alvesd708c032020-11-19 12:14:21 +0000250 const size_t expected_uuids_size = \
251 sizeof(expected_uuids) / sizeof(struct ffa_uuid); \
J-Alves04469302021-01-21 14:48:13 +0000252 test_result_t ret = check_spmc_testing_set_up( \
J-Alvesd708c032020-11-19 12:14:21 +0000253 ffa_major, ffa_minor, expected_uuids, \
254 expected_uuids_size); \
255 if (ret != TEST_RESULT_SUCCESS) { \
256 return ret; \
257 } \
258 } while (false);
259
Manish V Badarkhe87c03d12021-07-06 22:57:11 +0100260#define SKIP_TEST_IF_TRBE_NOT_SUPPORTED() \
261 do { \
262 if (!get_armv9_0_trbe_support()) { \
263 tftf_testcase_printf("ARMv9-TRBE not supported\n"); \
264 return TEST_RESULT_SKIPPED; \
265 } \
266 } while (false)
267
Manish V Badarkhe2c518e52021-07-08 16:36:57 +0100268#define SKIP_TEST_IF_TRF_NOT_SUPPORTED() \
269 do { \
270 if (!get_armv8_4_trf_support()) { \
271 tftf_testcase_printf("ARMv8.4-TRF not supported\n"); \
272 return TEST_RESULT_SKIPPED; \
273 } \
274 } while (false)
275
Manish V Badarkhe6d0e1b62021-07-09 13:58:28 +0100276#define SKIP_TEST_IF_SYS_REG_TRACE_NOT_SUPPORTED() \
277 do { \
278 if (!get_armv8_0_sys_reg_trace_support()) { \
279 tftf_testcase_printf("ARMv8-system register" \
280 "trace not supported\n"); \
281 return TEST_RESULT_SKIPPED; \
282 } \
283 } while (false)
284
Manish V Badarkhe82e1a252022-01-04 13:45:31 +0000285#define SKIP_TEST_IF_AFP_NOT_SUPPORTED() \
286 do { \
287 if (!get_feat_afp_present()) { \
Manish V Badarkheb31bc752021-12-24 08:52:52 +0000288 tftf_testcase_printf("ARMv8.7-afp not supported\n"); \
Manish V Badarkhe82e1a252022-01-04 13:45:31 +0000289 return TEST_RESULT_SKIPPED; \
290 } \
291 } while (false)
292
Federico Recanati6328fb02022-01-14 15:48:16 +0100293#ifdef __aarch64__
Federico Recanatid3749b02022-01-14 15:44:45 +0100294#define SKIP_TEST_IF_PA_SIZE_LESS_THAN(n) \
295 do { \
296 static const unsigned int pa_range_bits_arr[] = { \
297 PARANGE_0000, PARANGE_0001, PARANGE_0010, PARANGE_0011,\
298 PARANGE_0100, PARANGE_0101, PARANGE_0110 \
299 }; \
300 if (pa_range_bits_arr[get_pa_range()] < n) { \
301 tftf_testcase_printf("PA size less than %d bit\n", n); \
302 return TEST_RESULT_SKIPPED; \
303 } \
304 } while (false)
Federico Recanati6328fb02022-01-14 15:48:16 +0100305#else
306#define SKIP_TEST_IF_PA_SIZE_LESS_THAN(n) \
307 do { \
308 return TEST_RESULT_SKIPPED; \
309 } while (false)
310#endif
Federico Recanatid3749b02022-01-14 15:44:45 +0100311
johpow018c3da8b2022-01-31 18:14:41 -0600312#define SKIP_TEST_IF_BRBE_NOT_SUPPORTED() \
313 do { \
314 if (!get_feat_brbe_support()) { \
315 tftf_testcase_printf("FEAT_BRBE not supported\n"); \
316 return TEST_RESULT_SKIPPED; \
317 } \
318 } while (false)
319
Manish V Badarkheb31bc752021-12-24 08:52:52 +0000320#define SKIP_TEST_IF_WFXT_NOT_SUPPORTED() \
321 do { \
322 if (!get_feat_wfxt_present()) { \
323 tftf_testcase_printf("ARMv8.7-WFxT not supported\n"); \
324 return TEST_RESULT_SKIPPED; \
325 } \
326 } while (false)
327
Juan Pablo Conde9303f4d2022-07-25 16:38:01 -0400328#define SKIP_TEST_IF_RNG_TRAP_NOT_SUPPORTED() \
329 do { \
330 if (!is_feat_rng_trap_present()) { \
331 tftf_testcase_printf("ARMv8.5-RNG_TRAP not" \
332 "supported\n"); \
333 return TEST_RESULT_SKIPPED; \
334 } \
335 } while (false)
336
Boyan Karatotev35e3ca02022-10-10 16:39:45 +0100337#define SKIP_TEST_IF_PMUV3_NOT_SUPPORTED() \
338 do { \
339 if (!get_feat_pmuv3_supported()) { \
340 tftf_testcase_printf("FEAT_PMUv3 not supported\n"); \
341 return TEST_RESULT_SKIPPED; \
342 } \
343 } while (false)
344
Jayanth Dodderi Chidanandb3ffd3c2023-02-13 12:15:11 +0000345#define SKIP_TEST_IF_SME_NOT_SUPPORTED() \
346 do { \
347 if(!is_feat_sme_supported()) { \
348 tftf_testcase_printf("FEAT_SME not supported\n"); \
349 return TEST_RESULT_SKIPPED; \
350 } \
351 } while (false)
352
Jayanth Dodderi Chidanand95d5d272023-01-16 17:58:47 +0000353#define SKIP_TEST_IF_SME2_NOT_SUPPORTED() \
354 do { \
355 if(!is_feat_sme2_supported()) { \
356 tftf_testcase_printf("FEAT_SME2 not supported\n"); \
357 return TEST_RESULT_SKIPPED; \
358 } \
359 } while (false)
360
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200361/* Helper macro to verify if system suspend API is supported */
362#define is_psci_sys_susp_supported() \
J-Alves8f08a052020-05-26 17:14:40 +0100363 (tftf_get_psci_feature_info(SMC_PSCI_SYSTEM_SUSPEND) \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200364 == PSCI_E_SUCCESS)
365
366/* Helper macro to verify if PSCI_STAT_COUNT API is supported */
367#define is_psci_stat_count_supported() \
J-Alves8f08a052020-05-26 17:14:40 +0100368 (tftf_get_psci_feature_info(SMC_PSCI_STAT_COUNT) \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200369 == PSCI_E_SUCCESS)
370
371/*
372 * Helper function to verify the system state is ready for system
373 * suspend. i.e., a single CPU is running and all other CPUs are powered off.
374 * Returns 1 if the system is ready to suspend, 0 otherwise.
375 */
376int is_sys_suspend_state_ready(void);
377
378/*
379 * Helper function to reset the system. This function shouldn't return.
380 * It is not marked with __dead to help the test to catch some error in
381 * TF
382 */
383void psci_system_reset(void);
384
385/*
386 * Helper function that enables/disables the mem_protect mechanism
387 */
388int psci_mem_protect(int val);
389
390
391/*
392 * Helper function to call PSCI MEM_PROTECT_CHECK
393 */
394int psci_mem_protect_check(uintptr_t addr, size_t size);
395
396
397/*
398 * Helper function to get a sentinel address that can be used to test mem_protect
399 */
400unsigned char *psci_mem_prot_get_sentinel(void);
401
402/*
403 * Helper function to memory map and unmap a region needed by a test.
404 *
405 * Return TEST_RESULT_FAIL if the memory could not be successfully mapped or
406 * unmapped. Otherwise, return the test functions's result.
407 */
408test_result_t map_test_unmap(const map_args_unmap_t *args,
409 test_function_arg_t test);
410
J-Alvesf1126f22020-11-02 17:28:20 +0000411/*
J-Alves08b78602023-01-24 15:54:50 +0000412 * Helper function to reset TFTF global mailbox for SPM related tests.
413 * It calls the FFA_RXTX_UNMAP interface, for the SPMC to drop the current
414 * address.
J-Alvesf1126f22020-11-02 17:28:20 +0000415 */
J-Alves08b78602023-01-24 15:54:50 +0000416bool reset_tftf_mailbox(void);
J-Alvesf1126f22020-11-02 17:28:20 +0000417
418/*
419 * Helper function to get TFTF global mailbox for SPM related tests.
J-Alves08b78602023-01-24 15:54:50 +0000420 * Allocates RX/TX buffer pair and calls FFA_RXTX_MAP interface, for the SPMC
421 * to map them into its own S1 translation.
422 * If this function is called, and the buffers had been priorly mapped, it
423 * sets 'mb' with the respective addresses.
J-Alvesf1126f22020-11-02 17:28:20 +0000424 */
425bool get_tftf_mailbox(struct mailbox_buffers *mb);
426
J-Alves04469302021-01-21 14:48:13 +0000427test_result_t check_spmc_testing_set_up(uint32_t ffa_version_major,
J-Alvesd708c032020-11-19 12:14:21 +0000428 uint32_t ffa_version_minor, const struct ffa_uuid *ffa_uuids,
429 size_t ffa_uuids_size);
430
J-Alvesd56c53c2021-07-01 16:32:16 +0100431/**
432 * Turn on all cpus to execute a test in all.
433 * - 'cpu_on_handler' should have the code containing the test.
434 * - 'cpu_booted' is used for notifying which cores the test has been executed.
435 * This should be used in the test executed by cpu_on_handler at the end of
436 * processing to make sure it complies with this function's implementation.
437 */
438test_result_t spm_run_multi_core_test(uintptr_t cpu_on_handler,
439 event_t *cpu_booted);
440
J-Alves952e1f72021-07-30 17:19:09 +0100441/**
J-Alves79c08f12021-10-27 15:15:16 +0100442 * Call FFA_RUN in the designated SP to make it reach the message loop.
443 * Used within CPU_ON handlers, to bring up the SP in the current core.
444 */
445bool spm_core_sp_init(ffa_id_t sp_id);
446
447/**
nabkah01d5c67b82022-03-22 22:54:23 +0000448 * Initializes the Mailbox for other SPM related tests that need to use
449 * RXTX buffers.
450 */
451bool mailbox_init(struct mailbox_buffers mb);
nabkah019ea16642022-03-01 19:39:59 +0000452/*
453 * Utility function to wait for all CPUs other than the caller to be
454 * OFF.
455 */
456void wait_for_non_lead_cpus(void);
457
458/*
459 * Utility function to wait for a given CPU other than the caller to be
460 * OFF.
461 */
462void wait_for_core_to_turn_off(unsigned int mpidr);
AlexeiFedorov2f30f102023-03-13 19:37:46 +0000463
464/* Generate 64-bit random number */
465unsigned long long rand64(void);
466
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200467#endif /* __TEST_HELPERS_H__ */