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.

Linux/DRA76P: visionSDK ipu firmware already booted by bootloader, why remoteproc module in kernel try to boot it too?

Part Number: DRA76P

Tool/software: Linux

hi all,

i already boot ipu2 firmware by bootloader, when kernel start, why remoteproc module try to boot it too? log as following:

[    1.197777] omap-rproc 55020000.ipu: assigned reserved memory node ipu2_cma@95800000
[    1.197817] remoteproc0: 55020000.ipu is available
[    1.197952] remoteproc0: Direct firmware load for dra7-ipu2-fw.xem4 failed with error -2
[    1.589074] ueventd: firmware: loading 'dra7-ipu2-fw.xem4' for '/devices/platform/44000000.ocp/55020000.ipu/remoteproc0/firmware/dra7-ipu2-fw.xem4'
[    1.726018] remoteproc0: powering up 55020000.ipu
[    1.726030] remoteproc0: Booting fw image dra7-ipu2-fw.xem4, size 8032388
[    1.726357] remoteproc0: remote processor 55020000.ipu is now up
[    1.727318] ueventd: loading /devices/platform/44000000.ocp/55020000.ipu/remoteproc0/firmware/dra7-ipu2-fw.xem4 took 138ms

i have add the following config in kernel DTS:

LATE_ATTACH(ipu2);
LATE_ATTACH(mmu_ipu2);

best regards!

  • Hi Fanok,

    you will need some more modifications to the kernel dts such as adding:

    ti,late-attach;
    ti,no-idle-on-init; ti,no-reset-on-init;

    to ipu and timers nodes, please check this wiki for details:



    Also in this wiki you can find how to use dra7xx-earlyboot-utils:



    Regards,
    Yordan
  • hi, Yordan,

    i had modified the dts as following:

    #define LATE_ATTACH(label) &label { ti,late-attach; ti,no-idle; ti,no-reset-on-init; }

    /* Remote cores loaded by bootloader */
    LATE_ATTACH(ipu1);
    LATE_ATTACH(mmu_ipu1);
    LATE_ATTACH(ipu2);
    LATE_ATTACH(mmu_ipu2);
    LATE_ATTACH(dsp1);
    LATE_ATTACH(mmu0_dsp1);
    LATE_ATTACH(mmu1_dsp1);
    LATE_ATTACH(dsp2);
    LATE_ATTACH(mmu0_dsp2);
    LATE_ATTACH(mmu1_dsp2);
    /* timers used by the remote cores */
    LATE_ATTACH(timer3);
    LATE_ATTACH(timer4);
    LATE_ATTACH(timer5);
    LATE_ATTACH(timer6);
    LATE_ATTACH(timer7);
    LATE_ATTACH(timer8);
    LATE_ATTACH(timer9);
    LATE_ATTACH(timer10);
    LATE_ATTACH(timer11);
    LATE_ATTACH(timer13);

    i also followed the instrument of wiki,   so i don't know why?

    best regards!

  • Hi Fanok,

    The remote-core will not boot the IPU, but merely late-attaches with the remote-core. While the logs indicate 'booting remote-core', all the remote-proc driver is doing is reading the firmware and parsing the resource table entries needed to setup IPC between Linux and the remote-proc. This is clearly demonstrated by the fact that the application which runs on M4 continues to work without any issues. If the remote-proc was booting the firmware, you will not see the early booted firmware continuing to work.

    Regards

    Shravan 

  • hi, Shravan,

    thanks for your reply, you say remoteproc driver need parsing the resource table entries needed to setup IPC between Linux and the remote-proc,

    so i also need put the ipu firmware in the /vendor/firmware/ dir? now i just put the IPU firmware in EMMC patition for early boot,  and i remove the 

    ipu firmware under the /vendor/firmware dir.

    even thought i put the same ipu firmware under the /vendor/firmware dir, but when i run the app, rpmesg can not connect to M4, why?

    the log as following:

    ASSERT (system_ipc.c|System_ipcInit|119)
     [HOST] [HOST  ]     17.133563 s:  SYSTEM: System A15 Init in progress !!!
     [HOST] [HOST  ]     17.135667 s: System_waitAppInitComplete() IN!!
     [HOST] [HOST  ]     17.136216 s: System_waitAppInitComplete() OUT!!
     [HOST] [HOST  ]     17.136277 s:  SYSTEM: IPC: Init in progress !!!
     [HOST] [HOST  ]     17.136308 s:  SYSTEM: IPC: Notify init in progress !!!
     [HOST] [HOST  ]     17.136399 s:  SYSTEM: IPC: [IPU2] socket bind failed (Invalid argument, 22) !!!
     [HOST] [HOST  ]     17.136430 s:  SYSTEM: IPC: [IPU2] Notify RX channel create failed (endpoint = 81) !!!
     [HOST] [IPU2  ]      3.676843 s:  ***** IPU2 Firmware build time 11:16:17 Jul 10 2019
     [HOST] [IPU2  ]      3.677026 s: ------ (1) clkHz = 16393 HZ
     [HOST] [IPU2  ]      3.677087 s: ------ (2) clkHz = 16393 HZ
     [HOST] [IPU2  ]      3.677148 s:  *** SYSTEM: CPU Frequency <ORG = 212800000 Hz>, <NEW = 16393 Hz>

    best regards!

  • Hi Fanok,

    The firmware needs to be present in the /lib/firmware folder of your traget file-system, if it isn't there IPC will not happen. Please make sure you have all the patches necessary in kernel applied for early-boot late-attach, and follow all the instructions present in the Linux user-guide. The error here could be due to failure in late-attach of the core, which can be avoided by the late-attach patches and instructions in the Linux user-guides.

    Regards

    Shravan