summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-08-22 19:56:29 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-08-22 19:56:29 -0700
commit2f5c62e75e9476562b6dd9c8caeda24d9113ff98 (patch)
tree72e934b19e5b9eafd2c2bf8c07cffbca24842f25 /include/uapi/linux
parente915e55097538173a0df0d0d6fbfaf8cfd54a94d (diff)
parent5a713f928febb6517d9888eb9a18ebfa309c24b9 (diff)
Merge "soc: qcom: Add hypervisor abstraction driver" into dev/msm-4.4-8996au
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/Kbuild1
-rw-r--r--include/uapi/linux/habmm.h143
2 files changed, 144 insertions, 0 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 3d912dd57c08..b041334338f9 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -528,3 +528,4 @@ header-y += ipa_qmi_service_v01.h
header-y += rmnet_ipa_fd_ioctl.h
header-y += msm_ipa.h
header-y += smcinvoke.h
+header-y += habmm.h
diff --git a/include/uapi/linux/habmm.h b/include/uapi/linux/habmm.h
new file mode 100644
index 000000000000..902bd35ee474
--- /dev/null
+++ b/include/uapi/linux/habmm.h
@@ -0,0 +1,143 @@
+#ifndef HABMM_H
+#define HABMM_H
+
+#include <linux/types.h>
+
+struct hab_send {
+ __u64 data;
+ __s32 vcid;
+ __u32 sizebytes;
+ __u32 flags;
+};
+
+struct hab_recv {
+ __u64 data;
+ __s32 vcid;
+ __u32 sizebytes;
+ __u32 flags;
+};
+
+struct hab_open {
+ __s32 vcid;
+ __u32 mmid;
+ __u32 timeout;
+ __u32 flags;
+};
+
+struct hab_close {
+ __s32 vcid;
+ __u32 flags;
+};
+
+struct hab_export {
+ __u64 buffer;
+ __s32 vcid;
+ __u32 sizebytes;
+ __u32 exportid;
+ __u32 flags;
+};
+
+struct hab_import {
+ __u64 index;
+ __u64 kva;
+ __s32 vcid;
+ __u32 sizebytes;
+ __u32 exportid;
+ __u32 flags;
+};
+
+struct hab_unexport {
+ __s32 vcid;
+ __u32 exportid;
+ __u32 flags;
+};
+
+struct hab_unimport {
+ __s32 vcid;
+ __u32 exportid;
+ __u64 kva;
+ __u32 flags;
+};
+
+#define HAB_IOC_TYPE 0x0A
+#define HAB_MAX_MSG_SIZEBYTES 0x1000
+#define HAB_MAX_EXPORT_SIZE 0x8000000
+
+#define HAB_MMID_CREATE(major, minor) ((major&0xFFFF) | ((minor&0xFF)<<16))
+
+#define MM_AUD_START 100
+#define MM_AUD_1 101
+#define MM_AUD_2 102
+#define MM_AUD_3 103
+#define MM_AUD_4 104
+#define MM_AUD_END 105
+
+#define MM_CAM_START 200
+#define MM_CAM 201
+#define MM_CAM_END 202
+
+#define MM_DISP_START 300
+#define MM_DISP_1 301
+#define MM_DISP_2 302
+#define MM_DISP_3 303
+#define MM_DISP_4 304
+#define MM_DISP_5 305
+#define MM_DISP_END 306
+
+#define MM_GFX_START 400
+#define MM_GFX 401
+#define MM_GFX_END 402
+
+#define MM_VID_START 500
+#define MM_VID 501
+#define MM_VID_END 502
+
+#define MM_MISC_START 600
+#define MM_MISC 601
+#define MM_MISC_END 602
+
+#define MM_QCPE_START 700
+#define MM_QCPE_VM1 701
+#define MM_QCPE_VM2 702
+#define MM_QCPE_VM3 703
+#define MM_QCPE_VM4 704
+#define MM_QCPE_END 705
+#define MM_ID_MAX 706
+
+#define HABMM_SOCKET_OPEN_FLAGS_SINGLE_BE_SINGLE_FE 0x00000000
+#define HABMM_SOCKET_OPEN_FLAGS_SINGLE_BE_SINGLE_DOMU 0x00000001
+#define HABMM_SOCKET_OPEN_FLAGS_SINGLE_BE_MULTI_DOMUS 0x00000002
+
+#define HABMM_SOCKET_SEND_FLAGS_NON_BLOCKING 0x00000001
+
+#define HABMM_SOCKET_RECV_FLAGS_NON_BLOCKING 0x00000001
+
+#define HABMM_EXP_MEM_TYPE_DMA 0x00000001
+
+#define HABMM_IMPORT_FLAGS_CACHED 0x00000001
+
+#define IOCTL_HAB_SEND \
+ _IOW(HAB_IOC_TYPE, 0x2, struct hab_send)
+
+#define IOCTL_HAB_RECV \
+ _IOWR(HAB_IOC_TYPE, 0x3, struct hab_recv)
+
+#define IOCTL_HAB_VC_OPEN \
+ _IOWR(HAB_IOC_TYPE, 0x4, struct hab_open)
+
+#define IOCTL_HAB_VC_CLOSE \
+ _IOW(HAB_IOC_TYPE, 0x5, struct hab_close)
+
+#define IOCTL_HAB_VC_EXPORT \
+ _IOWR(HAB_IOC_TYPE, 0x6, struct hab_export)
+
+#define IOCTL_HAB_VC_IMPORT \
+ _IOWR(HAB_IOC_TYPE, 0x7, struct hab_import)
+
+#define IOCTL_HAB_VC_UNEXPORT \
+ _IOW(HAB_IOC_TYPE, 0x8, struct hab_unexport)
+
+#define IOCTL_HAB_VC_UNIMPORT \
+ _IOW(HAB_IOC_TYPE, 0x9, struct hab_unimport)
+
+#endif /* HABMM_H */