Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The component-creation callback remains directly callable from userspace despite being moved into a kernel-only translation unit, so user-side lifecycle callbacks must be separated from privileged loader and syscall code.
No open issues 🎉
What changed in this PR
This PR advances SOF’s kernel/user-space source partition by relocating the library manager under src/kernel and building it into sof_kernel. It also includes the stacked IDC relocation from #11398.
Changes:
- Relocates library loading, linking, notification, and DRAM persistence code.
- Updates CMake and Kconfig wiring for the relocated directories.
- Updates directory classifications and documentation paths.
| File | Description |
|---|---|
zephyr/CMakeLists.txt |
Removes direct inclusion of the old directories. |
src/kernel/library_manager/llext_manager.c |
Relocates LLEXT loading and memory-domain management. |
src/kernel/library_manager/llext_manager_dram.c |
Relocates library-context save and restore logic. |
src/kernel/library_manager/lib_notification.c |
Relocates external-module notification handling. |
src/kernel/library_manager/lib_manager.c |
Relocates library loading, lifecycle callbacks, and syscall handling. |
src/kernel/library_manager/Kconfig |
Relocates library-manager configuration options. |
src/kernel/library_manager/CMakeLists.txt |
Builds relocated sources through the kernel subtree. |
src/kernel/Kconfig |
Sources IDC and library-manager options. |
src/kernel/idc/zephyr_idc.c |
Relocates Zephyr inter-core messaging. |
src/kernel/idc/README.md |
Updates the directory name and documentation link. |
src/kernel/idc/Kconfig |
Relocates IDC timeout configuration. |
src/kernel/idc/idc.c |
Relocates inter-core command handling. |
src/kernel/idc/CMakeLists.txt |
Integrates IDC sources into the kernel subtree. |
src/kernel/CMakeLists.txt |
Adds IDC and library-manager subdirectories. |
src/Kconfig |
Routes relocated configuration through kernel Kconfig. |
src/include/sof/userspace/README.md |
Updates directory taxonomy and syscall implementation paths. |
src/audio/README.md |
Updates the kernel-only IDC path. |
AGENTS.md |
Documents src/kernel and its build library. |
Review effort: Balanced
The library manager loads and links library and LLEXT modules and holds the kernel half of the lib_manager_free_module() system call. None of it runs in a user thread. Move it to src/kernel/library_manager, where it is built into the sof_kernel library. Source its Kconfig from src/kernel/Kconfig instead of src/Kconfig; the option values are unchanged. In the user-space README, list it with the kernel-only directories and update the path in the system call table. Only Zephyr builds the library manager, so the host builds are not affected. No functional change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
lgirdwood
force-pushed
the
kernel-user/phase2c
branch
from
November 5, 2026 20:51
76a2584 to
eb47f25
Compare
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.
Phase 2 of #11306 (kernel / user-space partition), third part: move the library manager to
src/kernel/library_manager. Follows #11398.Patch
src/library_manager→src/kernel/library_manager: a pure move. The library manager loads and links library and LLEXT modules, and it holds the kernel half of thelib_manager_free_module()system call (z_impl_/z_vrfy_). None of it runs in a user thread, so it is now built into thesof_kernellibrary.src/kernel/Kconfiginstead ofsrc/Kconfig. The option values are unchanged.Functional change
None.
.confighas the same option values before and after.SYS_INIT()order are identical in every image.wordlist) in the PTL builds with Zephyr userspace.Testing
CONFIG_SOF_USERSPACE_PROXY=n;os_linux_overlay.conf;llext_relocatable.conf.sof-arl-hdmi.tplg, comparing Phase 2 (part 2): move src/idc to src/kernel/idc #11398 and this branch.All of the above was run on 78b23ad with #11394 and #11398 applied. After the rebase onto 414a8a2 (current main, including #11398), the patch is unchanged, and the firmware builds, the host library and cmocka were repeated at the tip.
🤖 Generated with Claude Code