Skip to content

Commit 44e5edd

Browse files
committed
userspace: split ipc files into user and kernel features.
This is a mostly mechanical split of initial ipc logic into kernel and user files. This is the 1st stage in supporting both privileged kernel and non privileged userspace IPC commands and security surfaces. At a high level library loading and PM will reside as kernel IPC and pipeline and module will become user IPCs. There will be no impact for devices without MMU. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 7ed4499 commit 44e5edd

File tree

4 files changed

+729
-516
lines changed

4 files changed

+729
-516
lines changed

src/include/sof/ipc/common.h

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
struct dma_sg_elem_array;
2626
struct ipc_msg;
27+
struct ipc4_message_request;
2728

2829
/* validates internal non tail structures within IPC command structure */
2930
#define IPC_IS_SIZE_INVALID(object) \
@@ -166,6 +167,47 @@ struct dai_data;
166167
*/
167168
int ipc_dai_data_config(struct dai_data *dd, struct comp_dev *dev);
168169

170+
/**
171+
* \brief Processes IPC4 userspace module message.
172+
* @param[in] ipc4 IPC4 message request.
173+
* @return IPC4_SUCCESS on success, error code otherwise.
174+
*/
175+
int ipc4_user_process_module_message(struct ipc4_message_request *ipc4);
176+
177+
/**
178+
* \brief Processes IPC4 userspace global message.
179+
* @param[in] ipc4 IPC4 message request.
180+
* @return IPC4_SUCCESS on success, error code otherwise.
181+
*/
182+
int ipc4_user_process_glb_message(struct ipc4_message_request *ipc4);
183+
184+
/**
185+
* \brief Increment the IPC compound message pre-start counter.
186+
* @param[in] msg_id IPC message ID.
187+
*/
188+
void ipc_compound_pre_start(int msg_id);
189+
190+
/**
191+
* \brief Decrement the IPC compound message pre-start counter on return value status.
192+
* @param[in] msg_id IPC message ID.
193+
* @param[in] ret Return value of the IPC command.
194+
* @param[in] delayed True if the reply is delayed.
195+
*/
196+
void ipc_compound_post_start(uint32_t msg_id, int ret, bool delayed);
197+
198+
/**
199+
* \brief Complete the IPC compound message.
200+
* @param[in] msg_id IPC message ID.
201+
* @param[in] error Error code of the IPC command.
202+
*/
203+
void ipc_compound_msg_done(uint32_t msg_id, int error);
204+
205+
/**
206+
* \brief Wait for the IPC compound message to complete.
207+
* @return 0 on success, error code otherwise on timeout.
208+
*/
209+
int ipc_wait_for_compound_msg(void);
210+
169211
/**
170212
* \brief create a IPC boot complete message.
171213
* @param[in] header header.

src/ipc/ipc4/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# Files common to Zephyr and XTOS
44
add_local_sources(sof
55
dai.c
6-
handler.c
6+
handler-user.c
7+
handler-kernel.c
78
helper.c
89
logging.c
910
notification.c

0 commit comments

Comments
 (0)