Skip to content

Commit de4003c

Browse files
lyakhkartben
authored andcommitted
soc: intel_adsp: check module address before copying to SRAM
Before copying modules to SRAM, check whether they're built for it, skip modules, that aren't. Signed-off-by: Guennadi Liakhovetski <[email protected]>
1 parent 002b4ca commit de4003c

File tree

1 file changed

+3
-1
lines changed
  • soc/intel/intel_adsp/common

1 file changed

+3
-1
lines changed

soc/intel/intel_adsp/common/boot.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ static __imr void parse_module(struct sof_man_fw_header *hdr,
9292
switch (mod->segment[i].flags.r.type) {
9393
case SOF_MAN_SEGMENT_TEXT:
9494
case SOF_MAN_SEGMENT_DATA:
95-
if (mod->segment[i].flags.r.load == 0) {
95+
if (mod->segment[i].flags.r.load == 0 ||
96+
mod->segment[i].v_base_addr >= L2_SRAM_BASE + L2_SRAM_SIZE ||
97+
mod->segment[i].v_base_addr < L2_SRAM_BASE) {
9698
continue;
9799
}
98100

0 commit comments

Comments
 (0)