Masahiro Yamada | d9c5252 | 2019-07-25 16:58:31 +0900 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
Srinivas Kandagatla | c68cfb7 | 2019-02-08 17:11:25 +0000 | [diff] [blame] | 2 | |
| 3 | #ifndef __QCOM_FASTRPC_H__ |
| 4 | #define __QCOM_FASTRPC_H__ |
| 5 | |
| 6 | #include <linux/types.h> |
| 7 | |
Srinivas Kandagatla | 6cffd79 | 2019-02-08 17:11:27 +0000 | [diff] [blame] | 8 | #define FASTRPC_IOCTL_ALLOC_DMA_BUFF _IOWR('R', 1, struct fastrpc_alloc_dma_buf) |
| 9 | #define FASTRPC_IOCTL_FREE_DMA_BUFF _IOWR('R', 2, __u32) |
Srinivas Kandagatla | c68cfb7 | 2019-02-08 17:11:25 +0000 | [diff] [blame] | 10 | #define FASTRPC_IOCTL_INVOKE _IOWR('R', 3, struct fastrpc_invoke) |
Srinivas Kandagatla | d73f71c | 2019-02-08 17:11:26 +0000 | [diff] [blame] | 11 | #define FASTRPC_IOCTL_INIT_ATTACH _IO('R', 4) |
| 12 | #define FASTRPC_IOCTL_INIT_CREATE _IOWR('R', 5, struct fastrpc_init_create) |
Jorge Ramirez-Ortiz | 2419e55 | 2019-10-09 15:41:19 +0100 | [diff] [blame] | 13 | #define FASTRPC_IOCTL_MMAP _IOWR('R', 6, struct fastrpc_req_mmap) |
| 14 | #define FASTRPC_IOCTL_MUNMAP _IOWR('R', 7, struct fastrpc_req_munmap) |
Srinivas Kandagatla | c68cfb7 | 2019-02-08 17:11:25 +0000 | [diff] [blame] | 15 | |
| 16 | struct fastrpc_invoke_args { |
| 17 | __u64 ptr; |
| 18 | __u64 length; |
| 19 | __s32 fd; |
| 20 | __u32 reserved; |
| 21 | }; |
| 22 | |
| 23 | struct fastrpc_invoke { |
| 24 | __u32 handle; |
| 25 | __u32 sc; |
| 26 | __u64 args; |
| 27 | }; |
| 28 | |
Srinivas Kandagatla | d73f71c | 2019-02-08 17:11:26 +0000 | [diff] [blame] | 29 | struct fastrpc_init_create { |
| 30 | __u32 filelen; /* elf file length */ |
| 31 | __s32 filefd; /* fd for the file */ |
| 32 | __u32 attrs; |
| 33 | __u32 siglen; |
| 34 | __u64 file; /* pointer to elf file */ |
| 35 | }; |
| 36 | |
Srinivas Kandagatla | 6cffd79 | 2019-02-08 17:11:27 +0000 | [diff] [blame] | 37 | struct fastrpc_alloc_dma_buf { |
| 38 | __s32 fd; /* fd */ |
| 39 | __u32 flags; /* flags to map with */ |
| 40 | __u64 size; /* size */ |
| 41 | }; |
| 42 | |
Jorge Ramirez-Ortiz | 2419e55 | 2019-10-09 15:41:19 +0100 | [diff] [blame] | 43 | struct fastrpc_req_mmap { |
| 44 | __s32 fd; |
| 45 | __u32 flags; /* flags for dsp to map with */ |
| 46 | __u64 vaddrin; /* optional virtual address */ |
| 47 | __u64 size; /* size */ |
| 48 | __u64 vaddrout; /* dsp virtual address */ |
| 49 | }; |
| 50 | |
| 51 | struct fastrpc_req_munmap { |
| 52 | __u64 vaddrout; /* address to unmap */ |
| 53 | __u64 size; /* size */ |
| 54 | }; |
| 55 | |
Srinivas Kandagatla | c68cfb7 | 2019-02-08 17:11:25 +0000 | [diff] [blame] | 56 | #endif /* __QCOM_FASTRPC_H__ */ |