Antonio Nino Diaz | f2218e7 | 2019-03-19 10:59:11 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef __CACTUS_TESTS_H__ |
| 8 | #define __CACTUS_TESTS_H__ |
| 9 | |
| 10 | #include <secure_partition.h> |
| 11 | |
| 12 | /* |
| 13 | * Test functions |
| 14 | */ |
| 15 | |
| 16 | /* |
| 17 | * Test other things like the version number returned by SPM. |
| 18 | */ |
| 19 | void misc_tests(void); |
| 20 | |
| 21 | /* |
| 22 | * The Arm TF is responsible for setting up system registers on behalf of the |
| 23 | * Secure Partition. For example, TF is supposed to allow Secure Partitions to |
| 24 | * perform cache maintenance operations (by setting the SCTLR_EL1.UCI bit). |
| 25 | * |
| 26 | * This function attempts to verify that we indeed have access to these system |
| 27 | * features from S-EL0. These tests report their results on the UART. They do |
| 28 | * not recover from a failure : when an error is encountered they will most |
| 29 | * likely trigger an exception into S-EL1. |
| 30 | */ |
| 31 | void system_setup_tests(void); |
| 32 | |
| 33 | /* |
| 34 | * Exercise the SP_MEMORY_ATTRIBUTES_SET_AARCH64 SMC interface. A variety of |
| 35 | * valid and invalid requests to change memory attributes are tested. |
| 36 | * |
| 37 | * These tests report their results on the UART. They do not recover from a |
| 38 | * failure : when an error is encountered they endlessly loop. |
| 39 | * |
| 40 | * The argument is a pointer to a secure_partition_boot_info_t struct that has |
| 41 | * been filled by EL3 with the information about the memory map of this Secure |
| 42 | * Partition. |
| 43 | */ |
| 44 | void mem_attr_changes_tests(const secure_partition_boot_info_t *boot_info); |
| 45 | |
| 46 | #endif /* __CACTUS_TESTS_H__ */ |