Tool/software: TI-RTOS
Hello,
in my application, I need to have a chunk of memory which is not cacheable. I firstly tried to set EXT_DATA as non-cacheable by setting MAR149 and it worked when I used Jtag to load dsp binary by CCS, however, it did not work when DSP build is loaded by Linux kernel. I notice that this memory is defined in original custom resources table. so I try to use another memory range by adding DSP_DATA in linker.cmd as below, and I also add it in resources table by adding following codes as well updated the number of element, etc.
#define DSP_NON_CACHE_DATA 0x9A000000
#define DSP_NON_CACHE_DATA_SIZE (SZ_1M)
{
TYPE_DEVMEM,
DSP_NON_CACHE_DATA, 0,
DSP_NON_CACHE_DATA_SIZE, 0, 0, "DSP_NON_CACHE_DATA",
},
the memory define in linker.cmd:
MEMORY
{
L2SRAM (RWX) : org = 0x800000, len = 0x40000
OCMC_RAM1 (RWX) : org = 0x40300000, len = 0x80000
OCMC_RAM2 (RWX) : org = 0x40400000, len = 0x100000
OCMC_RAM3 (RWX) : org = 0x40500000, len = 0x100000
EXT_CODE (RWX) : org = 0x95000000, len = 0x100000
EXT_DATA (RW) : org = 0x95100000, len = 0x100000
EXT_HEAP (RW) : org = 0x95200000, len = 0x300000
EXC_DATA (RW) : org = 0x9f060000, len = 0x10000
PM_DATA (RWX) : org = 0x9f070000, len = 0x20000
DSP_DATA (RW) : org = 0x9A000000, len = 0x10000
}
SECTIONS
{
.text: load >> EXT_CODE
.ti.decompress: load > EXT_CODE
.stack: load > EXT_DATA
GROUP: load > EXT_DATA
{
.bss:
.neardata:
.rodata:
}
.cinit: load > EXT_DATA
.pinit: load >> EXT_DATA
.init_array: load > EXT_DATA
.const: load >> EXT_DATA
.data: load >> EXT_DATA
.fardata: load >> EXT_DATA
.switch: load >> EXT_DATA
.sysmem: load > EXT_DATA
.far: load >> EXT_DATA
.args: load > EXT_DATA align = 0x4, fill = 0 {_argsize = 0x64; }
.cio: load >> EXT_DATA
.ti.handler_table: load > EXT_DATA
.c6xabi.exidx: load > EXT_DATA
.c6xabi.extab: load >> EXT_DATA
.tracebuf: load > EXT_DATA
.resource_table: load > 0x95000000, type = NOINIT
.vecs: load > EXT_CODE
.no_cache > EXT_DATA //DSP_DATA
xdc.meta: load > EXT_DATA, type = COPY
DPR
{
MemoirePartagee.obj
}> DSP_DATA
}
however, the linux failed to load DSP binary with following error message( in red):
root@am57xx-evm:~# ./unbinddsp
[ 4593.580589] remoteproc remoteproc2: failed to unmap 4194304/0
[ 4593.599912] omap_hwmod: mmu1_dsp1: _wait_target_disable failed
[ 4593.613815] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
[ 4593.619722] remoteproc remoteproc2: stopped remote processor 40800000.dsp
[ 4593.629584] remoteproc remoteproc2: releasing 40800000.dsp
root@am57xx-evm:~#
root@am57xx-evm:~# cp AIM_G3_DSP35.xe66 /lib/firmware/dra7-dsp1-fw.xe66
root@am57xx-evm:~# ./binddsp
[ 4621.364874] omap-rproc 40800000.dsp: assigned reserved memory node dsp1_cma@99000000
[ 4621.374002] remoteproc remoteproc2: 40800000.dsp is available
[ 4621.386669] remoteproc remoteproc2: powering up 40800000.dsp
root@am57xx-evm:~# [ 4621.398787] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 4074844
[ 4621.417946] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
[ 4621.423855] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
[ 4621.429754] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
[ 4621.445240] remoteproc remoteproc2: bad phdr da 0x9a000000 mem 0x1f3c
[ 4621.451718] remoteproc remoteproc2: Failed to load program segments: -22
[ 4621.460462] remoteproc remoteproc2: failed to unmap 4194304/0
[ 4621.478906] omap_hwmod: mmu1_dsp1: _wait_target_disable failed
[ 4621.492698] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
Did I miss something or gone wrong?
Thanks in advance!
Ron


