Commit Graph

35 Commits

Author SHA1 Message Date
Guennadi Liakhovetski b617910feb zephyr: fix logging build breakage
The use of Zephyr LOG_*() API in SOF is breaking compilation.
Replace it with with the native trace logging until a proper
fix is available.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-04-27 12:11:41 +01:00
Guennadi Liakhovetski 975fa04088 zephyr: allow building with dynamic interrupts disabled
SOF registers IRQ handlers dynamically, therefore disabling
support for dynamic interrupts for SOF builds doesn't make
much sense. However, this can be used to at least increase
compile-time testing coverage and potentially enable
applications, not using dynamic interrupt registration.

BugLink: https://github.com/thesofproject/sof/issues/4044
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-04-22 14:04:45 +01:00
Guennadi Liakhovetski 3e8526110c zephyr: fix build: add a missing IPC file
Commit b3f195e92a ("zephyr: fix build with recent file name
changes.") partially fixed a regression, caused by 4e436f8570
("ipc: split out ipc functions into separate files.")
partially. This patch completes the fix.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-04-22 14:03:49 +01:00
yxh 5447a4f7b1 cmake file: PLATFORM variable is empty
When CONFIG_LIBRARY is enabled, but the architecture that
exists in sof is not enabled, the "PLATFORM" variable in
the zephyr\CMakeLists.txt file is empty, resulting in an
error in the include path.
The modification here is to get the correct include
path under this condition

Signed-off-by: yxh <yangxiaohuamail@gmail.com>
2021-04-21 09:18:14 +01:00
Liam Girdwood b3f195e92a zephyr: fix build with recent file name changes.
Align the Zephyr build to recent file name changes.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-04-19 14:46:10 +01:00
Marc Herbert 5aeb29b554 zephyr/cmake: stop trying to build removed pipeline_static.c
Fixes commit 093589899a ("pipeline: remove legacy static pipeline
support") that broke zephyr compilation.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-05 11:42:33 +03:00
Liam Girdwood 4875c44609 pipeline: split pipeline up by function.
Split the pipeline logic up into stream, params, graph, scheduling and xrun
so that it easier to follow and understand. This is to help on the TSC work
to integrate the codec adaptor into core logic.

This PR is all mechanical code moves. There are NO functional changes. Some
function that were static are now public.

Followup patches will add more documentation updates alongside.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-04-01 21:46:29 +01:00
Anas Nashif f4e4ca752a Revert "zephyr: fixed cached rimage path"
This reverts commit f4c9c28bc5.

This is no longer needed as we removed local copy of rimage from
zephyr/ext.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-11 20:19:15 +00:00
Anas Nashif a97d166121 zephyr: reference local Kconfig
Reference Kconfig in zephyr module file which is evaluated by Zephyr
directly. This will eliminate the need for including the SOF Kconfig
directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-11 20:19:15 +00:00
Guennadi Liakhovetski 372d3873bd zephyr: make sure non-atomic 64-bit timer is consistent
The Zephyr timer implementation reads high and low 32 bits
in a non-atomic way. Add a loop to make sure the read is
consistent.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-02-03 16:35:10 +00:00
Guennadi Liakhovetski 9ac38d8828 zephyr: fix regression: add platform_timer_get_atomic()
Recently added platform_timer_get_atomic() has to be
implemented for Zephyr too.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-02-03 16:35:10 +00:00
Guennadi Liakhovetski f4c9c28bc5 zephyr: fixed cached rimage path
Fix the cached rimage path to the temporary cloned rimage location.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-01-22 13:35:29 +00:00
Guennadi Liakhovetski b580a787da zephyr: update for unsupported arch builds
Add some files from src/platform/library/ to generic arch
builds with Zephyr.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-01-11 16:11:42 +00:00
Guennadi Liakhovetski 7531d6bd07 zephyr: add a cache variable with a rimage configuration path
zephyr needs a path to rimage configuration files, add it to
cmake cache.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-01-08 10:24:07 +00:00
Guennadi Liakhovetski a25cf0f1ba zephyr: fix breakage after a recent logging extention
Commit fee7d9c660 ("trace: Introduce adaptive
rate-limiting/suppression of repeated messages") broke Zephyr build.
Add the missing parameter.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-12-01 13:58:55 +00:00
Guennadi Liakhovetski c8ae78ab0e zephyr: fix a path to a header, build LPS conditionally
Use a correct path to the cAVS memory.h header, build cAVS LPS
only when the respective Kconfig option is selected.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-11-27 16:32:32 +00:00
Guennadi Liakhovetski 1d39806f4e zephyr: extend the wrapper for generic architecture support
When building SOF with Zephyr for unsupported architectures
the following additional adjustments to the wrapper are required:
1. define HEAP_RUNTIME_SIZE
2. implement stubs for interrupt handlich code
3. remove arch_timer_get_system() as it's provided by a header
4. hardcode "return 0;" for platform_timer_get()
5. disable sys_module_init() which anyway isn't yet functional
   under Zephyr
6. add dummy platform_init() and platform_boot_complete()
7. add log_const_sof

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-11-21 16:22:54 +00:00
Guennadi Liakhovetski ddbf5255d2 zephyr: set ARCH to "host" when not building for Xtensa
When building for unsupported architectures under Zephyr set ARCH
to "host" to use generic headers.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-11-21 16:22:54 +00:00
Guennadi Liakhovetski a91219eb79 zephyr: remove infinite recursion on Broadwell
Broadwell support with Zephyr had only been dry-coded, it has never
been tested, and it contains an infinite recursion bug: functions
platform_timer_get() and arch_timer_get_system() call each other
infinitely. Break the recursion formally, until a proper fix is
available.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-11-18 11:37:37 +00:00
Guennadi Liakhovetski 375a46d176 zephyr: only build trace support if enabled in the configuration
Files under src/trace should only be built if CONFIG_TRACE is selected
in configuration.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-11-18 11:37:37 +00:00
Andy Ross 2664fc30fb zephyr/wrapper: Disable check for CONFIG_SYS_HEAP_ALIGNED_ALLOC
This kconfig variable no longer exists in upstream Zephyr (the feature
it used to control is now zero-overhead and always enabled).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-11-16 11:23:50 +00:00
Guennadi Liakhovetski b672923809 zephyr: adjust for new location of audio component samples
Audio component samples have been moved to a new location, fix Zephyr
builds to account for it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-10-23 10:16:55 +01:00
Guennadi Liakhovetski 9a02ffdeb7 zephyr: fix compiler warnings due to recent Zephyr changes
Fix two compiler warnings, introduced by recent Zephyr changes.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-10-23 10:16:55 +01:00
Karol Trzcinski 095e3ac8ae ipc: Remove probe_support from mailbox
This information is already provided by extended manifest,
so there is no need to double it in runtime code.
It allows to save 28 bytes from .DATA and  128 bytes from .TEXT
for cnl platform.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-10-12 11:41:11 +01:00
Karol Trzcinski 737bdb877f ipc: Remove cc_version from mailbox
This information is already provided by extended manifest,
so there is no need to double it in runtime code.
It allows to save 92 bytes from .DATA and 128 bytes from .TEXT
for cnl platform.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-10-12 11:41:11 +01:00
Guennadi Liakhovetski 94ed4ca325 zephyr: remote the platform_timer_set() wrapper
platform_timer_set() isn't called from Zephyr any more, remote it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-10-01 22:06:40 +01:00
Guennadi Liakhovetski fa5eee2463 zephyr: fix iir and fir file renaming
Two recent commits moved and renamed some of eq-iir and eq-fir files,
without updating zephyr cmake files.

fixes ab4a608198 ("Audio: Move FIR core to math library")
fixes baa43558f6 ("sof: math: move iir_df2t function to src/math")
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-09-15 09:40:23 +01:00
Guennadi Liakhovetski 047f08f20e uuid: use a pointer instead of casting it to an integer
UUID objects are represented by struct sof_uuid_entry instances in SOF.
Instead of casting pointers to them to integers for passing around,
carry them as pointers until they have to be cast to integers for
packing into data structures. This also fixes printing UUID, using a
"%pU" format.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-09-15 09:33:29 +01:00
Liam Girdwood 87c23eb3ce zephyr: fix build for new sof git hashes.
Git hashes need exported for Zephyr build.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-08-25 09:47:10 +01:00
Liam Girdwood 4b2edf8eed zephyr: wrapper: complete zephyr support for working audio
This patch finalises the wrapper to allow LL scheduling of
timer domain audio, EDF sccheduling of IPC, trace re-direction
and kconfig build support.

There are still many items that are WIP and have been marked with
TODO: comments.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-08-14 15:07:34 +01:00
Andrei Emeltchenko 8b2359b210 zephyr: Update README to add instruction for debug loggin on qmeu
Mention using LOG_BACKEND_XTENSA_SIM backend for console.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-07-23 14:58:25 +01:00
Liam Girdwood 620d68f292 zephyr: readme: add qemu instructions.
Add instructions for running on qemu.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-04-21 20:34:34 +01:00
Liam Girdwood f73319019b zephyr: add README with integration instructions
Some initial information to help developers.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-04-21 20:34:34 +01:00
Liam Girdwood 207c6fdbee zephyr: add wrappers to bridge between Zephyr and SOF APIs.
Add a wrapper to convert SOF API calls to Zephyr equivalents. This allows
development to continue in parallel with xtos/HAL and Zephyr RTOSes until
parity is reached.

The initlial Zephyr APIs to be used are HAL, boot, IRQs, scheduling and
memory. The wrapper reflects this and will probably grow until feature
parity is reached when it can be deleted (as Zephyr APIs can be used
directly).

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-04-21 20:34:34 +01:00
Liam Girdwood de41202f8f zephyr: build: Add initial build support for SOF application.
Builds an initial Zephyr SOF audio module. This will be the starting
point for the porting work.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-04-16 21:01:43 +01:00