Skip to content

Commit

Permalink
sw: Remove DMA waits again and move to main
Browse files Browse the repository at this point in the history
  • Loading branch information
fischeti committed Jul 16, 2024
1 parent 77a4252 commit cfb7764
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions sw/snRuntime/src/start.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ static inline void snrt_init_tls() {
snrt_dma_start_1d((void*)(tls_ptr + i * tls_offset),
(void*)(snrt_zero_memory_ptr()), size);
}
snrt_dma_wait_all();
}

snrt_cluster_hw_barrier();
}
#endif

Expand All @@ -65,7 +62,6 @@ static inline void snrt_init_bss() {
size_t size = (size_t)(&__bss_end) - (size_t)(&__bss_start);
snrt_dma_start_1d_wideptr((uint64_t)(&__bss_start),
(uint64_t)(snrt_zero_memory_ptr()), size);
snrt_dma_wait_all();
}
}
#endif
Expand All @@ -90,7 +86,6 @@ static inline void snrt_init_cls() {
ptr = (void*)((uint32_t)ptr + size);
size = (size_t)(&__cbss_end) - (size_t)(&__cbss_start);
snrt_dma_start_1d(ptr, (void*)(snrt_zero_memory_ptr()), size);
snrt_dma_wait_all();
}
}
#endif
Expand Down Expand Up @@ -141,9 +136,9 @@ void snrt_main() {
snrt_init_cls();
#endif

#if defined(SNRT_INIT_BSS) || defined(SNRT_INIT_CLS)
// Single DMA wait call and barrier for both snrt_init_bss() and
// snrt_init_cls()
#if defined(SNRT_INIT_TLS) || defined(SNRT_INIT_BSS) || defined(SNRT_INIT_CLS)
// Single DMA wait call and barrier for snrt_init_tls(),
// snrt_init_bss() and snrt_init_cls()
if (snrt_is_dm_core()) snrt_dma_wait_all();
snrt_cluster_hw_barrier();
#endif
Expand Down

0 comments on commit cfb7764

Please sign in to comment.