diff --git a/Kconfig.sof b/Kconfig.sof index 29c6f549fca8..df63811e652b 100644 --- a/Kconfig.sof +++ b/Kconfig.sof @@ -33,6 +33,7 @@ config COLD_STORE_EXECUTE_DRAM config COLD_STORE_EXECUTE_DEBUG bool "Enable checks for cold code on hot paths" + depends on !SOF_USERSPACE_LL help This enables an assert_can_be_cold() check, which causes an exception if called in the LL task context and assert() evaluation is enabled. diff --git a/app/boards/intel_adsp_ace30_ptl.conf b/app/boards/intel_adsp_ace30_ptl.conf index a79ca6e67764..20e866ade585 100644 --- a/app/boards/intel_adsp_ace30_ptl.conf +++ b/app/boards/intel_adsp_ace30_ptl.conf @@ -75,3 +75,5 @@ CONFIG_DYNAMIC_THREAD_PREFER_ALLOC=y CONFIG_SOF_STACK_SIZE=8192 CONFIG_SOF_USERSPACE_PROXY=y CONFIG_MAX_THREAD_BYTES=3 + +CONFIG_MAX_DOMAIN_PARTITIONS=32 diff --git a/src/audio/drc/drc.c b/src/audio/drc/drc.c index 71d93496b766..007336fb2115 100644 --- a/src/audio/drc/drc.c +++ b/src/audio/drc/drc.c @@ -76,7 +76,7 @@ int drc_init_pre_delay_buffers(struct processing_module *mod, int i; /* Allocate pre-delay (lookahead) buffers */ - state->pre_delay_buffers[0] = mod_balloc(mod, bytes_total); + state->pre_delay_buffers[0] = mod_alloc(mod, bytes_total); if (!state->pre_delay_buffers[0]) return -ENOMEM; diff --git a/src/audio/eq_fir/eq_fir.c b/src/audio/eq_fir/eq_fir.c index 793a2294c647..f08b25315616 100644 --- a/src/audio/eq_fir/eq_fir.c +++ b/src/audio/eq_fir/eq_fir.c @@ -220,7 +220,7 @@ static int eq_fir_setup(struct processing_module *mod, int nch) return 0; /* Allocate all FIR channels data in a big chunk and clear it */ - cd->fir_delay = mod_balloc(mod, delay_size); + cd->fir_delay = mod_alloc(mod, delay_size); if (!cd->fir_delay) { comp_err(dev, "delay allocation failed for size %d", delay_size); return -ENOMEM; diff --git a/src/audio/module_adapter/module_adapter.c b/src/audio/module_adapter/module_adapter.c index 658aa5e6e583..01126446860b 100644 --- a/src/audio/module_adapter/module_adapter.c +++ b/src/audio/module_adapter/module_adapter.c @@ -48,7 +48,7 @@ LOG_MODULE_REGISTER(module_adapter, CONFIG_SOF_LOG_LEVEL); struct comp_dev *module_adapter_new(const struct comp_driver *drv, const struct comp_ipc_config *config, const void *spec) { - return module_adapter_new_ext(drv, config, spec, NULL, NULL); + return module_adapter_new_ext(drv, config, spec, NULL, NULL, NULL); } #if CONFIG_MM_DRV @@ -207,11 +207,12 @@ static void module_adapter_mem_free(struct processing_module *mod) struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv, const struct comp_ipc_config *config, const void *const_spec, void *mod_priv, - struct userspace_context *user_ctx) + struct userspace_context *user_ctx, + const struct module_interface *ops) { int ret; struct module_config *dst; - const struct module_interface *const interface = drv->adapter_ops; + const struct module_interface *const interface = ops ? : drv->adapter_ops; struct ipc_config_process spec = *((const struct ipc_config_process *) const_spec); #if CONFIG_IPC_MAJOR_4 @@ -398,7 +399,7 @@ int module_adapter_prepare(struct comp_dev *dev) ret = module_adapter_params(dev, ¶ms); if (ret) { - comp_err(dev, "module_adapter_new() %d: module params failed", ret); + comp_err(dev, "module params failed: %d", ret); return ret; } } diff --git a/src/include/sof/audio/component.h b/src/include/sof/audio/component.h index 7fc9feb53736..d391331eeccc 100644 --- a/src/include/sof/audio/component.h +++ b/src/include/sof/audio/component.h @@ -878,8 +878,10 @@ static inline void comp_init(const struct comp_driver *drv, #ifdef CONFIG_SOF_USERSPACE_LL sys_mutex_init(&dev->list_mutex); #endif +#ifndef __ZEPHYR__ memcpy_s(&dev->tctx, sizeof(dev->tctx), trace_comp_drv_get_tr_ctx(dev->drv), sizeof(struct tr_ctx)); +#endif } /** diff --git a/src/include/sof/audio/module_adapter/module/generic.h b/src/include/sof/audio/module_adapter/module/generic.h index 91bdce96b1c7..94827d86cd9f 100644 --- a/src/include/sof/audio/module_adapter/module/generic.h +++ b/src/include/sof/audio/module_adapter/module/generic.h @@ -324,7 +324,8 @@ struct comp_dev *module_adapter_new(const struct comp_driver *drv, struct userspace_context; struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv, const struct comp_ipc_config *config, const void *spec, - void *mod_priv, struct userspace_context *user_ctx); + void *mod_priv, struct userspace_context *user_ctx, + const struct module_interface *ops); int module_adapter_prepare(struct comp_dev *dev); int module_adapter_params(struct comp_dev *dev, struct sof_ipc_stream_params *params); int module_adapter_copy(struct comp_dev *dev); diff --git a/src/ipc/ipc4/handler-kernel.c b/src/ipc/ipc4/handler-kernel.c index ae75ebc87303..d7d9f417806a 100644 --- a/src/ipc/ipc4/handler-kernel.c +++ b/src/ipc/ipc4/handler-kernel.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -41,11 +40,6 @@ #include #include -#if CONFIG_SOF_BOOT_TEST -/* CONFIG_SOF_BOOT_TEST depends on Zephyr */ -#include -#endif - #include #include #include diff --git a/src/library_manager/lib_manager.c b/src/library_manager/lib_manager.c index b81ec6bbe738..5fe1c1e5c7ab 100644 --- a/src/library_manager/lib_manager.c +++ b/src/library_manager/lib_manager.c @@ -681,7 +681,7 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv, if (comp_set_adapter_ops(drv, ops) < 0) goto err; - dev = module_adapter_new_ext(drv, config, spec, adapter_priv, userspace); + dev = module_adapter_new_ext(drv, config, spec, adapter_priv, userspace, NULL); if (!dev) goto err; diff --git a/src/schedule/zephyr_dp_schedule_application.c b/src/schedule/zephyr_dp_schedule_application.c index 06f2d7b46b12..918f13188671 100644 --- a/src/schedule/zephyr_dp_schedule_application.c +++ b/src/schedule/zephyr_dp_schedule_application.c @@ -494,6 +494,11 @@ int scheduler_dp_task_init(struct task **task, const struct sof_uuid_entry *uid, stack_size, dp_thread_fn, ptask, NULL, NULL, CONFIG_DP_THREAD_PRIORITY, ptask->flags, K_FOREVER); + unsigned int pidx; + size_t size; + uintptr_t start; + bool on_pool = false; + #ifdef CONFIG_SCHED_CPU_MASK /* pin the thread to specific core */ ret = k_thread_cpu_pin(pdata->thread_id, core); @@ -506,10 +511,6 @@ int scheduler_dp_task_init(struct task **task, const struct sof_uuid_entry *uid, k_thread_access_grant(pdata->thread_id, pdata->event, &dp_sync[core]); scheduler_dp_grant(pdata->thread_id, core); - unsigned int pidx; - size_t size; - uintptr_t start; - bool on_pool = false; struct k_mem_domain *mdom = objpool_alloc(&dp_mdom_head, sizeof(*mdom), SOF_MEM_FLAG_COHERENT); diff --git a/zephyr/test/CMakeLists.txt b/zephyr/test/CMakeLists.txt index f548c98c5e73..6edf90ec840a 100644 --- a/zephyr/test/CMakeLists.txt +++ b/zephyr/test/CMakeLists.txt @@ -1,7 +1,10 @@ if(CONFIG_SOF_BOOT_TEST) - zephyr_library_sources_ifdef(CONFIG_VIRTUAL_HEAP - vmh.c - ) + if(NOT CONFIG_SOF_USERSPACE_LL) + zephyr_library_sources_ifdef(CONFIG_VIRTUAL_HEAP + vmh.c + ) + endif() + zephyr_library_sources_ifdef(CONFIG_SOF_VREGIONS vpage.c vregion.c )