• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef __QCOM_FASTRPC_H__
20 #define __QCOM_FASTRPC_H__
21 #include <linux/types.h>
22 #define FASTRPC_IOCTL_ALLOC_DMA_BUFF _IOWR('R', 1, struct fastrpc_alloc_dma_buf)
23 #define FASTRPC_IOCTL_FREE_DMA_BUFF _IOWR('R', 2, __u32)
24 #define FASTRPC_IOCTL_INVOKE _IOWR('R', 3, struct fastrpc_invoke)
25 #define FASTRPC_IOCTL_INIT_ATTACH _IO('R', 4)
26 #define FASTRPC_IOCTL_INIT_CREATE _IOWR('R', 5, struct fastrpc_init_create)
27 #define FASTRPC_IOCTL_MMAP _IOWR('R', 6, struct fastrpc_req_mmap)
28 #define FASTRPC_IOCTL_MUNMAP _IOWR('R', 7, struct fastrpc_req_munmap)
29 #define FASTRPC_IOCTL_INIT_ATTACH_SNS _IO('R', 8)
30 #define FASTRPC_IOCTL_INIT_CREATE_STATIC _IOWR('R', 9, struct fastrpc_init_create_static)
31 #define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map)
32 #define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)
33 #define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)
34 enum fastrpc_map_flags {
35   FASTRPC_MAP_STATIC = 0,
36   FASTRPC_MAP_RESERVED,
37   FASTRPC_MAP_FD = 2,
38   FASTRPC_MAP_FD_DELAYED,
39   FASTRPC_MAP_FD_NOMAP = 16,
40   FASTRPC_MAP_MAX,
41 };
42 enum fastrpc_proc_attr {
43   FASTRPC_MODE_DEBUG = (1 << 0),
44   FASTRPC_MODE_PTRACE = (1 << 1),
45   FASTRPC_MODE_CRC = (1 << 2),
46   FASTRPC_MODE_UNSIGNED_MODULE = (1 << 3),
47   FASTRPC_MODE_ADAPTIVE_QOS = (1 << 4),
48   FASTRPC_MODE_SYSTEM_PROCESS = (1 << 5),
49   FASTRPC_MODE_PRIVILEGED = (1 << 6),
50 };
51 #define FASTRPC_ATTR_SECUREMAP (1)
52 struct fastrpc_invoke_args {
53   __u64 ptr;
54   __u64 length;
55   __s32 fd;
56   __u32 attr;
57 };
58 struct fastrpc_invoke {
59   __u32 handle;
60   __u32 sc;
61   __u64 args;
62 };
63 struct fastrpc_init_create {
64   __u32 filelen;
65   __s32 filefd;
66   __u32 attrs;
67   __u32 siglen;
68   __u64 file;
69 };
70 struct fastrpc_init_create_static {
71   __u32 namelen;
72   __u32 memlen;
73   __u64 name;
74 };
75 struct fastrpc_alloc_dma_buf {
76   __s32 fd;
77   __u32 flags;
78   __u64 size;
79 };
80 struct fastrpc_req_mmap {
81   __s32 fd;
82   __u32 flags;
83   __u64 vaddrin;
84   __u64 size;
85   __u64 vaddrout;
86 };
87 struct fastrpc_mem_map {
88   __s32 version;
89   __s32 fd;
90   __s32 offset;
91   __u32 flags;
92   __u64 vaddrin;
93   __u64 length;
94   __u64 vaddrout;
95   __s32 attrs;
96   __s32 reserved[4];
97 };
98 struct fastrpc_req_munmap {
99   __u64 vaddrout;
100   __u64 size;
101 };
102 struct fastrpc_mem_unmap {
103   __s32 vesion;
104   __s32 fd;
105   __u64 vaddr;
106   __u64 length;
107   __s32 reserved[5];
108 };
109 struct fastrpc_ioctl_capability {
110   __u32 domain;
111   __u32 attribute_id;
112   __u32 capability;
113   __u32 reserved[4];
114 };
115 #endif
116