1. Linux
The IPC layer never allocates any memory, the application invoking IPC should pre-allocate memory and attach to the
channel.
For example:
• - For MSG_CH, the consumer application when calling fsl_ipc_configure_channel, should set the msg_ring memory
equal to the msg_size*depth and aligned to the msg_size
• - For TXREQ_CH, the producer application should call fsl_ipc_configure_txreq to provide buffers where linearization
should be done by DMA.
2. SmartDSP OS
The IPC layer will allocate OS internal structures for optimizing the access to the IPC control area. Buffers, used by
message channels, are to be pre-allocated by the application and the memory manager (os_mem_part_t*) handle will
be passed during opening the channel.
int fsl_ipc_configure_channel(uint32_t channel_id,
uint32_t depth,
ipc_ch_type_t channel_type,
unsigned long msg_ring_paddr,
uint32_t msg_size,
ipc_cbfunc_t cbfunc,
fsl_ipc_t ipc);
channel_id - [IN][M]unique id of the channel
*
* depth - [IN][M]user configurable number of entries in the ring.
* depth <= max depth
*
* channel_type - [IN][M]either of IPC_PTR_CH/IPC_MSG_CH
*
* msg_ring_paddr - [IN]Physical address of the message ring. Required
* only for IPC_MSG_CH
*
* msg_size - [IN]max size of each message.
* For PTR_CH, msg_ring_vaddr, msg_ring_paddr, msg_size
* are all NULL. Required only for IPC_MSG_CH
*
* cbfunc - [IN]The callback function called on receiving interrupt
* from the producer. If cbfunc is NULL, channel does not
* support notifications.
*