summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-08-26 14:48:22 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-08-26 14:48:22 -0700
commit07dde62a739d04aed66cd055cb3d83632c70751c (patch)
tree2fc19b9d1d9ab6629bcf6ee9480ed5f41d686014 /include
parent30f32fdd4e42236d31256d542f520a4456533150 (diff)
parent879d57ac667a629b2b0e4790a87f99b0b0fb2644 (diff)
Merge "msm: mink: Adding SMCInvoke Driver"
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/Kbuild1
-rw-r--r--include/uapi/linux/smcinvoke.h45
2 files changed, 46 insertions, 0 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 32172c8f7d37..0bac6947a1cb 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -520,3 +520,4 @@ header-y += android_pmem.h
header-y += ipa_qmi_service_v01.h
header-y += rmnet_ipa_fd_ioctl.h
header-y += msm_ipa.h
+header-y += smcinvoke.h
diff --git a/include/uapi/linux/smcinvoke.h b/include/uapi/linux/smcinvoke.h
new file mode 100644
index 000000000000..1dc9a63c15e5
--- /dev/null
+++ b/include/uapi/linux/smcinvoke.h
@@ -0,0 +1,45 @@
+#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_ */