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 #ifndef DRVMGR_SRC_DRV_IPC_MGR_H 13 #define DRVMGR_SRC_DRV_IPC_MGR_H 14 15 #include <stdint.h> 16 #include <tee_defines.h> 17 #include "drv_dispatch.h" 18 #include "drv_dyn_conf_mgr.h" 19 #include "task_mgr.h" 20 21 #define DRV_IPC_MAX_TIMEOUT 2000 /* timeout is ms, 2000ms means 2s */ 22 23 int64_t drv_open_handle(const struct tee_drv_param *params, const struct task_node *node, uint64_t perm); 24 int64_t call_drv_close(uint32_t taskid, const struct tee_uuid *caller_uuid, int64_t fd, cref_t channel); 25 26 #ifdef TEE_SUPPORT_DRV_FD_DUMP 27 void call_drv_dump(cref_t channel); 28 #endif 29 30 #endif 31