qemu: add support for qemu MMU target.#10575
qemu: add support for qemu MMU target.#10575lgirdwood wants to merge 4 commits intothesofproject:mainfrom
Conversation
${sof_module} no longer set anywhere and resolved to NULL. Fix with
correct paths.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Userspace can be built without fast_get(). Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add a qemu target for SOF that will build with native zephyr support for drivers including xtensa MMU. This will be used for GH worklow ztest validation and as a SDV for userspace work. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Call directly here as more qemu target wont simulate IPC which is used as entry for testing on HW. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
There was a problem hiding this comment.
Pull request overview
Adds a minimal SOF “qemu_xtensa” platform wiring to enable running Zephyr userspace/ztest workloads on QEMU Xtensa DC233C (incl. MMU variant), primarily for CI and local development.
Changes:
- Introduce a new
qemu_xtensaplatform subtree (platform source + stub platform headers) and hook it into Zephyr/XTOS CMake selection. - Extend build tooling (
xtensa-build-zephyr.py,set_xtensa_params.sh) and app board configs to build/run QEMU DC233C targets. - Update app entry to optionally run SOF boot tests on QEMU and adjust userspace syscall gating.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| zephyr/test/userspace/README.md | Documents how to build/run userspace tests on QEMU DC233C MMU. |
| zephyr/CMakeLists.txt | Adds include paths and selects qemu_xtensa platform + sources when building for QEMU Xtensa. |
| src/platform/qemu_xtensa/platform.c | Adds a (currently minimal) QEMU platform implementation file. |
| src/platform/qemu_xtensa/include/platform/trace/trace.h | Adds a dummy trace header for the QEMU platform. |
| src/platform/qemu_xtensa/include/platform/platform.h | Adds a dummy platform header for the QEMU platform. |
| src/platform/qemu_xtensa/include/platform/lib/memory.h | Adds a dummy platform memory header for the QEMU platform. |
| src/platform/qemu_xtensa/include/platform/lib/mailbox.h | Adds a dummy mailbox layout/ops header for the QEMU platform. |
| src/platform/qemu_xtensa/include/platform/lib/dma.h | Adds a dummy DMA header for the QEMU platform. |
| src/platform/qemu_xtensa/include/platform/lib/dai.h | Adds a dummy DAI header for the QEMU platform. |
| src/platform/qemu_xtensa/include/platform/lib/clk.h | Adds a dummy clock header for the QEMU platform. |
| src/platform/qemu_xtensa/CMakeLists.txt | Adds CMake glue to build QEMU platform sources in XTOS-style builds. |
| src/platform/CMakeLists.txt | Registers the qemu_xtensa platform subdirectory when selected. |
| src/audio/module_adapter/module/generic.c | Wraps userspace syscall verification/marshalling for mod_fast_get behind CONFIG_FAST_GET. |
| scripts/xtensa-build-zephyr.py | Adds QEMU board targets and skips firmware install/RI info for QEMU builds. |
| scripts/set_xtensa_params.sh | Adds QEMU xtensa toolchain settings and sets Zephyr toolchain variant for QEMU targets. |
| app/src/main.c | Adds optional QEMU-only boot test execution and includes boot test header. |
| app/boards/qemu_xtensa_dc233c_mmu.conf | Adds a Zephyr app board config for QEMU DC233C MMU. |
| app/boards/qemu_xtensa_dc233c.conf | Adds a Zephyr app board config for QEMU DC233C. |
| app/CMakeLists.txt | Switches SOF include dirs to a repo-relative path (instead of ${sof_module}). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ack - get more MMU on developers desks :) |
tmleman
left a comment
There was a problem hiding this comment.
LGTM
I have only two questions (nothing blocking integration of these changes):
- don't we want to immediately add building this target in CI (this way we would have certainty that we're integrating code that compiles)
- while reviewing workflow results to check if this builds, I noticed that WCL builds together with imx95 (and only on Linux), does anyone know why?
Yes, that's the plan - GH workflow coming with more ztests.
I suspect due to Zephyr SDK being partitioned into smaller chunks so it can fit on GH runner VM disks (but I may be wrong). |
Intended use is CI ztests and userspace development