Hello Champs,
Customer wanted to store some data/code to ocmc_ram to improve the code efficiency.
ocmc_ram has been remapped in ResourceTable, the linux on arm core can load the dsp code and the dsp core could also directly access the ocmc_ram.
But after defining the ocmc_ram to SECTION in dsp cmd file, the arm linux could not load the dsp code. The error is below.
[ 263.199587] remoteproc remoteproc2: bad phdr da 0x40500000 mem 0x30d40
[ 263.206146] remoteproc remoteproc2: Failed to load program segments: -22
It seemed that it stuck in when loading elf file.
ptr = rproc_da_to_va(rproc, da, memsz, RPROC_FLAGS_ELF_PHDR | phdr->p_flags);
The left image is the elf file which could be loaded successfully, the right image is the failure elf file.