1 /* 2 * Copyright (c) 2017, Linaro Limited 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright notice, 9 * this list of conditions and the following disclaimer. 10 * 11 * 2. Redistributions in binary form must reproduce the above copyright notice, 12 * this list of conditions and the following disclaimer in the documentation 13 * and/or other materials provided with the distribution. 14 * 15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28 #ifndef __PTA_INVOKE_TESTS_H 29 #define __PTA_INVOKE_TESTS_H 30 31 #define PTA_INVOKE_TESTS_UUID \ 32 { 0xd96a5b40, 0xc3e5, 0x21e3, \ 33 { 0x87, 0x94, 0x10, 0x02, 0xa5, 0xd5, 0xc6, 0x1b } } 34 35 /* Trace some hello string. Parameters are not used/checked. */ 36 #define PTA_INVOKE_TESTS_CMD_TRACE 0 37 38 /* 39 * Types of parameter drives the test sequences: 40 * - test on value parameters 41 * - test on SHM memory reference parameters 42 * - test on SDP memory reference parameters 43 */ 44 #define PTA_INVOKE_TESTS_CMD_PARAMS 1 45 46 /* Run some core internal tests. Parameters are not used/checked. */ 47 #define PTA_INVOKE_TESTS_CMD_SELF_TESTS 2 48 49 /* 50 * Secure data path: check that pTA can copy data from non-secure shared memory 51 * to SDP secure memory 52 * 53 * [in] memref[0] source (non-secure shared memory) 54 * [out] memref[1] destination (SDP secure memory) 55 */ 56 #define PTA_INVOKE_TESTS_CMD_COPY_NSEC_TO_SEC 3 57 58 /* 59 * Secure data path: check that pTA can read data from SDP secure memory and 60 * write it back. Data are processed so that client check the expected 61 * read/write sequence succeed. 62 * 63 * [in/out] memref[0] SDP secure buffer to read from and write to 64 */ 65 #define PTA_INVOKE_TESTS_CMD_READ_MODIFY_SEC 4 66 67 /* 68 * Secure data path: check that pTA can copy data from SDP secure memory to 69 * non-secure shared memory 70 * 71 * [in] memref[0] source (SDP secure memory) 72 * [out] memref[1] destination (non-secure shared memory) 73 */ 74 #define PTA_INVOKE_TESTS_CMD_COPY_SEC_TO_NSEC 5 75 76 /* 77 * Tests FS hash-tree corner cases in error handling 78 */ 79 #define PTA_INVOKE_TESTS_CMD_FS_HTREE 6 80 81 /* 82 * Tests mutex 83 * 84 * [in] value[0].a Test function PTA_MUTEX_TEST_* 85 * [in] value[0].b delay number 86 * [out] value[1].a before lock concurency 87 * [out] value[1].b during lock concurency 88 */ 89 #define PTA_MUTEX_TEST_WRITER 0 90 #define PTA_MUTEX_TEST_READER 1 91 #define PTA_INVOKE_TESTS_CMD_MUTEX 7 92 93 #endif /*__PTA_INVOKE_TESTS_H*/ 94 95