[userspace LL] IPC part of #10945 - #11137
Open
lyakh wants to merge 4 commits into
Open
Conversation
.cold and .coldrodata partitions can be empty, avoid a failure in such cases. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
ipc4_init_module_instance() should be called when CONFIG_SOF_USERSPACE_LL isn't selected but also when initializing a DP module. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Switching to the userspace mode in DP and LL cases differs. Add a comment to explain that. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Extract common initialisation code from comp_new_ipc4_user() and comp_new_ipc4() into a new function. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extracts common IPC4 component-creation configuration into a shared helper, refines IPC4 module-init handling to route LL-domain inits through the user IPC thread when userspace LL is enabled, and extends the userspace LL memory domain to include “cold” sections needed during prepare.
Changes:
- Refactor IPC4 module instance configuration building into
ipc4_comp_new_config()and reuse it from both kernel and userspace creation paths. - Update IPC4 userspace handler logic to only forward LL (non-DP) local-core init to the userspace thread; DP and cross-core creation stays in kernel.
- Add userspace LL memory-domain partitions to allow execution/read access to
.cold/.coldrodataregions.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/ipc/ipc4/helper.c | Refactors IPC4 component init config population into a shared helper and reuses it in kernel/userspace creation paths. |
| src/ipc/ipc4/handler-user.c | Adjusts module init routing to forward only local-core LL-domain init to the userspace IPC thread. |
| src/ipc/ipc-common.c | Adds userspace LL mem-domain partitions for cold text/rodata to support prepare paths referencing cold symbols. |
Suppressed comments (1)
src/ipc/ipc-common.c:521
- Like the .cold partition above, the .coldrodata partition start address is not aligned down to a page boundary (only the size is aligned). If __coldrodata_start is not page-aligned, k_mem_domain_add_partition() can fail or produce an incomplete mapping.
struct k_mem_partition cold_part = {
.start = (uintptr_t)__coldrodata_start,
.size = ALIGN_UP((uintptr_t)_imr_end - (uintptr_t)__coldrodata_start,
CONFIG_MMU_PAGE_SIZE),
.attr = K_MEM_PARTITION_P_RO_U_RO,
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -1550,11 +1548,15 @@ __cold int ipc4_user_process_module_message(struct ipc4_message_request *ipc4, | |||
|
|
|||
| pdata->init_drv = drv; | |||
Collaborator
Author
There was a problem hiding this comment.
not changed by this commit. Might need to revisit in the future.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
most of the IPC commits from the userspace LL PR #10945