Skip to content

Commit

Permalink
soc: intel_adsp/ace: zero out memory at ram init
Browse files Browse the repository at this point in the history
There is an assumption in parse_module() during code/data copying
that the memory has already been zero-ed, and hence no need to
clear memory when a BSS segment is encountered. In CAVS ram
initialization code, bbzero() is called. However, in ACE code,
there is no such call. So add them.

Signed-off-by: Daniel Leung <[email protected]>
  • Loading branch information
dcpleung authored and nashif committed Oct 14, 2022
1 parent 635506e commit 195db14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions soc/xtensa/intel_adsp/ace/sram.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ __imr void hp_sram_init(uint32_t memory_size)
z_idelay(DELAY_COUNT);
}
}

bbzero((void *)L2_SRAM_BASE, L2_SRAM_SIZE);
}

__imr void lp_sram_init(void)
Expand All @@ -42,4 +44,6 @@ __imr void lp_sram_init(void)
for (uint32_t idx = 0; idx < lpsram_ebb_quantity; ++idx) {
*(l2usbpmptr + idx * 2) = 0;
}

bbzero((void *)LP_SRAM_BASE, LP_SRAM_SIZE);
}

0 comments on commit 195db14

Please sign in to comment.