123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284 |
- #ifndef FASTRPC_IOCTL_H
- #define FASTRPC_IOCTL_H
- #include <linux/types.h>
- #define remote_arg_t union remote_arg
- #define MAP_RESERVED_NUM (14)
- #define UNMAP_RESERVED_NUM (10)
- #define FASTRPC_IOCTL_INVOKE _IOWR('R', 1, struct fastrpc_ioctl_invoke)
- #define FASTRPC_IOCTL_MMAP _IOWR('R', 2, struct fastrpc_ioctl_mmap)
- #define FASTRPC_IOCTL_MUNMAP _IOWR('R', 3, struct fastrpc_ioctl_munmap)
- #define FASTRPC_IOCTL_MMAP_64 _IOWR('R', 14, struct fastrpc_ioctl_mmap_64)
- #define FASTRPC_IOCTL_MUNMAP_64 _IOWR('R', 15, struct fastrpc_ioctl_munmap_64)
- #define FASTRPC_IOCTL_INVOKE_FD _IOWR('R', 4, struct fastrpc_ioctl_invoke_fd)
- #define FASTRPC_IOCTL_SETMODE _IOWR('R', 5, uint32_t)
- #define FASTRPC_IOCTL_INIT _IOWR('R', 6, struct fastrpc_ioctl_init)
- #define FASTRPC_IOCTL_INVOKE_ATTRS \
- _IOWR('R', 7, struct fastrpc_ioctl_invoke_attrs)
- #define FASTRPC_IOCTL_GETINFO _IOWR('R', 8, uint32_t)
- #define FASTRPC_IOCTL_INIT_ATTRS _IOWR('R', 10, struct fastrpc_ioctl_init_attrs)
- #define FASTRPC_IOCTL_INVOKE_CRC _IOWR('R', 11, struct fastrpc_ioctl_invoke_crc)
- #define FASTRPC_IOCTL_CONTROL _IOWR('R', 12, struct fastrpc_ioctl_control)
- #define FASTRPC_IOCTL_MUNMAP_FD _IOWR('R', 13, struct fastrpc_ioctl_munmap_fd)
- #define FASTRPC_IOCTL_GET_DSP_INFO \
- _IOWR('R', 17, struct fastrpc_ioctl_capability)
- #define FASTRPC_IOCTL_INVOKE2 _IOWR('R', 18, struct fastrpc_ioctl_invoke2)
- #define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 19, struct fastrpc_ioctl_mem_map)
- #define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 20, struct fastrpc_ioctl_mem_unmap)
- #define FASTRPC_IOCTL_INVOKE_PERF \
- _IOWR('R', 21, struct fastrpc_ioctl_invoke_perf)
- #define FASTRPC_IOCTL_NOTIF_RSP \
- _IOWR('R', 22, struct fastrpc_ioctl_notif_rsp)
- #define FASTRPC_IOCTL_DSPSIGNAL_CREATE _IOWR('R', 23, struct fastrpc_ioctl_dspsignal_create)
- #define FASTRPC_IOCTL_DSPSIGNAL_DESTROY _IOWR('R', 24, struct fastrpc_ioctl_dspsignal_destroy)
- #define FASTRPC_IOCTL_DSPSIGNAL_SIGNAL _IOWR('R', 25, struct fastrpc_ioctl_dspsignal_signal)
- #define FASTRPC_IOCTL_DSPSIGNAL_WAIT _IOWR('R', 26, struct fastrpc_ioctl_dspsignal_wait)
- #define FASTRPC_IOCTL_DSPSIGNAL_CANCEL_WAIT \
- _IOWR('R', 27, struct fastrpc_ioctl_dspsignal_cancel_wait)
- struct fastrpc_mem_map {
- int fd;
- int offset;
- uint32_t flags;
- int attrs;
- uintptr_t vaddrin;
- size_t length;
- uint64_t vaddrout;
- };
- struct fastrpc_mem_unmap {
- int fd;
- uint64_t vaddr;
- size_t length;
- };
- struct fastrpc_ctrl_latency {
- uint32_t enable;
- uint32_t latency;
- };
- struct fastrpc_ctrl_kalloc {
- uint32_t kalloc_support;
- };
- struct fastrpc_ctrl_wakelock {
- uint32_t enable;
- };
- struct fastrpc_ctrl_pm {
- uint32_t timeout;
- };
- struct fastrpc_ctrl_smmu {
- uint32_t sharedcb;
- };
- struct fastrpc_ioctl_invoke {
- uint32_t handle;
- uint32_t sc;
- remote_arg_t *pra;
- };
- struct fastrpc_ioctl_invoke_fd {
- struct fastrpc_ioctl_invoke inv;
- int *fds;
- };
- struct fastrpc_ioctl_invoke_attrs {
- struct fastrpc_ioctl_invoke inv;
- int *fds;
- unsigned int *attrs;
- };
- struct fastrpc_ioctl_invoke_crc {
- struct fastrpc_ioctl_invoke inv;
- int *fds;
- unsigned int *attrs;
- unsigned int *crc;
- };
- struct fastrpc_ioctl_invoke_perf {
- struct fastrpc_ioctl_invoke inv;
- int *fds;
- unsigned int *attrs;
- unsigned int *crc;
- uint64_t *perf_kernel;
- uint64_t *perf_dsp;
- };
- struct fastrpc_ioctl_invoke_async {
- struct fastrpc_ioctl_invoke inv;
- int *fds;
- unsigned int *attrs;
- unsigned int *crc;
- uint64_t *perf_kernel;
- uint64_t *perf_dsp;
- struct fastrpc_async_job *job;
- };
- struct fastrpc_ioctl_invoke_async_no_perf {
- struct fastrpc_ioctl_invoke inv;
- int *fds;
- unsigned int *attrs;
- unsigned int *crc;
- struct fastrpc_async_job *job;
- };
- struct fastrpc_ioctl_async_response {
- uint64_t jobid;
- int result;
- uint64_t *perf_kernel;
- uint64_t *perf_dsp;
- uint32_t handle;
- uint32_t sc;
- };
- struct fastrpc_ioctl_notif_rsp {
- int domain;
- int session;
- uint32_t status;
- };
- struct fastrpc_ioctl_invoke2 {
- uint32_t req;
- uintptr_t invparam;
- uint32_t size;
- int err;
- };
- struct fastrpc_ioctl_init {
- uint32_t flags;
- uintptr_t file;
- uint32_t filelen;
- int32_t filefd;
- uintptr_t mem;
- uint32_t memlen;
- int32_t memfd;
- };
- struct fastrpc_ioctl_init_attrs {
- struct fastrpc_ioctl_init init;
- int attrs;
- unsigned int siglen;
- };
- struct fastrpc_ioctl_munmap {
- uintptr_t vaddrout;
- size_t size;
- };
- struct fastrpc_ioctl_munmap_64 {
- uint64_t vaddrout;
- size_t size;
- };
- struct fastrpc_ioctl_mmap {
- int fd;
- uint32_t flags;
- uintptr_t vaddrin;
- size_t size;
- uintptr_t vaddrout;
- };
- struct fastrpc_ioctl_mmap_64 {
- int fd;
- uint32_t flags;
- uint64_t vaddrin;
- size_t size;
- uint64_t vaddrout;
- };
- struct fastrpc_ioctl_munmap_fd {
- int fd;
- uint32_t flags;
- uintptr_t va;
- ssize_t len;
- };
- struct fastrpc_ioctl_dspsignal_create {
- uint32_t signal_id;
- uint32_t flags;
- };
- struct fastrpc_ioctl_dspsignal_destroy {
- uint32_t signal_id;
- };
- struct fastrpc_ioctl_dspsignal_signal {
- uint32_t signal_id;
- };
- struct fastrpc_ioctl_dspsignal_wait {
- uint32_t signal_id;
- uint32_t timeout_usec;
- };
- struct fastrpc_ioctl_dspsignal_cancel_wait {
- uint32_t signal_id;
- };
- struct fastrpc_ioctl_mem_map {
- int version;
- union {
- struct fastrpc_mem_map m;
- int reserved[MAP_RESERVED_NUM];
- };
- };
- struct fastrpc_ioctl_mem_unmap {
- int version;
- union {
- struct fastrpc_mem_unmap um;
- int reserved[UNMAP_RESERVED_NUM];
- };
- };
- struct fastrpc_ioctl_control {
- uint32_t req;
- union {
- struct fastrpc_ctrl_latency lp;
- struct fastrpc_ctrl_kalloc kalloc;
- struct fastrpc_ctrl_wakelock wp;
- struct fastrpc_ctrl_pm pm;
- struct fastrpc_ctrl_smmu smmu;
- };
- };
- struct fastrpc_ioctl_capability {
- uint32_t domain;
- uint32_t attribute_ID;
- uint32_t capability;
- };
- union fastrpc_ioctl_param {
- struct fastrpc_ioctl_invoke_async inv;
- struct fastrpc_ioctl_mem_map mem_map;
- struct fastrpc_ioctl_mem_unmap mem_unmap;
- struct fastrpc_ioctl_mmap mmap;
- struct fastrpc_ioctl_mmap_64 mmap64;
- struct fastrpc_ioctl_munmap munmap;
- struct fastrpc_ioctl_munmap_64 munmap64;
- struct fastrpc_ioctl_munmap_fd munmap_fd;
- struct fastrpc_ioctl_init_attrs init;
- struct fastrpc_ioctl_control cp;
- struct fastrpc_ioctl_capability cap;
- struct fastrpc_ioctl_invoke2 inv2;
- struct fastrpc_ioctl_dspsignal_signal sig;
- struct fastrpc_ioctl_dspsignal_wait wait;
- struct fastrpc_ioctl_dspsignal_create cre;
- struct fastrpc_ioctl_dspsignal_destroy des;
- struct fastrpc_ioctl_dspsignal_cancel_wait canc;
- };
- #endif
|