-
Notifications
You must be signed in to change notification settings - Fork 349
[DRAFT] userspace LL/audio test PR #10558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
kv2019i
wants to merge
99
commits into
thesofproject:main
Choose a base branch
from
kv2019i:feat/userspace-ll-wip
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
99 commits
Select commit
Hold shift + click to select a range
f9f41fd
(---section submitted PRs START)
kv2019i f49173d
.github: add basic copilot.md pointing to .agent/rules
kv2019i 36dff47
(---section submitted PRs STOP)
kv2019i 0fca8a3
(---section: user LL infra START)
kv2019i 87221cf
ipc: move standalone-test check later in ipc_init()
kv2019i bb4d869
audio: component: add comp_grant_access_to_thread()
kv2019i 23e34d3
pipeline: protect component connections with a mutex
kv2019i 965b847
rtos: alloc.h: add sof_sys_user_heap_get()
kv2019i c939110
zephyr: rtos: userspace_helper.h: add sysuser memory partition
kv2019i c58e781
zephyr: lib: make sof_heap_alloc/free system calls
kv2019i aaa70af
schedule: zephyr_ll_user: make the heap accessible from user-space
kv2019i eb52b4a
schedule: zephyr_ll: convert pdata->sem into a dynamic object
kv2019i 3bf5bd6
schedule: zephyr_ll_user: move user accessible heap to common partition
kv2019i fbd1478
dma: dma_sg: allocate on specific heap
kv2019i a64e50b
buffer: extend ability to allocate on specific heap to all functions
kv2019i 6675451
app: overlays: ptl: add ll_usespace_overlay.conf
kv2019i abec210
(---section: user LL infra STOP)
kv2019i c097472
(---section host-zephyr START)
kv2019i 14b905c
zephyr: userspace: sof_dma: allow circular SG lists
kv2019i 7ec96b8
zephyr: lib: dma: make DMA platform data available to user-space
kv2019i fa2e999
audio: host-zephyr: select heap when allocating host buffers
kv2019i be7aae3
audio: host-zephyr: rework calls to DMA driver, remove channel pointer
kv2019i 8c45eb2
audio: host-zephyr: pass component heap to dma_sg_alloc
kv2019i 928e5de
alloc.h: remove rbrelloac() and rbrealloc_align()
kv2019i c8fed9c
audio: host-zephyr: ensure host data heap is set
kv2019i b1a195f
audio: host-zephyr: make component usable from user-space
kv2019i 89b52cd
(---section host-zephyr STOP)
kv2019i 6640ecb
(---section dai-zephyr START)
kv2019i b81b763
audio: pcm_converter: make global tables available to user-space
kv2019i 778f9f8
audio: buffer: replace notifier events with direct probe callbacks
kv2019i 74f8326
audio: dai-zephyr: make memory allocations user-space compatible
kv2019i 50d9e79
lib: dai: make dai_get() and dai_put() compatible with user-space
kv2019i 430a1e9
audio: dai-zephyr: rework calls to DMA driver, remove channel pointer
kv2019i 0abe84b
audio: dai-zephyr: convert spinlock into mutex for properties
kv2019i 49fc2a8
audio: dai-zephyr: migrate to use dai_get_properties_copy()
kv2019i 4362682
(---section dai-zephyr STOP)
kv2019i 0c9e77d
(---section audio module infra START)
kv2019i b3bd326
audio: module_adapter: alloc from LL user heap if LL run in user
kv2019i 939a590
audio: copier: export copier endpoint ops to user-space
kv2019i f350ad2
(---section schduler changes START)
kv2019i 3057958
schedule: zephyr_ll: add zephyr_ll_task_free()
kv2019i bec9aca
schedule: zephyr_ll: add zephyr_ll_grant_access()
kv2019i 39d6117
schedule: zephyr_ll_user: make double-mapping conditional
kv2019i a5ac81e
schedule: allocate the scheduler objects with sof_heap_alloc
kv2019i 6afb9c5
WIP: schedule: limit user-LL to core0
kv2019i 17b8165
zephyr: schedule: allow user-space to access scheduler list
kv2019i 61a2625
zephyr: wrapper: modify platform_dai_wallclock() for user-space
kv2019i b16ada6
schedule: add scheduler_init_context() and scheduler_free_context()
kv2019i ef719d5
schedule: zephyr_ll: implement scheduler_init_context()
kv2019i 58c1934
schedule: ll_schedule_domain: add domain_thread_init/free ops
kv2019i a1c0235
schedule: zephyr_ll: implement thread_init/free domain ops
kv2019i 33ea25e
schedule: zephyr_ll: ISR check is not needed when LL in user-space
kv2019i 2394d81
zephyr: userspace_helper: add new sys_user_heap_init()
kv2019i 837b43f
(---section schduler changes END)
kv2019i 2cad315
(---section audio-user PRs START)
kv2019i daef83a
schedule: zephyr_domain: use a different thread name for user LL
kv2019i a7d0de9
WIP: audio: dai-zephyr: temporary solution to give access to mutex
kv2019i e4b0979
WIP: audio: module_adapter: use correct heap when freeing
kv2019i 685a084
coherent: disable core debug checks for user-space builds
kv2019i 67a837f
audio: place component driver list in user-space accessible partition
kv2019i 3699cf5
audio: module_adapter: make adapter buffering user-space compatible
kv2019i 4f80b18
audio: pipeline: use LL scheduler mutex for userspace pipeline triggers
kv2019i 09fc300
audio: buffer: move dp_heap_user lifecycle to IPC and module adapter
kv2019i 75fdd25
audio: host-zepher: add HOST_DMA_IPC_POSITION_UPDATES Kconfig
kv2019i a4666e7
audio: copier_host: make FPI sync group availble to user-space
kv2019i 0ee858c
audio: copier: avoid IRQ lock/unlock in chmap code
kv2019i cfea4a3
audio: module_adapter: avoid IRQ lock/unlock in prepare()
kv2019i ac1ccdb
audio: module_adapter: make data_blob compatible with user-space
kv2019i 9f5f1bb
audio: make comp_drivers_get() accessible from user-space
kv2019i 1cd3e7d
dai: turn dai_get_device() into a syscall
kv2019i 191b563
(---section audio user PRs STOP)
kv2019i a50f2ad
(---section: IPC user support START)
kv2019i 06facd6
userspace: split ipc files into user and kernel features. REVISIT memcpy
kv2019i 5fb9a65
ipc4: helper: use LL scheduler lock for userspace builds
kv2019i 28df06f
WIP: ipc: implement user-space IPC handling for CREATE_PIPELINE
kv2019i 3f1be0c
WIP: ipc: ipc4: route PIPELINE_DELETE to user-space handler
kv2019i 97a43e8
ipc: make IPC stack thread size configurable
6ab5504
ipc: ipc4: use sof_heap_alloc in ipc4_add_comp_dev()
kv2019i c983dcd
ipc: turn ipc_msg_reply() into a system call
kv2019i 421398e
ipc: ipc4: use correct API to get DMA status
kv2019i ca9f096
ipc: use application heap for IPC pipeline and component allocations
kv2019i d624e43
ipc4: make fw_reg mutex available to user-space
kv2019i 9531c3a
ipc: ipc-helper: make ipc_comp_free() user-space compatible
kv2019i f5d7f08
ipc: ipc4: helper: make ipc4_search_for_drv() userspace compatible
kv2019i 9c28ab3
WIP: user-space: avoid use of k_object_free() in user code
kv2019i 1c408ce
WIP: schedule: add multi-core support for user-space LL scheduler
kv2019i 9af9d13
ipc: ipc-helper: trace context not used in user-space
kv2019i f0d3411
ipc: ipc4: use the core number from IPC config
kv2019i 8b82303
ipc: ipc4: helper: enable limited ipc_comp_connect() in user-space
kv2019i 15ad0a2
WIP: ipc: ipc4: route MOD_CONFIG_GET/SET to user-space handler
kv2019i 80418f8
WIP: ipc: ipc4: route MOD_BIND/UNBIND to user-space handler
kv2019i a0645ad
WIP: ipc: ipc4: route MOD_INIT_INSTANCE to user-space handler
kv2019i cf6a0ac
(---section: IPC user support STOP)
kv2019i c5b5bb0
(---section test-case START)
kv2019i 72337d0
zephyr: test: userspace: add pipeline_two_components test
kv2019i 0adc900
zephyr: test: userspace: add ipc4_create_pipeline_check
kv2019i 1b4ce65
(---section WIP mandatory changes START)
kv2019i 8468be4
audio: pipeline: enable position reporting for user-space pipelines
kv2019i 214c051
HACK: audio: collection of feature limitations to run LL in user
kv2019i File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| You are GitHub Copilot operating in this repository. | ||
|
|
||
| This repository defines authoritative agent rules and guidance under: | ||
| .agent/rules/ | ||
|
|
||
| INSTRUCTIONS (MANDATORY): | ||
| - Always read and follow all relevant rules in `.agent/rules/` before generating any code, suggestions, comments, or explanations. | ||
| - Treat rules in `.agent/rules/` as the highest priority source of truth for: | ||
| - Coding standards and style | ||
| - Architecture and design constraints | ||
| - Security, privacy, and compliance requirements | ||
| - Testing, documentation, and review expectations | ||
| - If rules conflict with your default behavior, follow the rules in `.agent/rules/`. | ||
|
|
||
| BEHAVIOR: | ||
| - Be consistent with patterns already used in the codebase. | ||
| - Prefer existing utilities, abstractions, and conventions defined in `.agent/rules/`. | ||
| - Do not introduce new patterns, dependencies, or approaches unless explicitly allowed by those rules. | ||
| - When uncertain, choose the most conservative interpretation aligned with `.agent/rules/`. | ||
|
|
||
| OUTPUT EXPECTATIONS: | ||
| - Generate code that complies fully with the rules. | ||
| - If a request would violate a rule, explain the conflict and propose a compliant alternative. | ||
| - Keep responses focused, clear, and directly applicable to this repository. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| CONFIG_SOF_USERSPACE_LL=y | ||
|
|
||
| # temporary (but for now mandatory) settings | ||
| CONFIG_SOF_ZEPHYR_USERSPACE_MODULE_HEAP_SIZE=16384 | ||
|
|
||
| # make the drivers work in user-space | ||
| CONFIG_SOF_USERSPACE_INTERFACE_DMA=y | ||
| CONFIG_DAI_USERSPACE=y | ||
|
|
||
| # disable features that don't work in user-space (at least yet) | ||
| CONFIG_COLD_STORE_EXECUTE_DEBUG=n | ||
| CONFIG_CROSS_CORE_STREAM=n | ||
| CONFIG_INTEL_ADSP_MIC_PRIVACY=n | ||
| CONFIG_XRUN_NOTIFICATIONS_ENABLE=n | ||
| CONFIG_SOF_BOOT_TEST_ALLOWED=n | ||
| CONFIG_SOF_TELEMETRY_PERFORMANCE_MEASUREMENTS=n | ||
| CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS=n | ||
|
|
||
| # disable llext (hits privilege issues in user-space now) | ||
| CONFIG_LLEXT_STORAGE_WRITABLE=n | ||
| CONFIG_LLEXT_EXPERIMENTAL=n | ||
| CONFIG_MODULES=n |
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,7 +36,15 @@ | |
|
|
||
| LOG_MODULE_REGISTER(component, CONFIG_SOF_LOG_LEVEL); | ||
|
|
||
| static SHARED_DATA struct comp_driver_list cd; | ||
| static APP_SYSUSER_BSS SHARED_DATA struct comp_driver_list cd; | ||
|
|
||
| #ifdef CONFIG_SOF_USERSPACE_LL | ||
| struct comp_driver_list *comp_drivers_get(void) | ||
| { | ||
| return platform_shared_get(&cd, sizeof(cd)); | ||
| } | ||
| EXPORT_SYMBOL(comp_drivers_get); | ||
| #endif | ||
|
|
||
| SOF_DEFINE_REG_UUID(component); | ||
|
|
||
|
|
@@ -699,3 +707,11 @@ void comp_update_ibs_obs_cpc(struct comp_dev *dev) | |
| #endif | ||
| } | ||
|
|
||
| #ifdef CONFIG_SOF_USERSPACE_LL | ||
| void comp_grant_access_to_thread(const struct comp_dev *dev, struct k_thread *th) | ||
| { | ||
| assert(dev->list_mutex); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. description a bit confusing - this is only granting access to a mutex. Also |
||
| tr_dbg(&ipc_tr, "grant access to mutex %p for thread %p", dev->list_mutex, th); | ||
| k_thread_access_grant(th, dev->list_mutex); | ||
| } | ||
| #endif | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the commit, that is mentioned in the commit message, only moved buffer context objects to particular heaps. This commit moves actual data buffers to them too, which is different and (arguably) more risky