From 6211a70efefc1b12e8b9906ba5d886e45c9bff4d Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 29 Oct 2026 13:29:46 +0200 Subject: [PATCH 1/2] app: move ll_userspace_overlay.conf out of the ptl overlay folder Move the LL user-space overlay from app/overlays/ptl/ to app/, next to the other target-agnostic overlays like os_linux_overlay.conf, and update the automatic inclusion in app/CMakeLists.txt and the reference in the userspace README. To make the overlay usable on targets that do not enable user-space in their board configuration (unlike ptl), add the Zephyr CONFIG_USERSPACE and CONFIG_DYNAMIC_THREAD* dependencies to the overlay itself, together with CONFIG_SOF_STACK_SIZE=8192, which the ptl board file sets alongside them. CONFIG_SOF_STACK_SIZE is the default DP thread stack size, and the DP threads run in user space once CONFIG_USERSPACE is enabled. These are already set in the ptl board file, so there is no functional change for ptl. Signed-off-by: Kai Vehmanen --- app/CMakeLists.txt | 2 +- app/{overlays/ptl => }/ll_userspace_overlay.conf | 13 ++++++++++++- src/include/sof/userspace/README.md | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) rename app/{overlays/ptl => }/ll_userspace_overlay.conf (80%) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index b66ab5b0735e..db3d49299b81 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -11,7 +11,7 @@ if(DEFINED EXTRA_CONF_FILE AND (BOARD MATCHES "/ptl" OR BOARD_QUALIFIERS MATCHES string(FIND "${EXTRA_CONF_FILE}" "ll_userspace_overlay" _ll_overlay_idx) if(_linux_overlay_idx GREATER_EQUAL 0 AND _ll_overlay_idx LESS 0) list(APPEND EXTRA_CONF_FILE - "${CMAKE_CURRENT_SOURCE_DIR}/overlays/ptl/ll_userspace_overlay.conf") + "${CMAKE_CURRENT_SOURCE_DIR}/ll_userspace_overlay.conf") endif() endif() diff --git a/app/overlays/ptl/ll_userspace_overlay.conf b/app/ll_userspace_overlay.conf similarity index 80% rename from app/overlays/ptl/ll_userspace_overlay.conf rename to app/ll_userspace_overlay.conf index a74ef5563f29..ede05ef650a6 100644 --- a/app/overlays/ptl/ll_userspace_overlay.conf +++ b/app/ll_userspace_overlay.conf @@ -7,6 +7,17 @@ # Enable user-space LL support in SOF # ----------------------------------- +# dependencies +CONFIG_USERSPACE=y +CONFIG_DYNAMIC_THREAD=y +CONFIG_DYNAMIC_THREAD_ALLOC=y +CONFIG_DYNAMIC_THREAD_PREFER_ALLOC=y + +# DP threads use this stack size by default and run in user-space +# when user-space is enabled, match the ptl board setting +CONFIG_SOF_STACK_SIZE=8192 + +# enable LL pipes in user CONFIG_SOF_USERSPACE_LL=y # make the drivers work in user-space @@ -43,6 +54,6 @@ CONFIG_SOF_ZEPHYR_SYS_USER_HEAP_SIZE=0x40000 CONFIG_SOF_ZEPHYR_HEAP_SIZE=0x60000 CONFIG_VIRTUAL_HEAP=n -# sof-ptl-nocodec.tplg requires more than 64 partitions for DP +# e.g. sof-ptl-nocodec.tplg requires more than 64 partitions for DP # (vregion is created for each pipeline) CONFIG_MAX_DOMAIN_PARTITIONS=128 diff --git a/src/include/sof/userspace/README.md b/src/include/sof/userspace/README.md index 0ce4abf7d7cc..13d2be4841bf 100644 --- a/src/include/sof/userspace/README.md +++ b/src/include/sof/userspace/README.md @@ -16,7 +16,7 @@ SOF supports several privilege configurations. On PTL (`intel_adsp_ace30_ptl`) t config enables `CONFIG_USERSPACE` and `CONFIG_SOF_USERSPACE_PROXY`, running individual audio modules in isolated user threads via the proxy container. For Linux builds (`os_linux_overlay.conf`), `app/CMakeLists.txt` automatically includes -`app/overlays/ptl/ll_userspace_overlay.conf`, which additionally enables +`app/ll_userspace_overlay.conf`, which additionally enables `CONFIG_SOF_USERSPACE_LL` so the entire LL pipeline and the module-facing IPC run in user threads. This is the standard PTL Linux build configuration. The kernel keeps the OS/HAL, boot, drivers, and the syscall validators in both cases. From 7633d8b6dfe62e2d6958cf6fda1fa8fc4ab69529 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 29 Oct 2026 13:30:26 +0200 Subject: [PATCH 2/2] app: CMakeLists: auto-include LL userspace overlay for ACE3.x and newer Extend the automatic inclusion of ll_userspace_overlay.conf for Linux builds (os_linux_overlay.conf in EXTRA_CONF_FILE) from ptl to all Intel ACE3.x and newer targets, e.g. ptl, wcl, nvl and nvl-s. Match on the board name ("intel_adsp/aceXY/...") instead of listing targets individually, so future ACE versions get the same default. The board target can be passed either in full in BOARD or split into BOARD and BOARD_QUALIFIERS, so match on the concatenation of the two to handle both forms. Update the userspace README accordingly. Signed-off-by: Kai Vehmanen --- app/CMakeLists.txt | 8 ++++++-- app/ll_userspace_overlay.conf | 5 +++-- src/include/sof/userspace/README.md | 10 +++++----- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index db3d49299b81..fe9b208fe99f 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -5,8 +5,12 @@ cmake_minimum_required(VERSION 3.21.0) # Board specific overlays (these must be before find_package(Zephyr)) # ------------------------------------------------------------------- -# Intel PTL: if "os_linux_overlay" used, also add "ll_userspace_overlay" -if(DEFINED EXTRA_CONF_FILE AND (BOARD MATCHES "/ptl" OR BOARD_QUALIFIERS MATCHES "/ptl")) +# Intel ACE3.x and newer (e.g. ptl, wcl, nvl): if "os_linux_overlay" +# used, also add "ll_userspace_overlay". The board target may be given +# in full in BOARD ("intel_adsp/ace30/ptl") or split into BOARD and +# BOARD_QUALIFIERS ("intel_adsp" + "ace30/ptl"), so match on both. +if(DEFINED EXTRA_CONF_FILE AND + "${BOARD}/${BOARD_QUALIFIERS}" MATCHES "^intel_adsp/ace[3-9][0-9]/") string(FIND "${EXTRA_CONF_FILE}" "os_linux_overlay" _linux_overlay_idx) string(FIND "${EXTRA_CONF_FILE}" "ll_userspace_overlay" _ll_overlay_idx) if(_linux_overlay_idx GREATER_EQUAL 0 AND _ll_overlay_idx LESS 0) diff --git a/app/ll_userspace_overlay.conf b/app/ll_userspace_overlay.conf index ede05ef650a6..79ebcff70252 100644 --- a/app/ll_userspace_overlay.conf +++ b/app/ll_userspace_overlay.conf @@ -1,8 +1,9 @@ # This is overlay configuration file to enable user-space LL audio # pipeline support. # -# NOTE: this overlay is automatically included if PTL is built -# with generic "os_linux_overlay.conf" +# NOTE: this overlay is automatically included if an Intel ACE3.x +# or newer target (e.g. ptl, wcl, nvl) is built with generic +# "os_linux_overlay.conf" # Enable user-space LL support in SOF # ----------------------------------- diff --git a/src/include/sof/userspace/README.md b/src/include/sof/userspace/README.md index 13d2be4841bf..1448838cc8a4 100644 --- a/src/include/sof/userspace/README.md +++ b/src/include/sof/userspace/README.md @@ -16,10 +16,10 @@ SOF supports several privilege configurations. On PTL (`intel_adsp_ace30_ptl`) t config enables `CONFIG_USERSPACE` and `CONFIG_SOF_USERSPACE_PROXY`, running individual audio modules in isolated user threads via the proxy container. For Linux builds (`os_linux_overlay.conf`), `app/CMakeLists.txt` automatically includes -`app/ll_userspace_overlay.conf`, which additionally enables -`CONFIG_SOF_USERSPACE_LL` so the entire LL pipeline and the module-facing IPC run in user -threads. This is the standard PTL Linux build configuration. The kernel keeps the OS/HAL, -boot, drivers, and the syscall validators in both cases. +`app/ll_userspace_overlay.conf` on Intel ACE3.x and newer targets (e.g. ptl, wcl, nvl), which +additionally enables `CONFIG_SOF_USERSPACE_LL` so the entire LL pipeline and the module-facing +IPC run in user threads. This is the standard Linux build configuration for these targets. +The kernel keeps the OS/HAL, boot, drivers, and the syscall validators in both cases. The privilege boundary is real, but nothing in the source *layout* signals which side a given file belongs to. This document makes that explicit. @@ -179,7 +179,7 @@ graph TD Key options: - **`SOF_USERSPACE_LL`** — run LL pipelines in user threads (`depends on USERSPACE`; selects - the ALLOC/DMA/VREGION interfaces). This is what the PTL overlay turns on. + the ALLOC/DMA/VREGION interfaces). This is what `ll_userspace_overlay.conf` turns on. - **`SOF_USERSPACE_PROXY`** — run modules inside a proxy container that forwards kernel-side calls to user-privileged module code (selects the driver + shared heaps). - **`SOF_USERSPACE_APPLICATION`** — not user-settable; a shortcut for