blob: 09d21ebeec91d029b02e160d4fe6fb1acd09914a [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferris24f97eb2019-05-20 12:58:13 -07007#ifndef __QCOM_FASTRPC_H__
8#define __QCOM_FASTRPC_H__
9#include <linux/types.h>
10#define FASTRPC_IOCTL_ALLOC_DMA_BUFF _IOWR('R', 1, struct fastrpc_alloc_dma_buf)
11#define FASTRPC_IOCTL_FREE_DMA_BUFF _IOWR('R', 2, __u32)
12#define FASTRPC_IOCTL_INVOKE _IOWR('R', 3, struct fastrpc_invoke)
13#define FASTRPC_IOCTL_INIT_ATTACH _IO('R', 4)
14#define FASTRPC_IOCTL_INIT_CREATE _IOWR('R', 5, struct fastrpc_init_create)
Christopher Ferrisd32ca142020-02-04 16:16:51 -080015#define FASTRPC_IOCTL_MMAP _IOWR('R', 6, struct fastrpc_req_mmap)
16#define FASTRPC_IOCTL_MUNMAP _IOWR('R', 7, struct fastrpc_req_munmap)
Christopher Ferris32ff3f82020-12-14 13:10:04 -080017#define FASTRPC_IOCTL_INIT_ATTACH_SNS _IO('R', 8)
Christopher Ferris8b7fdc92023-02-21 13:36:32 -080018#define FASTRPC_IOCTL_INIT_CREATE_STATIC _IOWR('R', 9, struct fastrpc_init_create_static)
Christopher Ferris10a76e62022-06-08 13:31:52 -070019#define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map)
20#define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)
21#define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)
22enum fastrpc_map_flags {
23 FASTRPC_MAP_STATIC = 0,
24 FASTRPC_MAP_RESERVED,
25 FASTRPC_MAP_FD = 2,
26 FASTRPC_MAP_FD_DELAYED,
27 FASTRPC_MAP_FD_NOMAP = 16,
28 FASTRPC_MAP_MAX,
29};
30enum fastrpc_proc_attr {
31 FASTRPC_MODE_DEBUG = (1 << 0),
32 FASTRPC_MODE_PTRACE = (1 << 1),
33 FASTRPC_MODE_CRC = (1 << 2),
34 FASTRPC_MODE_UNSIGNED_MODULE = (1 << 3),
35 FASTRPC_MODE_ADAPTIVE_QOS = (1 << 4),
36 FASTRPC_MODE_SYSTEM_PROCESS = (1 << 5),
37 FASTRPC_MODE_PRIVILEGED = (1 << 6),
38};
39#define FASTRPC_ATTR_SECUREMAP (1)
Christopher Ferris24f97eb2019-05-20 12:58:13 -070040struct fastrpc_invoke_args {
41 __u64 ptr;
42 __u64 length;
43 __s32 fd;
Christopher Ferris10a76e62022-06-08 13:31:52 -070044 __u32 attr;
Christopher Ferris24f97eb2019-05-20 12:58:13 -070045};
46struct fastrpc_invoke {
47 __u32 handle;
48 __u32 sc;
49 __u64 args;
50};
51struct fastrpc_init_create {
52 __u32 filelen;
53 __s32 filefd;
54 __u32 attrs;
55 __u32 siglen;
56 __u64 file;
57};
Christopher Ferris8b7fdc92023-02-21 13:36:32 -080058struct fastrpc_init_create_static {
59 __u32 namelen;
60 __u32 memlen;
61 __u64 name;
62};
Christopher Ferris24f97eb2019-05-20 12:58:13 -070063struct fastrpc_alloc_dma_buf {
64 __s32 fd;
65 __u32 flags;
66 __u64 size;
67};
Christopher Ferrisd32ca142020-02-04 16:16:51 -080068struct fastrpc_req_mmap {
69 __s32 fd;
70 __u32 flags;
71 __u64 vaddrin;
72 __u64 size;
73 __u64 vaddrout;
74};
Christopher Ferris10a76e62022-06-08 13:31:52 -070075struct fastrpc_mem_map {
76 __s32 version;
77 __s32 fd;
78 __s32 offset;
79 __u32 flags;
80 __u64 vaddrin;
81 __u64 length;
82 __u64 vaddrout;
83 __s32 attrs;
84 __s32 reserved[4];
85};
Christopher Ferrisd32ca142020-02-04 16:16:51 -080086struct fastrpc_req_munmap {
87 __u64 vaddrout;
88 __u64 size;
89};
Christopher Ferris10a76e62022-06-08 13:31:52 -070090struct fastrpc_mem_unmap {
91 __s32 vesion;
92 __s32 fd;
93 __u64 vaddr;
94 __u64 length;
95 __s32 reserved[5];
96};
97struct fastrpc_ioctl_capability {
98 __u32 domain;
99 __u32 attribute_id;
100 __u32 capability;
101 __u32 reserved[4];
102};
Christopher Ferris24f97eb2019-05-20 12:58:13 -0700103#endif