-
Notifications
You must be signed in to change notification settings - Fork 350
Add sof_sys_user_heap_get() and APP_SYSUSER_DATA/BSS macros #10732
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,14 @@ | |
| #define APP_TASK_BSS K_APP_BMEM(common_partition) | ||
| #define APP_TASK_DATA K_APP_DMEM(common_partition) | ||
|
|
||
| #ifdef CONFIG_SOF_USERSPACE_LL | ||
| #define APP_SYSUSER_BSS K_APP_BMEM(sysuser_partition) | ||
| #define APP_SYSUSER_DATA K_APP_DMEM(sysuser_partition) | ||
|
kv2019i marked this conversation as resolved.
|
||
| #else | ||
| #define APP_SYSUSER_BSS | ||
| #define APP_SYSUSER_DATA | ||
| #endif | ||
|
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. do I understand it correctly, that in principle we could just use
Collaborator
Author
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. That does apply, but also APP_SYSUSER objects are NOT available to all user-space threads. The LL user thread has much more access to system resources than e.g. DP modules running in their own user-space thread. So we do not want to use APP_TASK for these objects. But ack, better to clarify in inline comments. |
||
|
|
||
| struct processing_module; | ||
| struct userspace_context; | ||
|
|
||
|
|
@@ -137,4 +145,27 @@ static inline int user_access_to_mailbox(struct k_mem_domain *domain, k_tid_t th | |
|
|
||
| #endif /* CONFIG_USERSPACE */ | ||
|
|
||
| #ifdef CONFIG_SOF_USERSPACE_LL | ||
|
|
||
| int user_memory_attach_system_user_partition(struct k_mem_domain *dom); | ||
|
kv2019i marked this conversation as resolved.
|
||
|
|
||
| #else | ||
|
|
||
| /** | ||
| * Attach SOF system user memory partition to a memory domain. | ||
| * @param dom - memory domain to attach the sysuser partition to. | ||
| * | ||
| * @return 0 for success, error otherwise. | ||
| * | ||
| * @note | ||
| * Function used only when CONFIG_USERSPACE is set. | ||
| * The sysuser partition contains shared objects required by user-space modules. | ||
| */ | ||
| static inline int user_memory_attach_system_user_partition(struct k_mem_domain *dom) | ||
| { | ||
| return 0; | ||
| } | ||
|
|
||
| #endif /* CONFIG_SOF_USERSPACE_LL */ | ||
|
|
||
| #endif /* __ZEPHYR_LIB_USERSPACE_HELPER_H__ */ | ||
Uh oh!
There was an error while loading. Please reload this page.