-
Notifications
You must be signed in to change notification settings - Fork 318
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
rtos: abstraction: partition RTOS logic into separate directories #6161
Conversation
a3df83a
to
e0a1f82
Compare
f8b7f5e
to
a55a08b
Compare
zephyr/CMakeLists.txt
Outdated
@@ -88,6 +88,10 @@ target_include_directories(SOF INTERFACE ../zephyr/include) | |||
target_include_directories(SOF INTERFACE ${SOF_SRC_PATH}/include) | |||
target_include_directories(SOF INTERFACE ${SOF_SRC_PATH}/arch/${ARCH}/include) | |||
|
|||
# TODO: The xtos-wrapper include PATH will eventually become optional based on the | |||
# RTOS selection. It's manadatory atm until the native Zephyr integration is ready. | |||
target_include_directories(SOF INTERFACE ${SOF_SRC_PATH}/arch/xtos-wrapper/include) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, is this needed even if CONFIG_ZEPHYR_NATIVE_DRIVERS
is used? If not, maybe make it conditional on this, if yes - maybe keep the headers, that Zephyr builds still need at their current locations and only move them over one by one as we stop using them in Zephyr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, that the plan and why it's a TODO. Its still WIP atm.
a55a08b
to
a8cf406
Compare
a8cf406
to
5e13e76
Compare
e5f67c4
to
bf296d6
Compare
bf296d6
to
85b839e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all makes sense to me. Unfortunately it looks likely to collide badly with some terrible (but thematically similar) hackery I've been doing to get SOF to build against the native_posix architecture for an internal fuzzing requirement. There the glitch is "xtensa assumptions in headers" and not "xthal/zephyr assumptions", but the theme is similar.
Ah, we are thinking the same hackery then. Intention is to put all common (i.e. non RTOS logic) in Fwiw, pls see my lrg/topic/plugin branch - I have generic FW running in POSIX environment as an ALSA plugin. i.e. the generic FW exposes a POSIX message queue for IPC which can be fuzzed. This also allows reverse fuzzing of the clients too as we have a message queue for each direction. |
0edd69f
to
3e37e5a
Compare
Target core power on on ALD nocodec, seems unrelated. Lets try again.
|
SOFCI TEST |
f6efd11
to
7a038f5
Compare
No functional runtime change, but changes to rtos partitioning and the layout of headers . This patch creates RTOS specifc header paths and updates spinlock.h and kernel.h to show the new usage. Other headers will incrementally follow. It reuses the current zephyr topleve directory and creates a new toplevel xtos directory for xtos specific files. Due to the mixing of RTOS, driver and library headers at the top level include directory it was necessary to create rtos specific header directories i.e. src/include/rtos-xtos src/include/rtos-zephyr These RTOS include directories will eventually contain RTOS specific headers whilst common logic and structures will be placed in non RTOS directories. This will also mean "#include <sof/spinlock.h>" will become "#include <rtos/spinlock.h>" and will allow easier visualisation of where and why RTOS headers are being used. This will help to eliminate cross usage of headers between RTOSes. Subsequqnt patches will move more headers and rtos specific wrppaer source files into rtos specific locations. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
No runtime functional change. Code can now include <rtos/atomic.h> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
No runtime functional change. Code can now include <rtos/bit.h> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
No runtime semantic change. Use C library when RTOS uses C library otherwise use own C library calls. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
7a038f5
to
7a0a27a
Compare
License server issues on retired platforms. No need to rebuild. |
In preparation for further RTOS abstraction, move the xtos and zephyr specific headers to new top level rtos directories to enable:
This PR reuses the existing zephyr top level directory and creates a new xtos top level directory to store RTOS specific files, logic and wrappers. Other RTOSes like FreeRTOS or CMSIS support would be added in the same way.
This PR makes no runtime functional change, but changes some RTOS specific headers to be included with a new directory. i.e.
now becomes
As this now maps to the correct RTOS and is no longer using the
sof
prefix which is for common code.This PR also adds a high level Kconfig for developers (disabled by default) so that they can easily switch to fully native Zephyr headers for development testing.
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com