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.

what does mpmcl load error info mean?

Hi,all:

When arm linux kernel boot up.I use two kinds of way to load my dsp out image.

1.

Under CCS development environment ,connect dsp core0 on and load dsp out image

using jtag.

2.

Under linux kernel  ,using mpmcl command like below:

mpmcl reset dsp1

mpmcl load dsp1  xxx.out

So,when I use way1 to load my dsp out image,it's ok and linux kernel run normally.

But,when I use way2 to load my dsp image.it fails.the error info is at the end of the post.

According to error info,I want to proposal two question.

1.

why ? the same dsp out image ,when it is loaded from CCS using jtag it's ok and successful.But it's

unsuccessful,when it is loaded using mpmcl load dsp1 command.what's the difference?

2.

what do these error info mean?Especially this error:

Can't find global address from local address 0x90000000 size 410880 in cfg for dsp1

how to debug and remove these errors?

ERROR INFO:

mpmsrv.c:98:mpm_server: received message of size 103 bytes for cmd 1
mpmsrv.c:120:mpm_server: received load command for dsp1 filename /home/root/moonshot/test_dsp_arm_memmap/TestAppDecoder.out
mpmssm.c:329:mpm_load_slave: loading dsp1
mpmdlif.c:219:mpm_get_global_addr: Can't find global address from local address 0x90000000 size 410880 in cfg for dsp1
mpmdlif.c:127:map_and_copy_segment: Unable to get global address 0x90000000
mpmdlif.c:943:DLIF_allocate: map and copy failed for image /home/root/moonshot/test_dsp_arm_memmap/TestAppDecoder.out with addr 0x90000000, size 0x64500
mpmdlif.c:1101:DLIF_error: << D L O A D >> ERROR:
mpmdlif.c:1104:DLIF_error: Failed to allocate target memory for static executable

  • Hi Steve,

    There seems to be a problem with the mpm configuration. It looks like the DSP image has segments that should be loaded at address 0x9000 0000 however when mpm looks at it's configuration it cannot find any entry that describes where to put segments going into address 0x9000 0000.

    If you post you /etc/mpm/mpm_config.json file we can debug some more.

  • Kjetil:

    1.

    Yes you are wright .My dsp image with cmd file like below:

    MEMORY
    {
        //L2SRAM         org= 0x00800000  len=0x00100000
        /*Image/audio for GEM/iMX processing DSP  DATA Buffer 35 MB SIZE*/
        DSPDATA        org= 0x90000000  len= 0x02300000

        DSPAPP_MPEG2_DEC           org= 0x92A00000  len= 0x00100000 /* 1 MB*/
        DSPAPP_MPEG2_DEC_SYSNMEM   org= 0x92B00000  len= 0x01FE0000 /*32 MB*/ /*Storage for external memtabs */
        DSPAPP_MPEG2_DEC_CODE      org= 0x94AE0000  len= 0x00100000 /* 1 MB*/
        DSPAPP_MPEG2_DEC2          org= 0x94BE0000  len= 0x00200000 /* 2 MB*/
        DSP_STACK                  org= 0x95000000  len= 0x00200000
    }

    2.

    json file attached .

    {
    	"parser-version": "1.0.0.0",
    	"_cmdfile": "/etc/mpm/slave_cmds.txt",
    	"outputif": "/var/log/mpmsrv.log",
    	"scratchaddr": "0xBFFFFC00",
    	"scratchlength": "0x400",
    	"segments": [
    	{
    		"name": "local-core0-l2",
    		"localaddr": "0x00800000",
    		"globaladdr": "0x10800000",
    		"length": "0x100000"
    	},
    	{
    		"name": "local-core1-l2",
    		"localaddr": "0x00800000",
    		"globaladdr": "0x11800000",
    		"length": "0x100000"
    	},
    	{
    		"name": "local-core2-l2",
    		"localaddr": "0x00800000",
    		"globaladdr": "0x12800000",
    		"length": "0x100000"
    	},
    	{
    		"name": "local-core3-l2",
    		"localaddr": "0x00800000",
    		"globaladdr": "0x13800000",
    		"length": "0x100000"
    	},
    	{
    		"name": "local-core4-l2",
    		"localaddr": "0x00800000",
    		"globaladdr": "0x14800000",
    		"length": "0x100000"
    	},
    	{
    		"name": "local-core5-l2",
    		"localaddr": "0x00800000",
    		"globaladdr": "0x15800000",
    		"length": "0x100000"
    	},
    	{
    		"name": "local-core6-l2",
    		"localaddr": "0x00800000",
    		"globaladdr": "0x16800000",
    		"length": "0x100000"
    	},
    	{
    		"name": "local-core7-l2",
    		"localaddr": "0x00800000",
    		"globaladdr": "0x17800000",
    		"length": "0x100000"
    	},
    	{
    		"name": "local-msmc",
    		"globaladdr": "0x0c000000",
    		"length": "0x600000"
    	},
    	{
    		"name": "local-ddr",
    		"globaladdr": "0xa0000000",
    		"length": "0x1FFFFC00"
    	}
    	],
    		"slaves": [
    		{
    			"name": "dsp0",
    			"coreid": 0,
    			"transport": "sharedmemory",
    			"memorymap": ["local-core0-l2", "local-msmc", "local-ddr"],
    			"crashcallback": "/etc/mpm/crash_callback.sh"
    		},
    		{
    			"name": "dsp1",
    			"coreid": 1,
    			"transport": "sharedmemory",
    			"memorymap": ["local-core1-l2", "local-msmc", "local-ddr"],
    			"crashcallback": "/etc/mpm/crash_callback.sh"
    		},
    		{
    			"name": "dsp2",
    			"coreid": 2,
    			"transport": "sharedmemory",
    			"memorymap": ["local-core2-l2", "local-msmc", "local-ddr"],
    			"crashcallback": "/etc/mpm/crash_callback.sh"
    		},
    		{
    			"name": "dsp3",
    			"coreid": 3,
    			"transport": "sharedmemory",
    			"memorymap": ["local-core3-l2", "local-msmc", "local-ddr"],
    			"crashcallback": "/etc/mpm/crash_callback.sh"
    		},
    		{
    			"name": "dsp4",
    			"coreid": 4,
    			"transport": "sharedmemory",
    			"memorymap": ["local-core4-l2", "local-msmc", "local-ddr"],
    			"crashcallback": "/etc/mpm/crash_callback.sh"
    		},
    		{
    			"name": "dsp5",
    			"coreid": 5,
    			"transport": "sharedmemory",
    			"memorymap": ["local-core5-l2", "local-msmc", "local-ddr"],
    			"crashcallback": "/etc/mpm/crash_callback.sh"
    		},
    		{
    			"name": "dsp6",
    			"coreid": 6,
    			"transport": "sharedmemory",
    			"memorymap": ["local-core6-l2", "local-msmc", "local-ddr"],
    			"crashcallback": "/etc/mpm/crash_callback.sh"
    		},
    		{
    			"name": "dsp7",
    			"coreid": 7,
    			"transport": "sharedmemory",
    			"memorymap": ["local-core7-l2", "local-msmc", "local-ddr"],
    			"crashcallback": "/etc/mpm/crash_callback.sh"
    		}
    	]
    }
    

  • Hi Steve,

    As I see it you have two options.

    1. You could either change the memory configuration so that you code loads at the default locations that the mpm uses. This means that you have to change the locations of the code loaded in DDR from 0x9000 0000 to 0xA000 0000.

    See this link for the default mpm memory locations:
    http://wiki.tiprocessors.com/index.php/MCSDK_UG_Chapter_Developing_System_Mgmt#DSP_Image_Requirements

    I Believe it would look something like this

    MEMORY
    {
        //L2SRAM         org= 0x00800000  len=0x00100000
        /*Image/audio for GEM/iMX processing DSP  DATA Buffer 35 MB SIZE*/
        DSPDATA        org= 0xA0000000  len= 0x02300000

        DSPAPP_MPEG2_DEC           org= 0xA2A00000  len= 0x00100000 /* 1 MB*/
        DSPAPP_MPEG2_DEC_SYSNMEM   org= 0xA2B00000  len= 0x01FE0000 /*32 MB*/ /*Storage for external memtabs */
        DSPAPP_MPEG2_DEC_CODE      org= 0xA4AE0000  len= 0x00100000 /* 1 MB*/
        DSPAPP_MPEG2_DEC2          org= 0xA4BE0000  len= 0x00200000 /* 2 MB*/
        DSP_STACK                  org= 0xA5000000  len= 0x00200000
    }


    2. The other option if you really want to load the code at location 0x9000 0000 is to first edit the device tree so that /dev/dspmem is able to mmap 0x9000 0000.


        dspmem: dspmem {
          compatible = "linux,rproc-user";
          mem  = <0x0c000000 0x000600000
              0x90000000 0x20000000>;
          label = "dspmem";
        };


    Then you would have to change the mpm configuration to something like this:


      {
        "name": "local-ddr",
        "globaladdr": "0x90000000",
        "length": "0x1FFFFC00"
      }


  • Hello there,

    While downloading my dsp image on same platform I am getting below error -

    Can anyone explain me what is the probable root cause of this ?

    root@172:~# mpmcl load dsp0 hk01.out                                            
    load failed (error: -104)                                                       
    root@172:~#

    Regards,

    Vishal

  • Hi Vishal,

    error: -104 is defined in the mpm source code to be MPM_ERROR_IMAGE_LOAD so it's just a general error when the mpmsrv process is trying to load your image into memory. Whenever I get this error I usually find the root cause by reading the mpmsrv log file /var/log/mpmsrv.log

    In most of the cases where I've seen this error there has been a mismatch between memory addresses configurations. The linux device tree, mpm_config.json and the CCS platform configuration must match in some way to have a valid memory configuration.

    If you want me to take a look you can post your mpm_config.json file and your *.map file which is generated by CCS.

  • HI,

    I am also facing issue similar to you.

    You got any solution for mpmcl load ?

    In my case,when i try to do mpmcl to load binaries to slave dsp's

    check the status of dsp0,

    root@k2hk-evm:/# mpmcl status dsp0
    dsp0 is in idle state

    check the ping status

    root@k2hk-evm:/# mpmcl ping dsp0
    ping succeeded


    then load mpmsrv_keystone2_example.out, first time i get error msg and second time if i load , it is loading successfully,

    root@k2hk-evm:/# mpmcl load dsp0 mpmsrv_keystone2_example.out
    load failed (error: -104)
    root@k2hk-evm:/# mpmcl load dsp0 mpmsrv_keystone2_example.out
    load succeeded

    root@k2hk-evm:/# mpmcl run dsp0
    run succeeded

    Because of first time error, dsp0 goes to error state, even if i give reset command its still in error state and reset command is also not successful,

    root@k2hk-evm:/# mpmcl reset dsp0
    reset error

    I guess because of this error state i am not able to see any trace logs in remoteproc directory,

    Hope these inputs will help,

    Could you please suggest any solution to solve ,

  • Hey, how did you solve the problem? Can you please share?

  • Can you please tell us what is your problem ?
    Please create a new post for your problem as your post may not get intervention by other TI folks.

    Don't forget to mention package and board what you use.