android_kernel_oneplus_msm8998/include/uapi/linux/smcinvoke.h
Dinesh K Garg 879d57ac66 msm: mink: Adding SMCInvoke Driver
SMCInvoke driver is a misc driver to support communication between
secure and non-secure world, based on new capability based model.
Earlier, QSEECom driver had several problems such as exposing many
interfaces to accomplish various tasks on secure world side. Ideally,
driver should work as transparent as possible and provide just
tunnel to communicate between secure and non secure world. SMCInvoke
driver aims to achieve that.

Change-Id: I439f8ad817ba66210c934115979c276577194c11
Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
2016-08-20 19:04:33 -07:00

45 lines
922 B
C

#ifndef _UAPI_SMCINVOKE_H_
#define _UAPI_SMCINVOKE_H_
#include <linux/types.h>
#include <linux/ioctl.h>
#define SMCINVOKE_USERSPACE_OBJ_NULL -1
struct smcinvoke_buf {
uint64_t addr;
uint64_t size;
};
struct smcinvoke_obj {
int64_t fd;
int64_t reserved;
};
union smcinvoke_arg {
struct smcinvoke_buf b;
struct smcinvoke_obj o;
};
/*
* struct smcinvoke_cmd_req: This structure is transparently sent to TEE
* @op - Operation to be performed
* @counts - number of aruments passed
* @result - result of invoke operation
* @argsize - size of each of arguments
* @args - args is pointer to buffer having all arguments
*/
struct smcinvoke_cmd_req {
uint32_t op;
uint32_t counts;
int32_t result;
uint32_t argsize;
uint64_t __user args;
};
#define SMCINVOKE_IOC_MAGIC 0x98
#define SMCINVOKE_IOCTL_INVOKE_REQ \
_IOWR(SMCINVOKE_IOC_MAGIC, 1, struct smcinvoke_cmd_req)
#endif /* _UAPI_SMCINVOKE_H_ */