-
Notifications
You must be signed in to change notification settings - Fork 319
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
[BUG] make CONFIG_SOF_ZEPHYR_STRICT_HEADERS the default #9015
Comments
Not sure I can tackle this in time for v2.10, but assigning for myself, as nobody else is assigned. |
Update for v2.10: spent some time on this trying to make one Intel target build in strict headers mode, but could not complete the task. There is still quite a lot of use of e..g sof/lib/mailbox.h and sof/lib/memory.h in surprising places in audio code that needs to be cleaned up first. Also we have some SOF side functions list SOF list.h and perf_cnt -- for these, move to some common header might be easier. For now moving to v2.11 -- might be able to complete some of this work in June, but won't backport to 2.10 release (as no functional benefit for the release). |
Work breakdown added to the issue description with already done worked marked as done. |
Implement sof/lib/dai.h for Zephyr build and do not rely o the xtos version for Zephyr builds. Add a warning to catch invalid build configurations. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
Implement sof/lib/dai.h for Zephyr build and do not rely o the xtos version for Zephyr builds. Add a warning to catch invalid build configurations. Link: #9015 Signed-off-by: Kai Vehmanen <[email protected]>
Implement sof/lib/dai.h for Zephyr build and do not rely o the xtos version for Zephyr builds. Add a warning to catch invalid build configurations. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
Remove the shim.h interface from RTOS layer as there is no use of this interface anymore in SOF codebase. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
sof/list.h is a software interface used by the audio pipeline framework and should not be in the RTOS abstraction layer. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
2.11 cutoff day. Some progress with this. Work breakdown has been done and shared as a task list in bug description. At end of 2.11 cycle, we have 23 out of 35 identified tasks completed. Pushing the remaining work to v2.12. |
sof/list.h is a software interface used by the audio pipeline framework and should not be in the RTOS abstraction layer. Link: #9015 Signed-off-by: Kai Vehmanen <[email protected]>
Remove the shim.h interface from RTOS layer as there is no use of this interface anymore in SOF codebase. Link: #9015 Signed-off-by: Kai Vehmanen <[email protected]>
Introduce a separate file for Zephyr compiler_attributes.h and move all Zephyr-specific definitions to this file. This is a prerequisite to build with CONFIG_SOF_ZEPHYR_STRICT_HEADERS=y. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
I like the idea of using a driver for the IPC stuff. One aparent flaw I've noticed with our current mailbox implementation is that it's not really MMU friendly. On imx93 (ARM64 architecture, MMU enabled) we had to deal with this by adding some static phys-virt mappings inside If we are to add such a driver in Zephyr (or extend the one used by Intel) assuming we're going to be using Zephyr's mbox API, we also need to switch our mailbox unit driver (talking about the imx one) to Zephyr (we already have 2 of them, but not sure how "complete" they are - @iuliana-prodan may be able to comment on this). Nevertheless, it's some extra work, but it must be done at some point. |
The SOF perf_cnt.h provides a simple performance counter interface that is used in SOF to track performance at audio module and pipeline level. Majority of the implementation is RTOS agnostic, relying on sof_cycle_get_64() to sample platform clock, and timer_get_system() for CPU clock, both defined in rtos/timer.h. There is however some conditional rules for Zephyr to use timing_counter_get() if SOF is built with CONFIG_TIMING_FUNCTIONS=y. The amount of RTOS variation does not seem to warrant branching the whole perf_cnt.h to RTOS layer. Move perf_cnt.h back to application interface, so the single implementation can be shared. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
The SOF perf_cnt.h provides a simple performance counter interface that is used in SOF to track performance at audio module and pipeline level. Majority of the implementation is RTOS agnostic, relying on sof_cycle_get_64() to sample platform clock, and timer_get_system() for CPU clock, both defined in rtos/timer.h. There is however some conditional rules for Zephyr to use timing_counter_get() if SOF is built with CONFIG_TIMING_FUNCTIONS=y. The amount of RTOS variation does not seem to warrant branching the whole perf_cnt.h to RTOS layer. Move perf_cnt.h back to application interface, so the single implementation can be shared. Link: #9015 Signed-off-by: Kai Vehmanen <[email protected]>
Implement sof/lib/memory.h for Zephyr build and do not rely on the xtos version for Zephyr builds. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
The SOF DMA RTOS interface is one of the largest and also one of the hardest to maintain, as it's used a lot in SOF, and there is unfortunate overlap in interface naming between Zephyr and XTOS. To get the cleanup work started, branch out the sof/lib/dma.h for Zephyr and remove the conditional definitions from both versions. This patch maintains support for all build variants, including building SOF with Zephyr but using XTOS drivers. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
The SOF mailbox.h provides an interface to host-DSP mailboxes, which is used widely in SOF IPC and debug code. This interface is OS agnostistic and only relies on platform/lib/mailbox.h to define the mailbox locations, and rtos/cache.h to define portable cache primitives to invalidate/writeback mailbox data before/after use. The amount of RTOS variation does not seem to warrant branching the whole mailbox.h to RTOS layer. Move mailbox.h back to application interface, so the single implementation can be shared. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
Added: xtos/sof/trace/preproc.h |
Implement sof/lib/memory.h for Zephyr build and do not rely on the xtos version for Zephyr builds. Link: #9015 Signed-off-by: Kai Vehmanen <[email protected]>
The SOF DMA RTOS interface is one of the largest and also one of the hardest to maintain, as it's used a lot in SOF, and there is unfortunate overlap in interface naming between Zephyr and XTOS. To get the cleanup work started, branch out the sof/lib/dma.h for Zephyr and remove the conditional definitions from both versions. This patch maintains support for all build variants, including building SOF with Zephyr but using XTOS drivers. Link: #9015 Signed-off-by: Kai Vehmanen <[email protected]>
The SOF mailbox.h provides an interface to host-DSP mailboxes, which is used widely in SOF IPC and debug code. This interface is OS agnostistic and only relies on platform/lib/mailbox.h to define the mailbox locations, and rtos/cache.h to define portable cache primitives to invalidate/writeback mailbox data before/after use. The amount of RTOS variation does not seem to warrant branching the whole mailbox.h to RTOS layer. Move mailbox.h back to application interface, so the single implementation can be shared. Link: #9015 Signed-off-by: Kai Vehmanen <[email protected]>
Add Zephyr version of sof/init.h. This is used define main entry points to the SOF application. The arch_init() entry point is not needed on Zephyr. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
Move the SOF trace implementation back to app level. While Zephyr logging is preferred solution for newer targets, the old sof-logger can be supported in Zephyr and code exists to support this usage. Move the trace preprocessor back to app level and allow it to be used if CONFIG_TRACE=y is set in the build. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
Add Zephyr version of sof/init.h. This is used define main entry points to the SOF application. The arch_init() entry point is not needed on Zephyr. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
Add Zephyr version of sof/trace/preproc.h interface. The full preproc.h interface needed for CONFIG_TRACE is not duplicated here, so this commit effectively prevents using CONFIG_TRACE in Zephyr. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
Add Zephyr version of sof/init.h. This is used define main entry points to the SOF application. The arch_init() entry point is not needed on Zephyr. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
Add Zephyr version of sof/init.h. This is used define main entry points to the SOF application. The arch_init() entry point is not needed on Zephyr. Link: #9015 Signed-off-by: Kai Vehmanen <[email protected]>
Add Zephyr version of sof/trace/preproc.h interface. The full preproc.h interface needed for CONFIG_TRACE is not duplicated here, so this commit effectively prevents using CONFIG_TRACE in Zephyr. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
Add Zephyr version of sof/trace/preproc.h interface. The full preproc.h interface needed for CONFIG_TRACE is not duplicated here, so this commit effectively prevents using CONFIG_TRACE in Zephyr. Link: #9015 Signed-off-by: Kai Vehmanen <[email protected]>
Remove CONFIG_SOF_ZEPHYR_STRICT_HEADERS and make strict headers mode the only supported way to build SOF with Zephyr. This means SOF Zephyr builds do not use any headers from sof/xtos/include anymore. This change simplifies the SOF build as full RTOS adaptation is in sof/zephyr/include for Zephyr builds. Link: thesofproject#9015 Signed-off-by: Kai Vehmanen <[email protected]>
Remove CONFIG_SOF_ZEPHYR_STRICT_HEADERS and make strict headers mode the only supported way to build SOF with Zephyr. This means SOF Zephyr builds do not use any headers from sof/xtos/include anymore. This change simplifies the SOF build as full RTOS adaptation is in sof/zephyr/include for Zephyr builds. Link: #9015 Signed-off-by: Kai Vehmanen <[email protected]>
With #9627 all work for this done, marking this as closed. |
Describe the bug/enhancement
When rtos include layer was added in #6161 , CONFIG_SOF_ZEPHYR_STRICT_HEADERS was added as a transitory tool.
This is still in place and can cause confusing issues as both XTOS and Zephyr headers are added to the include path by default.
To Reproduce
Build target, check .config
Reproduction Rate
100%
Expected behavior
OS include paths not mixed in build.
Impact
Slows down development of new features.
Environment
SOF main as of 2024-04-09
Work breakdown
Following subtasks identified (breakdown started in v2.11 cycle):
Screenshots or console output
The text was updated successfully, but these errors were encountered: