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.

DRA76P: early boot load visionSDK IPU firmware by bootloader, but A15 can not communicate with it by rpmsg

Part Number: DRA76P

hi all,

i load visionSDK IPU2 firmware by bootloader, but when i run app.out, A15 can not communicate with IPU2. log as following:

ASSERT (system_ipc.c|System_ipcInit|119)
 [HOST] [HOST  ]     15.845604 s:  SYSTEM: System A15 Init in progress !!!
 [HOST] [HOST  ]     15.845604 s: System_waitAppInitComplete() IN!!
 [HOST] [HOST  ]     15.845635 s: System_waitAppInitComplete() OUT!!
 [HOST] [HOST  ]     15.845665 s:  SYSTEM: IPC: Init in progress !!!
 [HOST] [HOST  ]     15.845665 s:  SYSTEM: IPC: Notify init in progress !!!
 [HOST] [HOST  ]     15.845757 s:  SYSTEM: IPC: [IPU2] socket bind failed (Invalid argument, 22) !!!
 [HOST] [HOST  ]     15.845757 s:  SYSTEM: IPC: [IPU2] Notify RX channel create failed (endpoint = 81) !!!

then i follow the visionSDK code, i found that IPU2 connet to A15 IPC thread was blocked in the following code:

Void System_ipcConnectToHLOSThread(void)
{
    UInt32 retryCnt=0;
    UInt32 retval;
   
    Vps_printf("RpmsgInit in progress...\n");
    while(1)
    {
       retval = Resource_getVdevStatus(RPMSG_LATE_ATTACH_A15_VDEV_ID);
       if(retval != RPMSG_LATE_ATTACH_A15_VDEV_ID)
       {
           BspOsal_sleep(10);
           retryCnt++;
       }
       else
       {
           Vps_printf("Connection established with HLOS, calling rpmsgInit\n");
           break;
       }
    }
#ifndef MQSUPPORT
    IpcMgr_rpmsgStartup();
#else
    /*start ipc*/
    IpcMgr_ipcStartup();
#endif
    memset(&gSystem_rpmsgObj, 0, sizeof(gSystem_rpmsgObj));
    /* Create the messageQ for receiving, and register callback: */
    gSystem_rpmsgObj.rpmsgHandle =
            RPMessage_create(
                    SYSTEM_RPMSG_ENDPT_REMOTE,
                    System_rpmsgCbHandler,
                    NULL,
                    &gSystem_rpmsgObj.localEndpoint
                    );
    UTILS_assert(gSystem_rpmsgObj.rpmsgHandle!=NULL);
#ifndef MQSUPPORT
    /* Announce we are here: */
    NameMap_register(
            "rpmsg-proto",
            "rpmsg-proto",
            SYSTEM_RPMSG_ENDPT_REMOTE
            );
#endif
}
Resource_getVdevStatus() function can not get A15 virtio dev?
anyone encounter the same problem?
best regards!
  • Hi Fanok,

    Can you please confirm the kernel version you're using? Vision-SDK is only supported on kernel 4.4 (Processor-SDK 3.04). Late attach is not supported on kernel versions beyond 4.4 (for example late-attach is not supported on K4.14).

    Regards

    Shravan

  • Hi Shravan,

    my boad is custom J6P, The kernel version is 4.4, Android O running on A15 side, and VisionSDK3.04 running on M4 side.

    best regards!

  • Hi Fanok,

    Is this error observed only when you enable IPU_1 as well to prevent the drop in frequency? Without this change can you confirm if the IPU attach goes through without any issues?


    Regards

    Shravan

  • hi Shravan,

    it is noting to do with enable IPU_1 clock, without enable IPU1 clock in bootloader, this error also occured. The follwing is log:

    [    1.376414] remoteproc0: 55020000.ipu is available
    [    1.376420] remoteproc0: Note: remoteproc is still under development and considered experimental.
    [    1.376426] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [    1.376645] remoteproc0: Direct firmware load for dra7-ipu2-fw.xem4 failed with error -2
    [    1.376651] remoteproc0: Falling back to user helper
    [    1.759936] ueventd: firmware: loading 'dra7-ipu2-fw.xem4' for '/devices/platform/44000000.ocp/55020000.ipu/remoteproc0/firmware/dra7-ipu2-fw.xem4'
    [    1.902396] ueventd: loading /devices/platform/44000000.ocp/55020000.ipu/remoteproc0/firmware/dra7-ipu2-fw.xem4 took 142ms
    [    1.902852] remoteproc0: powering up 55020000.ipu
    [    1.902860] remoteproc0: Booting fw image dra7-ipu2-fw.xem4, size 8027012

    [    1.903149] remoteproc0: remote processor 55020000.ipu is now up

    [    1.903288] virtio_rpmsg_bus virtio0: rpmsg host is online

    [    1.903308] remoteproc0: registered virtio0 (type 7)

    i think there is missing a log like:

    "virtio_rpmsg_bus virtio0: creating channel rpmsg-proto addr 0x50"

    i ecounter the same problem in J6entry platform, A15 has not create VIRTIO DEV, so M4 can not get VDEV resource.

    best regards!

  • Hi,

    When you boot up the kernel, do you see any rpmsg devices?

    Regards,

    Nikhil D

  • hi Nikhil D:

    where are rpmsg devices locate? 

    i found nothing in  /sys/class/rpmsg_rpc/  even though when normal.

    best regards!

  • hi all,

    my colleague figure out the issue, as kernel use DMA pool but uboot use CMA pool, it is not match.

    best regards!

  • Glad to know the issue is solved