代码拉取完成,页面将自动刷新
同步操作将从 openEuler/itrustee_tzdriver 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* tc_ns_client.h
*
* data structure declaration for nonsecure world
*
* 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 TC_NS_CLIENT_H
#define TC_NS_CLIENT_H
#include <linux/types.h>
#include <linux/version.h>
#define UUID_LEN 16
#define PARAM_NUM 4
#define ADDR_TRANS_NUM 32
#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)
#ifndef ZERO_SIZE_PTR
#define ZERO_SIZE_PTR ((void *)16)
#define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= (unsigned long)ZERO_SIZE_PTR)
#endif
#if (KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE)
#define mm_sem_lock(mm) (mm)->mmap_lock
#else
#define mm_sem_lock(mm) (mm)->mmap_sem
#endif
struct tc_ns_client_login {
__u32 method;
__u32 mdata;
};
union tc_ns_client_param {
struct {
__u32 buffer;
__u32 buffer_h_addr;
__u32 offset;
__u32 h_offset;
__u32 size_addr;
__u32 size_h_addr;
} memref;
struct {
__u32 a_addr;
__u32 a_h_addr;
__u32 b_addr;
__u32 b_h_addr;
} value;
};
struct tc_ns_client_return {
int code;
__u32 origin;
};
struct tc_ns_client_context {
unsigned char uuid[UUID_LEN];
__u32 session_id;
__u32 cmd_id;
struct tc_ns_client_return returns;
struct tc_ns_client_login login;
union tc_ns_client_param params[PARAM_NUM];
__u32 param_types;
__u8 started;
__u32 calling_pid;
unsigned int file_size;
union {
char *file_buffer;
struct {
uint32_t file_addr;
uint32_t file_h_addr;
} memref;
};
};
struct tc_ns_client_time {
uint32_t seconds;
uint32_t millis;
};
struct tc_ns_tee_info {
uint16_t tzdriver_version_major;
uint16_t tzdriver_version_minor;
uint32_t reserved[15];
};
enum secfile_type_t {
LOAD_TA = 0,
LOAD_SERVICE,
LOAD_LIB,
LOAD_DYNAMIC_DRV,
LOAD_PATCH,
LOAD_TYPE_MAX,
};
struct sec_file_info {
enum secfile_type_t secfile_type;
uint32_t file_size;
int32_t sec_load_err;
};
struct load_secfile_ioctl_struct {
struct sec_file_info sec_file_info;
unsigned char uuid[UUID_LEN];
union {
char *file_buffer;
struct {
uint32_t file_addr;
uint32_t file_h_addr;
} memref;
};
}__attribute__((packed));
#ifdef CROSS_DOMAIN_PERF
enum posix_proxy_shm_type {
CTRL_TASKLET_BUFF = 1,
DATA_TASKLET_BUFF
};
struct posix_proxy_ioctl_args {
enum posix_proxy_shm_type shm_type;
uint32_t buffer_size;
union {
void *buffer;
unsigned long long addr;
};
};
#endif
struct agent_ioctl_args {
uint32_t id;
uint32_t buffer_size;
union {
void *buffer;
unsigned long long addr;
};
};
struct tc_ns_client_crl {
union {
uint8_t *buffer;
struct {
uint32_t buffer_addr;
uint32_t buffer_h_addr;
} memref;
};
uint32_t size;
};
#ifdef CONFIG_LOG_POOL_ENABLE
struct tc_ns_log_pool {
uint64_t addr;
uint64_t size;
};
#endif
#define MAX_SHA_256_SZ 32
#define TC_NS_CLIENT_IOCTL_SES_OPEN_REQ \
_IOW(TC_NS_CLIENT_IOC_MAGIC, 1, struct tc_ns_client_context)
#define TC_NS_CLIENT_IOCTL_SES_CLOSE_REQ \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 2, struct tc_ns_client_context)
#define TC_NS_CLIENT_IOCTL_SEND_CMD_REQ \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 3, struct tc_ns_client_context)
#define TC_NS_CLIENT_IOCTL_SHRD_MEM_RELEASE \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 4, unsigned int)
#define TC_NS_CLIENT_IOCTL_WAIT_EVENT \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 5, unsigned int)
#define TC_NS_CLIENT_IOCTL_SEND_EVENT_RESPONSE \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 6, unsigned int)
#define TC_NS_CLIENT_IOCTL_REGISTER_AGENT \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 7, struct agent_ioctl_args)
#define TC_NS_CLIENT_IOCTL_UNREGISTER_AGENT \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 8, unsigned int)
#define TC_NS_CLIENT_IOCTL_LOAD_APP_REQ \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 9, struct load_secfile_ioctl_struct)
#define TC_NS_CLIENT_IOCTL_NEED_LOAD_APP \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 10, struct tc_ns_client_context)
#define TC_NS_CLIENT_IOCTL_ALLOC_EXCEPTING_MEM \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 12, unsigned int)
#define TC_NS_CLIENT_IOCTL_CANCEL_CMD_REQ \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 13, struct tc_ns_client_context)
#define TC_NS_CLIENT_IOCTL_LOGIN \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 14, int)
#define TC_NS_CLIENT_IOCTL_TUI_EVENT \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 16, int)
#define TC_NS_CLIENT_IOCTL_SYC_SYS_TIME \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 17, struct tc_ns_client_time)
#define TC_NS_CLIENT_IOCTL_SET_NATIVECA_IDENTITY \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 18, int)
#define TC_NS_CLIENT_IOCTL_LOAD_TTF_FILE_AND_NOTCH_HEIGHT \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 19, unsigned int)
#define TC_NS_CLIENT_IOCTL_LATEINIT \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 20, unsigned int)
#define TC_NS_CLIENT_IOCTL_GET_TEE_VERSION \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 21, unsigned int)
#define TC_NS_CLIENT_IOCTL_UPDATE_TA_CRL\
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 22, struct tc_ns_client_crl)
#ifdef CONFIG_LOG_POOL_ENABLE
#define TC_NS_CLIENT_IOCTL_GET_LOG_POOL \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 23, struct tc_ns_log_pool)
#endif
#ifdef CONFIG_TEE_TELEPORT_SUPPORT
#define TC_NS_CLIENT_IOCTL_PORTAL_REGISTER \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 24, struct agent_ioctl_args)
#define TC_NS_CLIENT_IOCTL_PORTAL_WORK \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 25, struct agent_ioctl_args)
#ifdef CROSS_DOMAIN_PERF
#define TC_NS_CLIENT_IOCTL_POSIX_PROXY_REGISTER_TASKLET \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 27, struct posix_proxy_ioctl_args)
#endif
#endif
#define TC_NS_CLIENT_IOCTL_GET_TEE_INFO \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 26, struct tc_ns_tee_info)
#define TC_NS_CLIENT_IOCTL_CHECK_CCOS \
_IOWR(TC_NS_CLIENT_IOC_MAGIC, 32, unsigned int)
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。