1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2014, STMicroelectronics International N.V.
4  * All rights reserved.
5  */
6 
7 #ifndef USER_TA_HEADER_DEFINES_H
8 #define USER_TA_HEADER_DEFINES_H
9 
10 #include <stdint.h>
11 #include <ta_os_test.h>
12 #include <user_ta_header.h>
13 
14 #define TA_UUID TA_OS_TEST_UUID
15 
16 #define TA_FLAGS (TA_FLAG_USER_MODE | TA_FLAG_EXEC_DDR | \
17 		  TA_FLAG_MULTI_SESSION)
18 
19 #define TA_STACK_SIZE (8 * 1024)
20 #define TA_DATA_SIZE (900 * 1024)
21 
22 #define TA_CURRENT_TA_EXT_PROPERTIES \
23 	{ "myprop.true", USER_TA_PROP_TYPE_BOOL, &(const bool){ true } }, \
24 	{ "myprop.42",   USER_TA_PROP_TYPE_U32,  &(const uint32_t){ 42 } }, \
25 	{ "myprop.123",  USER_TA_PROP_TYPE_UUID, \
26 		&(const TEE_UUID) {1, 2, 3 } }, \
27 	{ "myprop.1234", USER_TA_PROP_TYPE_IDENTITY, \
28 		&(const TEE_Identity) { 1, { 2, 3, 4 } } }, \
29 	{ "myprop.hello", USER_TA_PROP_TYPE_STRING, \
30 		"hello property, larger than 80 characters, so that it checks that it is not truncated by anything in the source code which may be wrong" }, \
31 	{ "myprop.binaryblock", USER_TA_PROP_TYPE_BINARY_BLOCK, \
32 	   "SGVsbG8gd29ybGQh" }, \
33 	{ "myprop.binaryblock.1byte-ones", USER_TA_PROP_TYPE_BINARY_BLOCK, \
34 	   "/w==" }, \
35 	{ "myprop.binaryblock.2byte-ones", USER_TA_PROP_TYPE_BINARY_BLOCK, \
36 	   "//8=" }, \
37 	{ "myprop.binaryblock.3byte-ones", USER_TA_PROP_TYPE_BINARY_BLOCK, \
38 	   "////" }, \
39 	{ "myprop.binaryblock.4byte-ones", USER_TA_PROP_TYPE_BINARY_BLOCK, \
40 	   "/////w==" }, \
41 	{ "myprop.binaryblock.empty1", USER_TA_PROP_TYPE_BINARY_BLOCK, \
42 	   "" }, \
43 	{ "myprop.binaryblock.empty2", USER_TA_PROP_TYPE_BINARY_BLOCK, \
44 	   "====" }, \
45 	{ "myprop.binaryblock.empty3", USER_TA_PROP_TYPE_BINARY_BLOCK, \
46 	   "-%@&" /* Only invalid code */},
47 #endif
48