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 LIBAGENT_BASE_SECFILE_LOAD_AGENT_H 13 #define LIBAGENT_BASE_SECFILE_LOAD_AGENT_H 14 15 #include <stdint.h> 16 #include <stdbool.h> 17 #include <tee_defines.h> 18 19 #define LIB_NAME_MAX 64 20 21 struct ta_unlink_lib_msg { 22 char lib_name[LIB_NAME_MAX]; 23 bool is_drvlib; 24 }; 25 26 struct tee_srvc_recv_msg { 27 TEE_Result ret_val; 28 uint32_t srvc_pid; 29 bool is_already_run; 30 }; 31 32 int32_t tee_load_sec_lib(const char *lib_name, bool is_drvlib); 33 int32_t tee_load_sec_ta(const TEE_UUID *uuid); 34 void tee_unlink_lib(const char *lib_name, bool is_drvlib); 35 TEE_Result tee_bind_tee_service(const char *srvc_name, uint32_t *srvc_pid, bool *is_already_run); 36 void tee_unbind_tee_service(const char *srvc_name); 37 38 #endif 39