This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: DSP unbind error

Part Number: AM5728

HI,

In one of my project I am using Sitara AM5728 processor, ARM is on Linux and DSP is on RTOS. I am seeing the below error when I try to unbind the DSP.

[ 2358.831042] remoteproc remoteproc2: failed to unmap 94371840/100663296
[ 2358.832915] remoteproc remoteproc2: failed to unmap 100663296/0
[ 2358.852049] remoteproc remoteproc2: crash detected in 40800000.dsp: type mmufault
[ 2358.859577] omap-iommu 40d02000.mmu: 40d02000.mmu: errs:0x00000002 da:0x95163980 pgd:0xeb7ee544 *pgd:px00000000

Address "0x95163980" is in range of data section defined in the"Resource table" and ".bld" file. I checked ".map" file but I could not trace where particularly this memory is being used. 

Attached is the ".map"file.  How to resolve this issue?

Thanks,

Janardan

TOTEMIC_DSP1_AUDIO.7z

  • Hi, Janardan,

    I'll have the DSP expert to take a look at it. He will get back to you.

    Rex
  • Hi Janardan,

    Does the MMU fault occur at the same address every time? Can you please provide the crash dump?

    If the fault is occurring at the same address, you can set a while loop inside your DSP code, like below

    {
    volatile int foo = 1;
    while (foo);
    }

    Then connect to the core (without a GEL), load the symbols, add a breakpoint at or before that address, change "foo" to 0, and continue running. This should be able to tell you which instruction is causing the MMU fault. 

    Also, is the data section defined as a TYPE_CARVEOUT in the resource table? And does the Linux device tree include this address in its CMA allocation? 

    Regards,
    Sahin

  • Hi, Janardan,

    Any update? Are you able to locate the issue?

    Rex
  • Hi Rex,

    We are not seeing any issue while program is executing or binding, we are seeing issue only during unbinding the DSP core. 

    This Address falls within the address space specified in device tree CMA, also this is a part of Resource table entry (Data Section). 

    This issue is still open for us and trying to resolve it.

    Thanks,

    Janardan

  • Hi, Janardan,

    You should look at these errors
    [ 2358.831042] remoteproc remoteproc2: failed to unmap 94371840/100663296
    [ 2358.832915] remoteproc remoteproc2: failed to unmap 100663296/0

    The 1st errror is unmapping len=0x05A00000 and unmapped 0x0600 0000.
    The 2nd error is unmapping len=0x06000000 and unmapped 0x0000 0000.

    The remoteproc code for these errors are:
    /* clean up iommu mapping entries */
    list_for_each_entry_safe(entry, tmp, &rproc->mappings, node) {
    size_t unmapped;

    unmapped = iommu_unmap(rproc->domain, entry->da, entry->len);
    if (unmapped != entry->len) {
    /* nothing much to do besides complaining */
    dev_err(dev, "failed to unmap %u/%zu\n", entry->len,
    unmapped);
    }

    list_del(&entry->node);
    kfree(entry);
    }

    Rex