Skip to content

Commit e7c8016

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 7154dfc commit e7c8016

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

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
@@ -190,6 +190,15 @@ config SOF_BOOT_TEST
190190
initialized. After that SOF will continue running and be usable as
191191
usual.
192192

193+
config SOF_BOOT_TEST_STANDALONE
194+
bool "enable tests at boot time that are run instead of SOF main"
195+
select SOF_BOOT_TEST
196+
select ZTEST
197+
help
198+
Run extended set of tests at boot that can use IPC and interfere
199+
with system state. Normal IPC handling of the SOF application
200+
is disabled to allow more complex tests to run.
201+
193202
config SOF_ZEPHYR_NO_SOF_CLOCK
194203
bool
195204
help

0 commit comments

Comments
 (0)