Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/include/uapi/abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

/** \brief SOF ABI version major, minor and patch numbers */
#define SOF_ABI_MAJOR 3
#define SOF_ABI_MINOR 6
#define SOF_ABI_MINOR 7
#define SOF_ABI_PATCH 0

/** \brief SOF ABI version number. Format within 32bit word is MMmmmppp */
Expand Down
9 changes: 9 additions & 0 deletions src/include/uapi/ipc/header.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
#define SOF_IPC_GLB_DAI_MSG SOF_GLB_TYPE(0x8U)
#define SOF_IPC_GLB_TRACE_MSG SOF_GLB_TYPE(0x9U)
#define SOF_IPC_GLB_GDB_DEBUG SOF_GLB_TYPE(0xAU)
#define SOF_IPC_GLB_TEST SOF_GLB_TYPE(0xBU)

/** @} */

Expand Down Expand Up @@ -172,6 +173,14 @@

/** @} */

/** \name DSP Command: Test - Debug build only
* @{
*/

#define SOF_IPC_TEST_IPC_FLOOD SOF_CMD_TYPE(0x001)

/** @} */

/** \name IPC Message Definitions
* @{
*/
Expand Down
19 changes: 19 additions & 0 deletions src/ipc/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,21 @@ static int ipc_glb_tplg_message(uint32_t header)
}
}

#ifdef CONFIG_DEBUG
static int ipc_glb_test_message(uint32_t header)
{
uint32_t cmd = iCS(header);

switch (cmd) {
case SOF_IPC_TEST_IPC_FLOOD:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can add some trace log with the IPC index id to help identify which IPC is missed. We can only tell how many IPC is missed, but which one is missed will help the debug

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiulipan that makes sense in the driver. the FW cant actually keep count because the IPC's may not coming in order.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranj063
I would like to make test IPC counts the index id as its payload. To help us debug the order or sequence issues.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiulipan inline comments ? care to elaborate.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lgirdwood i think he meant he added some comments in the commit

return 0; /* just return so next IPC can be sent */
default:
trace_ipc_error("ipc: unknown test header 0x%x", header);
return -EINVAL;
}
}
#endif

/*
* Global IPC Operations.
*/
Expand Down Expand Up @@ -1130,6 +1145,10 @@ int ipc_cmd(void)
return ipc_glb_debug_message(hdr->cmd);
case SOF_IPC_GLB_GDB_DEBUG:
return ipc_glb_gdb_debug(hdr->cmd);
#ifdef CONFIG_DEBUG
case SOF_IPC_GLB_TEST:
return ipc_glb_test_message(hdr->cmd);
#endif
default:
trace_ipc_error("ipc: unknown command type %u", type);
return -EINVAL;
Expand Down