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.

RTOS: VSDK KPI Bootup-dependency for firmare loading (.xem4) and apps.out

Tool/software: TI-RTOS

Hello all,

We have a problem in loading the firmware & start immediately the apps.out service as part of systemd services.  If we  start apps.out  service after 2 seconds, it is working. This will affect our KPI for bootlogo.

Can you please support in solving this  issue.?

"[0][      0.342]      2.836058 s:  CHAINS: Application Started !!!     2.836332 s:  SYSTEM: ERROR: No link registered at link ID [88] !!!

root@mmt2020-a880:~# cat /sys/kernel/debug/remoteproc/remoteproc0/trace0

[0][      0.000] 18 Resource entries at 0x3000

[0][      0.000]      2.494631 s:  SYSTEM: System Common Init in progress !!!

[0][      0.010]      2.504148 s:  SYSTEM: IPC init in progress !!!

[0][      0.010]      2.504392 s:  SYSTEM: Notify init done !!!

[0][      0.012]      2.506191 s:  SYSTEM: MsgQ init done !!!

[0][      0.013]      2.507198 s: RpmsgInit in progress...

[0][      0.013]      2.507381 s: Connection established with HLOS, calling rpmsgInit

[0][      0.014] registering rpmsg-proto:rpmsg-proto service on 80 with HOST

[0][      0.014]      2.508174 s:  SYSTEM: IPC init DONE !!!

[0][      0.020]      2.514640 s:  SYSTEM: System Common Init Done !!!

[0][      0.021]      2.514853 s:  SYSTEM: System Init in progress !!!

[0][      0.021]      2.515067 s:  SYSTEM: BSP Common Init in progress !!!

[0][      0.021]      2.515250 s:  SYSTEM: BSP Common Init Done !!!

[0][      0.021]      2.515433 s:  SYSTEM: BSP Platform Init in progress !!!

[0][      0.021]      2.515646 s:  SYSTEM: BSP Platform Init Done !!!

[0][      0.021]      2.515799 s:  SYSTEM: FVID2 Init in progress !!!

[0][      0.022]      2.516073 s:  SYSTEM: FVID2 Init Done !!!

[0][      0.022]      2.516226 s:  SYSTEM: VPS Init in progress !!!

[0][      0.022]      2.516409 s:  SYSTEM: VPDMA Descriptor Memory Address translation ENABLED [0x80000000 -> 0x80000000]

[0][      0.025]      2.519398 s: *** VPDMA Firmware Loading... ***

[0][      0.025]      2.519642 s: VPDMA Firmware Address = 0xa034a500

[0][      0.026]      2.519856 s: VPDMA Load Address     = 0x4897d004

[0][      0.026]      2.520100 s: VPDMA Firmware Version = 0x4d0001b8

[0][      0.026]      2.520283 s: VPDMA List Busy Status = 0x00000000

[0][      0.026]      2.520466 s: *** VPDMA Firmware Load Success ***

[0][      0.026]

[0][      0.027]      2.520923 s: *** VPDMA Firmware Loading... ***

[0][      0.027]      2.521137 s: VPDMA Firmware Address = 0xa034a500

[0][      0.027]      2.521320 s: VPDMA Load Address     = 0x4899d004

[0][      0.027]      2.521533 s: VPDMA Firmware Version = 0x4d0001b8

[0][      0.027]      2.521747 s: VPDMA List Busy Status = 0x00000000

[0][      0.028]      2.521930 s: *** VPDMA Firmware Load Success ***

[0][      0.028]

[0][      0.028]      2.522387 s: *** VPDMA Firmware Loading... ***

[0][      0.028]      2.522601 s: VPDMA Firmware Address = 0xa034a500

[0][      0.028]      2.522784 s: VPDMA Load Address     = 0x489bd004

[0][      0.029]      2.523028 s: VPDMA Firmware Version = 0x4d0001b8

[0][      0.029]      2.523211 s: VPDMA List Busy Status = 0x00000000

[0][      0.029]      2.523394 s: *** VPDMA Firmware Load Success ***

[0][      0.029]

[0][      0.084]      2.578753 s:  SYSTEM: VPS Init Done !!!

[0][      0.085]      2.579698 s:  UTILS: DMA: HWI Create for INT34 !!!

[0][      0.086]      2.580125 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1024

[0][      0.086]      2.580400 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 262144 B (256 KB), Free size = 260672 B (254 KB)

[0][      0.087]      2.580796 s:  SYSTEM: Heap = SR_OCMC              @ 0x00000000, Total size = 0 B (0 KB), Free size = 0 B (0 KB)

[0][      0.087]      2.581162 s:  SYSTEM: Heap = SR_DDR_CACHED        @ 0x86203000, Total size = 67108864 B (64 MB), Free size = 67108864 B (64 MB)

[0][      0.087]      2.581589 s:  SYSTEM: Heap = SR_DDR_NON_CACHED    @ 0xa0100000, Total size = 1047168 B (0 MB), Free size = 1047168 B (0 MB)

[0][      0.088]      2.581986 s:  SYSTEM: Initializing Links !!!

[0][      0.341]      2.835509 s:  SYSTEM: Initializing Links ... DONE !!!

[0][      0.342]      2.836058 s:  CHAINS: Application Started !!!     2.836332 s:  SYSTEM: ERROR: No link registered at link ID [88] !!!

[0][      0.353]      2.847190 s:  BOARD: Board Init in progress !!!

[0][      0.353]      2.847739 s:  BOARD: Board Init Done !!!

[0][      0.362]      2.856280 

Regards,

Gokul

  • Hi,

    I did not get your question.
    Are you asking how to run it as a part of systemd services or something else.

    Regards,
    Anuj
  • Hi Anuj,

    We are running all the services via systemd. When you build VSDK we will get two binaries. One is .xem4 and another is apps.out.

    .xem4 will loaded via remoteproc modules. At bootup, there is a service (remoteproc.service), in which the remoteproc -modules willl be loaded inturn will load the required firmware . After this service there is another service(apps.service) which starts apps.out.

    If the apps.service starts immediately after remoteproc service, we will get this error. If we give sleep and start apps.service, there is no such error.

    Regards,
    Gokul
  • Hi,

    All the xem4 binay take some time to initialize the system.
    And when apps.out starts running it assumes all core has done its initialization.
    But in your case you are not giving time for initialization for the other cores.

    Regards,
    Anuj
  • Hi Anuj,

    We want to know, what is the minimal time to start the apps.out service ?
    Do you any flags, if the core is completed initialization by remote-proc modules ?

    Regards,
    Gokul
  • Hi,

    Please look inside System_waitAppInitComplete() function inside links_fw/src/hlos/system/system_common.c file.
    Here it check for the other core whether they have complete their initialization or not.

    Regards,
    Anuj
  • Hi Anuj,

    We didn't get answer to any of our questions ?

    I understand, we have to wait for other core to get initialization. We are using IPU1 only from VSDK.

    Why this function  is called twice ?

    Int32 System_init(void)

    {

       Int32 status = SYSTEM_LINK_STATUS_SOK;

       OSA_init();

    #ifdef SYSTEM_DEBUG

       Vps_printf(" SYSTEM: System A15 Init in progress !!!\n");

    #endif

       memset(&gSystem_objCommon, 0, sizeof(gSystem_objCommon));

       status = OSA_mutexCreate(&gSystem_objCommon.linkControlMutex);

       OSA_assertSuccess(status);

       status = OSA_mbxCreate(&gSystem_objCommon.mbx);

       OSA_assertSuccess(status);

       System_waitAppInitComplete();

    #ifndef QNX_BUILD

       gSystem_objCommon.devBufFD = open("/dev/vmemexp", O_RDWR | O_CLOEXEC);

    #endif

       System_ipcInit();

       System_initLinks();

       System_waitAppInitComplete();

       OSA_syncGlobalTime();

    #if defined(OPENVX_INCLUDE)

       tivxInit();

    #endif

    #ifdef SYSTEM_DEBUG

       Vps_printf(" SYSTEM: System A15 Init Done !!!\n");

    #endif

       return status;

    }

    Better we need to have a discussion,

    Thanks & regards,

    Gokul

  • Gokul,

    After the remote-proc service, you may need to load other services as well (graphics services like pvrsrv, Weston etc). 

    If you look at init-demo.sh present in build/hlos/scripts/linux/, it will give a list of modules / services which need to have already be launched before starting apps.out.

    Also can you attach the error observed when you launch immediately? 


    Regards
    Shravan

  • Shravan,

    Please follow the thread from the start. Already error messages are updated.

    If possible can you please try from systemd ?



    Regards,
    Gokul

  • Hi Gokul,

    The error seems to be with the registering of link which isn't complete.
    Can you add debug logs to find which particular link is failing (my guess its one of GrpxSrcLink, splitLink or Chains_linkStatsMonitor defined in Chains_main in apps/src/rtos/common/chains_main_linux.c).
    Also just to confirm this error "2.836332 s: SYSTEM: ERROR: No link registered at link ID [88]" isn't seen when you add a 1s delay?

    Regards
    Shravan

  • Hi Shravan,

    We couldn't see the error if we add a delay of 2 seconds. Can you validate in your evm via systemd ?

    Regards,
    Gokul
  • Hi Gokul,

    As indicated, can we please have the logs here. The issue seems to be with the link init mentioned above.

    Regards
    Shravan
  • Hi Shravan,

    As you aware, Currently we are working on early boot and late attach. once this activity is completed, we will debug this issue.

    Regards,
    Gokul
  • Hi Gokul,

    Are there any updates here? Was this verified with the Weston service up?

    Regards
    Shravan
  • Hi Shravan,

    I hope, it is working. I ask sreeju to update on this issue.


    Regards,
    Gokul