blob: 8e838cc7d3a0e2664cc8b7af410a3582552597d9 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001/*
Max Shvetsov103e0562021-02-04 16:58:31 +00002 * Copyright (c) 2017-2021, Arm Limited. All rights reserved.
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz1486f3b2018-06-26 10:30:10 +01007#ifndef CACTUS_TESTS_H
8#define CACTUS_TESTS_H
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02009
Max Shvetsov103e0562021-02-04 16:58:31 +000010#include <spm_common.h>
Max Shvetsovc32f4782020-06-23 09:41:15 +010011
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020012/*
13 * Test functions
14 */
15
16/*
J-Alves9f6f0142020-06-17 15:37:59 +010017 * Test to FFA interfaces.
18 */
J-Alves63cdaa72020-10-08 17:22:45 +010019void ffa_memory_management_test(struct mailbox_buffers *mb, ffa_vm_id_t vm_id,
20 ffa_vm_id_t sender, uint32_t mem_func,
21 uint64_t handle);
22
Max Shvetsovc32f4782020-06-23 09:41:15 +010023void ffa_tests(struct mailbox_buffers *mb);
J-Alves9f6f0142020-06-17 15:37:59 +010024
25/*
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020026 * Test other things like the version number returned by SPM.
27 */
28void misc_tests(void);
29
30/*
31 * The Arm TF is responsible for setting up system registers on behalf of the
32 * Secure Partition. For example, TF is supposed to allow Secure Partitions to
33 * perform cache maintenance operations (by setting the SCTLR_EL1.UCI bit).
34 *
35 * This function attempts to verify that we indeed have access to these system
36 * features from S-EL0. These tests report their results on the UART. They do
37 * not recover from a failure : when an error is encountered they will most
38 * likely trigger an exception into S-EL1.
39 */
40void system_setup_tests(void);
41
42/*
43 * Exercise the SP_MEMORY_ATTRIBUTES_SET_AARCH64 SMC interface. A variety of
44 * valid and invalid requests to change memory attributes are tested.
45 *
46 * These tests report their results on the UART. They do not recover from a
47 * failure : when an error is encountered they endlessly loop.
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020048 */
Antonio Nino Diaz1486f3b2018-06-26 10:30:10 +010049void mem_attr_changes_tests(void);
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020050
Antonio Nino Diaz1486f3b2018-06-26 10:30:10 +010051#endif /* CACTUS_TESTS_H */