11 Star 29 Fork 27

openEuler/itrustee_tzdriver

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
teek_client_api.h 2.95 KB
一键复制 编辑 原始数据 按行查看 历史
wangkun 提交于 2023-07-06 17:11 . fix compile tee_upgrade issue
/*
* teek_client_api.h
*
* function declaration for libteec interface for kernel CA.
*
* Copyright (c) 2012-2022 Huawei Technologies Co., Ltd.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef TEEK_CLIENT_API_H
#define TEEK_CLIENT_API_H
#include "teek_client_type.h"
#include "teek_ns_client.h"
#define TEEC_PARAM_TYPES(param0_type, param1_type, param2_type, param3_type) \
((param3_type) << 12 | (param2_type) << 8 | \
(param1_type) << 4 | (param0_type))
#define TEEC_PARAM_TYPE_GET(param_types, index) \
(((param_types) >> ((index) << 2)) & 0x0F)
#define TEEC_VALUE_UNDEF 0xFFFFFFFF
/*
* for history reason, we supply two set interface
* first set is uncapitalized and satisfies kernel code rule
* second set is capitalized for compatibility
*/
int teek_is_agent_alive(unsigned int agent_id);
uint32_t teek_initialize_context(const char *name,
struct teec_context *context);
void teek_finalize_context(struct teec_context *context);
uint32_t teek_open_session(struct teec_context *context,
struct teec_session *session,
const struct teec_uuid *destination,
uint32_t connection_method,
const void *connection_data,
const struct teec_operation *operation,
uint32_t *return_origin);
void teek_close_session(struct teec_session *session);
uint32_t teek_send_secfile(struct teec_session *session,
const char *file_buffer, unsigned int file_size);
TEEC_Result TEEK_SendSecfile(TEEC_Session *session,
const char *file_buffer, unsigned int file_size);
uint32_t teek_invoke_command(struct teec_session *session,
uint32_t cmd_id, struct teec_operation *operation,
uint32_t *return_origin);
uint32_t teek_register_shared_memory(struct teec_context *context,
struct teec_sharedmemory *sharedmem);
uint32_t teek_allocate_shared_memory(struct teec_context *context,
struct teec_sharedmemory *sharedmem);
void teek_release_shared_memory(struct teec_sharedmemory *sharedmem);
void teek_request_cancellation(struct teec_operation *operation);
int TEEK_IsAgentAlive(unsigned int agent_id);
TEEC_Result TEEK_InitializeContext(const char *name, TEEC_Context *context);
void TEEK_FinalizeContext(TEEC_Context *context);
TEEC_Result TEEK_OpenSession(TEEC_Context *context,
TEEC_Session *session,
const TEEC_UUID *destination,
uint32_t connectionMethod,
const void *connectionData,
TEEC_Operation *operation,
uint32_t *returnOrigin);
void TEEK_CloseSession(TEEC_Session *session);
TEEC_Result TEEK_InvokeCommand(TEEC_Session *session,
uint32_t commandID,
TEEC_Operation *operation,
uint32_t *returnOrigin);
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler/itrustee_tzdriver.git
git@gitee.com:openeuler/itrustee_tzdriver.git
openeuler
itrustee_tzdriver
itrustee_tzdriver
master

搜索帮助