• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 Huawei Technologies Co., Ltd.
3  * Licensed under the Mulan PSL v2.
4  * You can use this software according to the terms and conditions of the Mulan PSL v2.
5  * You may obtain a copy of Mulan PSL v2 at:
6  * http://license.coscl.org.cn/MulanPSL2
7  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
8  * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
9  * PURPOSE.
10  * See the Mulan PSL v2 for more details.
11  */
12 
13 #ifndef __COMMON_TEST_H__
14 #define __COMMON_TEST_H__
15 
16 #include <stdint.h>
17 #include <tee_client_type.h>
18 
19 #ifdef __cplusplus
20 #include <string>
21 #endif
22 
23 #define TEST_STR_LEN 256
24 #define TEST_SIZE512 512
25 #define SIZE16k ((16) * (1024))
26 // now not support 9999,so 9999 is invalid
27 #define TEEC_MEM_INVALID 9999
28 #define OFFSET100 100
29 #define OFFSET200 200
30 #define OFFSET300 300
31 #define SIZE10 10
32 #define SIZE20 20
33 
34 #define CLIENTAPI_UUID_1                                   \
35     {                                                      \
36         0x534d4152, 0x542d, 0x4353,                        \
37         {                                                  \
38             0xb9, 0x19, 0xd3, 0x01, 0x6a, 0x17, 0x1f, 0xc5 \
39         }                                                  \
40     }
41 
42 #define UUID_TA_NOT_EXIST                                  \
43     {                                                      \
44         0x534D4152, 0x542D, 0x4353,                        \
45         {                                                  \
46             0x4C, 0x54, 0x2D, 0x54, 0x41, 0x2D, 0x53, 0x5B \
47         }                                                  \
48     }
49 
50 typedef struct SessionContextPacket {
51     TEEC_Context *context;
52     TEEC_Session *session;
53     TEEC_Operation *operation;
54     TEEC_SharedMemory *sharedMem;
55     uint32_t id;
56     TEEC_Result ret;
57 } DatePacket;
58 #endif
59