• 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 GTASK_TASK_ADAPTOR_PUB_H
14 #define GTASK_TASK_ADAPTOR_PUB_H
15 
16 #include <stddef.h>
17 
18 void task_adapt_init(void);
19 int32_t task_adapt_set_caller_info(uint32_t cmd_id, uint32_t task_id,
20     const uint8_t *msg_buf, uint32_t msg_size);
21 bool is_internal_task_by_task_id(uint32_t task_id);
22 bool is_internal_task_by_uuid(const TEE_UUID *uuid);
23 void task_adapt_crash_callback(uint32_t task_id);
24 void task_adapt_register_ta(uint32_t ta_task_id, uint32_t userid, bool ssa_enum_enable, const TEE_UUID *uuid);
25 void task_adapt_unregister_ta(const TEE_UUID *ta_uuid, uint32_t ta_task_id);
26 bool is_service_agent_request(uint32_t agent_task_id, uint32_t *caller_task_id, uint32_t **agent_status);
27 bool is_agent_response(uint32_t agent_id, uint32_t *agent_task_id, uint32_t *caller_task_id,
28                        uint32_t **agent_status);
29 bool check_system_agent_permission(uint32_t task_id, uint32_t agent_id);
30 void task_adapt_register_agent(uint32_t agent_id);
31 void fs_agent_late_init(void);
32 void task_adapt_ta_create(uint32_t pid, const TEE_UUID *uuid);
33 void task_adapt_ta_release(const TEE_UUID *uuid);
34 
35 #endif
36