History

misc: fastrpc: Add support for audiopd

In order to be able to start the adsp listener for audiopd using adsprpcd, we need to add the corresponding ioctl for creating a static process. On that ioctl call we need to allocate the heap. Allocating the heap needs to be happening only once and needs to be kept between different device open calls, so attach it to the channel context to make sure that remains until the RPMSG driver is removed. Then, if there are any VMIDs associated with the static ADSP process, do a call to SCM to assign it. And then, send all the necessary info related to heap to the DSP.

Abel Vesa committed 3 years ago

Commit 08715611 parent 72fa6f72 files · +142 −0Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/misc/fastrpc.h+7−0
@@ -13,6 +13,7 @@ · 12 unmodified lines
13#define FASTRPC_IOCTL_MMAP _IOWR('R', 6, struct fastrpc_req_mmap)13#define FASTRPC_IOCTL_MMAP _IOWR('R', 6, struct fastrpc_req_mmap)
14#define FASTRPC_IOCTL_MUNMAP _IOWR('R', 7, struct fastrpc_req_munmap)14#define FASTRPC_IOCTL_MUNMAP _IOWR('R', 7, struct fastrpc_req_munmap)
15#define FASTRPC_IOCTL_INIT_ATTACH_SNS _IO('R', 8)15#define FASTRPC_IOCTL_INIT_ATTACH_SNS _IO('R', 8)
16#define FASTRPC_IOCTL_INIT_CREATE_STATIC _IOWR('R', 9, struct fastrpc_init_create_static)
16#define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map)17#define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map)
17#define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)18#define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)
18#define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)19#define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)
@@ -87,6 +88,12 @@ struct fastrpc_init_create { · 68 unmodified lines
87 __u64 file; /* pointer to elf file */88 __u64 file; /* pointer to elf file */
88};89};
89 90
91struct fastrpc_init_create_static {
92 __u32 namelen; /* length of pd process name */
93 __u32 memlen;
94 __u64 name; /* pd process name */
95};
96
90struct fastrpc_alloc_dma_buf {97struct fastrpc_alloc_dma_buf {
91 __s32 fd; /* fd */98 __s32 fd; /* fd */
92 __u32 flags; /* flags to map with */99 __u32 flags; /* flags to map with */