Skip to content

Commit ea427e5

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 c95b467 commit ea427e5

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
@@ -184,6 +184,15 @@ config SOF_BOOT_TEST
184184
initialized. After that SOF will continue running and be usable as
185185
usual.
186186

187+
config SOF_BOOT_TEST_STANDALONE
188+
bool "enable tests at boot time that are run instead of SOF main"
189+
select SOF_BOOT_TEST
190+
select ZTEST
191+
help
192+
Run extended set of tests at boot that can use IPC and interfere
193+
with system state. Normal IPC handling of the SOF application
194+
is disabled to allow more complex tests to run.
195+
187196
config SOF_ZEPHYR_NO_SOF_CLOCK
188197
bool
189198
help

0 commit comments

Comments
 (0)