Skip to content

Commit 7242f73

Browse files
committed
zephyr: add CONFIG_SOF_BOOT_TEST_STANDALONE
Add a new variant to boot time testing for tests that will either need the IPC host interface for test purposes and is not guaranteed to be compatible with the normla host IPC interface, or the tests cause side-effects which can influence behaviour of the firmware after tests are complete. This option is intended to run complex tests that use SOF functionality, run on target hardware, but may not coexist with normal functionality provided by SOF. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent b1fb533 commit 7242f73

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/ipc/ipc-common.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,11 @@ __cold int ipc_init(struct sof *sof)
294294

295295
tr_dbg(&ipc_tr, "entry");
296296

297+
#if CONFIG_SOF_BOOT_TEST_STANDALONE
298+
LOG_INF("SOF_BOOT_TEST_STANDALONE, disabling IPC.");
299+
return 0;
300+
#endif
301+
297302
/* init ipc data */
298303
sof->ipc = rzalloc(SOF_MEM_FLAG_USER | SOF_MEM_FLAG_COHERENT, sizeof(*sof->ipc));
299304
if (!sof->ipc) {

zephyr/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,15 @@ config SOF_BOOT_TEST
178178
initialized. After that SOF will continue running and be usable as
179179
usual.
180180

181+
config SOF_BOOT_TEST_STANDALONE
182+
bool "enable tests at boot time that are run instead of SOF main"
183+
select SOF_BOOT_TEST
184+
select ZTEST
185+
help
186+
Run extended set of tests at boot that can use IPC and interfere
187+
with system state. Normal IPC handling of the SOF application
188+
is disabled to allow more complex tests to run.
189+
181190
config SOF_ZEPHYR_NO_SOF_CLOCK
182191
bool
183192
help

0 commit comments

Comments
 (0)