blob: e82b961aeb1c2d0f3d9ecc7e7b5c8b8d8b3cf4f6 [file] [log] [blame]
Colin Cross07a58322022-02-08 19:45:27 -08001/****************************************************************************
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)
Jordan Demeulenaere2d505822022-08-11 17:20:14 +020030#define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map)
31#define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)
32#define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)
33enum fastrpc_map_flags {
34 FASTRPC_MAP_STATIC = 0,
35 FASTRPC_MAP_RESERVED,
36 FASTRPC_MAP_FD = 2,
37 FASTRPC_MAP_FD_DELAYED,
38 FASTRPC_MAP_FD_NOMAP = 16,
39 FASTRPC_MAP_MAX,
40};
41enum fastrpc_proc_attr {
42 FASTRPC_MODE_DEBUG = (1 << 0),
43 FASTRPC_MODE_PTRACE = (1 << 1),
44 FASTRPC_MODE_CRC = (1 << 2),
45 FASTRPC_MODE_UNSIGNED_MODULE = (1 << 3),
46 FASTRPC_MODE_ADAPTIVE_QOS = (1 << 4),
47 FASTRPC_MODE_SYSTEM_PROCESS = (1 << 5),
48 FASTRPC_MODE_PRIVILEGED = (1 << 6),
49};
50#define FASTRPC_ATTR_SECUREMAP (1)
Colin Cross07a58322022-02-08 19:45:27 -080051struct fastrpc_invoke_args {
52 __u64 ptr;
53 __u64 length;
54 __s32 fd;
Jordan Demeulenaere2d505822022-08-11 17:20:14 +020055 __u32 attr;
Colin Cross07a58322022-02-08 19:45:27 -080056};
57struct fastrpc_invoke {
58 __u32 handle;
59 __u32 sc;
60 __u64 args;
61};
62struct fastrpc_init_create {
63 __u32 filelen;
64 __s32 filefd;
65 __u32 attrs;
66 __u32 siglen;
67 __u64 file;
68};
69struct fastrpc_alloc_dma_buf {
70 __s32 fd;
71 __u32 flags;
72 __u64 size;
73};
74struct fastrpc_req_mmap {
75 __s32 fd;
76 __u32 flags;
77 __u64 vaddrin;
78 __u64 size;
79 __u64 vaddrout;
80};
Jordan Demeulenaere2d505822022-08-11 17:20:14 +020081struct fastrpc_mem_map {
82 __s32 version;
83 __s32 fd;
84 __s32 offset;
85 __u32 flags;
86 __u64 vaddrin;
87 __u64 length;
88 __u64 vaddrout;
89 __s32 attrs;
90 __s32 reserved[4];
91};
Colin Cross07a58322022-02-08 19:45:27 -080092struct fastrpc_req_munmap {
93 __u64 vaddrout;
94 __u64 size;
95};
Jordan Demeulenaere2d505822022-08-11 17:20:14 +020096struct fastrpc_mem_unmap {
97 __s32 vesion;
98 __s32 fd;
99 __u64 vaddr;
100 __u64 length;
101 __s32 reserved[5];
102};
103struct fastrpc_ioctl_capability {
104 __u32 domain;
105 __u32 attribute_id;
106 __u32 capability;
107 __u32 reserved[4];
108};
Colin Cross07a58322022-02-08 19:45:27 -0800109#endif