• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 Huawei Technologies Co., Ltd.
3  * Decription: function declaration for alloc global operation and pass params to TEE.
4  *
5  * This software is licensed under the terms of the GNU General Public
6  * License version 2, as published by the Free Software Foundation, and
7  * may be copied, distributed, and modified under those terms.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  */
14 #ifndef GP_OPS_H
15 #define GP_OPS_H
16 #include "tc_ns_client.h"
17 #include "teek_ns_client.h"
18 
19 struct pagelist_info {
20 	uint64_t page_num;
21 	uint64_t page_size;
22 	uint64_t sharedmem_offset;
23 	uint64_t sharedmem_size;
24 };
25 
26 int write_to_client(void __user *dest, size_t dest_size,
27 	const void *src, size_t size, uint8_t kernel_api);
28 int read_from_client(void *dest, size_t dest_size,
29 	const void __user *src, size_t size, uint8_t kernel_api);
30 bool tc_user_param_valid(struct tc_ns_client_context *client_context,
31 	unsigned int index);
32 int tc_client_call(const struct tc_call_params *call_params);
33 bool is_tmp_mem(uint32_t param_type);
34 bool is_ref_mem(uint32_t param_type);
35 bool is_val_param(uint32_t param_type);
36 
37 #endif
38