Part Number: AM5728
Tool/software: TI-RTOS
Problem description:
====================
During loading of dsp firmware on dsp1 using remoteproc, im getting the
following error:
[ 70.405992] remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 5132952
[ 70.420358] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
[ 70.426258] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
[ 70.432209] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
[ 70.446300] remoteproc2: bad phdr da 0x40300000 mem 0x1d20
[ 70.451924] remoteproc2: Failed to load program segments: -22
Application description:
========================
I've taken the big data IPC example that TI provides. Im trying to use this in
my project. The project requires usage of all other standard drivers that come
with the pdk (i2c, uart, gpio, osal) along with the am572x board initialization
as well. Since this an IPC example using cmem, there is a resource table as
well. My application has the typical board initialization function:
=========================
Board_initCfg boardCfg;
boardCfg = BOARD_INIT_PINMUX_CONFIG |
BOARD_INIT_MODULE_CLOCK |
BOARD_INIT_UART_STDIO;
Board_init(boardCfg);
=======================
As per TI pdk documentation from
processors.wiki.ti.com/.../Processor_SDK_RTOS_Board_Support :
code/data/stck during the IO delay setup must be within local internal memory -
specifically OCM_RAM1.
As a result, ive made the following additions to the project cfg file:
Program.sectMap["BOARD_IO_DELAY_DATA"] = "OCMC_RAM1";
Program.sectMap["BOARD_IO_DELAY_CODE"] = "OCMC_RAM1";
Note that OCMC_RAM1 is located at address: 0x40300000. BOARD_IO_DELAY_DATA and
BOARD_IO_DELAY_CODE become program segments that need to be allocated/placed
somewhere in memory during loading of the dsp firmware (elf file) using
remoteproc by the linux kernel. The function rproc_elf_load_segments reads the
elf file and for each segment tries to grap the kernel address corresponding to
the device address using rproc_da_to_va. This function looks up the resource
table to perform this task. Note that the resource table does not have any entry
for OCMC_RAM1 and hence rproc_elf_load_segments errors out.
So how do i solve this problem? I tried adding a dev_mem entry to the resource
table so that rproc_da_to_va finds this OCMC_RAM1 address but that did not work.
Not having the BOARD_IO_DELAY* sections in the cfg file does not help either.
Surely, Im not the first one to be encountering this problem. Looks like there
is something i might be missing. any help is highly appreciated