Skip to content

Commit

Permalink
init: check dma domain ptr before use
Browse files Browse the repository at this point in the history
Check DMA domain pointer before calling scheduler_init_ll().
DMA domain is currently not initialized for MTL platform, but
there may be need to use in the future.
Without this check, secondary core crash on NULL pointer.

Signed-off-by: Przemyslaw Blaszkowski <przemyslaw.blaszkowski@intel.com>
  • Loading branch information
pblaszko authored and kv2019i committed Nov 4, 2022
1 parent fc825a9 commit 4ab225b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/init/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ static int secondary_core_restore(void)
int secondary_core_init(struct sof *sof)
{
int err;
struct ll_schedule_domain *dma_domain;

#ifndef __ZEPHYR__
/* init architecture */
Expand Down Expand Up @@ -174,7 +175,10 @@ int secondary_core_init(struct sof *sof)
#endif
trace_point(TRACE_BOOT_PLATFORM_SCHED);
scheduler_init_ll(timer_domain_get());
scheduler_init_ll(dma_domain_get());

dma_domain = dma_domain_get();
if (dma_domain)
scheduler_init_ll(dma_domain);

/* initialize IDC mechanism */
trace_point(TRACE_BOOT_PLATFORM_IDC);
Expand Down

0 comments on commit 4ab225b

Please sign in to comment.