kernel: zero the bss section of OCM memory at boot time

If a chosen entry exists for a memory area of type OCM, zero the OCM
memory's bss section at boot-time.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
This commit is contained in:
Immo Birnbaum 2022-01-21 12:38:30 +01:00 committed by Anas Nashif
parent ba4e7a8044
commit da28829b64

View file

@ -92,6 +92,10 @@ void z_bss_zero(void)
(void)memset(&__dtcm_bss_start, 0,
((uint32_t) &__dtcm_bss_end - (uint32_t) &__dtcm_bss_start));
#endif
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ocm), okay)
(void)memset(&__ocm_bss_start, 0,
((uint32_t) &__ocm_bss_end - (uint32_t) &__ocm_bss_start));
#endif
#ifdef CONFIG_CODE_DATA_RELOCATION
extern void bss_zeroing_relocation(void);