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.

TDA4VM: Bootapp startup linux kernel abnormality.

Part Number: TDA4VM

Tool/software:

Hi Ti expert

I meet the same problem:https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1394498/tda4vm-sbl-startup-linux-kernel-abnormality

My Linux boot log is as same as: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1394498/tda4vm-sbl-startup-linux-kernel-abnormality/

when I disable like this: 

The error message disappeared, But the linux still boot up!.

I use the default DM, and there is no error.

I use the vision_app mcu1_0. And there have resouce_table in main.c



Why for this?

Best Regards
Eason

  • Hi Eason,

    I am sorry, but i did not get the question, do you mean, after removing dts entries for mcu1_0 and mcu1_1, you are no longer seeing Linux kernel crash? and do you want to enable vision apps on mcu1_0 with DM running on it?

    Regards,

    Brijesh

  • Hi Brijesh

    Thanks for your reply.

    do you mean, after removing dts entries for mcu1_0 and mcu1_1, you are no longer seeing Linux kernel crash?

    Right, when i disable mcu1_0 and mcu1_1 in dts,it will not see any error-log output from main uart (when remoteproc driver load mcu1_0)But i don’t know why.

    do you want to enable vision apps on mcu1_0 with DM running on it?

    I use vision_app as bootapp(I integrated the functions of the boot_app_rtos demo into vision_app mcu1_0). My boot sequence is:sbl boot mcu1_0(this is bootapp)from ospi ,and then mcu1_0 boot spl from mmcsd ,and then spl boot uboot from mmcsd ,and then uboot boot linux kernel from mmcsd.(all boot linux kernel need is done).

    Best Regards

    Eason

  • Hi Eason,

    Vision_apps on MCU1_0 as boot app is not supported as part of standard SDK flow. May I know if there is any particular reason you need this boot app in vision_apps rather than having a separate boot app (with some additional features integrated if any) outside vision_apps running on MCU1_0?

    Regards,

    Nikhil

  • Hi Nikhil

    May I know if there is any particular reason you need this boot app in vision_apps rather than having a separate boot app (with some additional features integrated if any) outside vision_apps running on MCU1_0?

    I want to fastest boot.(The first can message must be sent within 100ms from the power-on to the first frame)

    Best Regards
    Eason

  • Hi,Nikhil

    Any suggestion?

    Best Regards
    Eason

  • Hi Eason,

    In your boot flow, the SBL loads the DM firmware with Boot app on mcu1_0, so u-boot is not loading the same anymore right? 

    I still did not understand why vision_apps is integrated into mcu1_0 firmware, if you need to only do boot app and can response on mcu1_0. Is there a plan to communicate to other cores why IPC in the future?

    Could you please share your current error logs that you are seeing?

    Regards

    Nikhil

  • Hi,Nilhil
    Thanks for your reply.
    I was so excited that you asked me a few key questions! Thank you so much!

    Let me explain my idea:

    In your boot flow, the SBL loads the DM firmware with Boot app on mcu1_0, so u-boot is not loading the same anymore right? 

    SBL load mcu1_0 app (vision app mcu1_0), this is DM firmware. But in u-boot is not load the same firmweare. you rae right.

    Is there a plan to communicate to other cores why IPC in the future?

    Yes! I need IPC.
    This is the problem I'm encountering now!
    In linux device tree, I must be enable follow nodes for linux kernel can creat virtio for mcu1_0 then linux can communicate with mcu1_0 through virtio:

    But when I enable these nodes,   linux kernel boot abnormality. but also can not creat virtio for mcu1_0.

     the log is:

    full log:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    NOTICE: BL31: v2.10.0(release):Release1.2.0-13-gf995f1127c-dirty
    NOTICE: BL31: Built : 16:11:04, Nov 27 2023
    NOTICE: ZZX BUILD.
    NOTICE: BL31: Initializing runtime services
    NOTICE: BL31: Initializing BL32
    NOTICE: ZZX-DEBUG: bl32_init = 0x70003490.
    I/TC:
    I/TC: OP-TEE version: 4.1.0-51-g012cdca49 (gcc version 11.4.0 (GCC)) #1 Tue Jan 30 10:48:03 UTC 2024 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: GIC redistributor base address not provided
    I/TC: Assuming default GIC group status and modifier
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.4--v09.02.04 (Kool Koala)')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    I/TC: Fixing SA2UL firewall owner for GP device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: Primary CPU switching to normal world boot
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    If i disable the nodes, linux boot  normally, But can not use ipc.

    So how can I solve this problem?

    Best Regards
    Eason

     

  • Hi,Nikhil

    Do you have any suggestion for this?

    Best Regards
    Eason

  • Hi, Nilhil
    I know why, from my debug in kernel. This is because kernel load mcu1_0 resource_table error,  Memory overflow.
    But I don't know why kernel load mcu1_0 resource_table error.

    Can I create a resource_table that is exactly the same as mcu1_0 in the kernel driver, and then assign the value when the kernel loads the mcu1_0 resource_tabel?

    Best Regards
    Eason

  • Hi Eason,

    IPC initializations would be happening within the MCU1_0 vision_apps firmware. 

    Can you let me know what are the soft links for firmwares in /lib/firmwares in SD Card?

    If it is vx_app_mcu1_0_xx.out, can you check if the size for the same is not 0 in the SD Card?

    Regards,

    Nikhil

  • Hi,Nikhil
    Now I use c6x resouce_table as mcu1_0 resouce_table (because both mcu1_0 and c6x use the same resouce_table config in codes)
    But in mcu1_0 linux always no ready:

    Now I need ipc between mcu1_0 and linux:
    e2e.ti.com/.../

    Best Regards
    Eason

  • Hi Eason,

    I see that you have raised a new thread regarding this issue. Let us continue our discussion there. 

    Can you let me know what are the soft links for firmwares in /lib/firmwares in SD Card?

    If it is vx_app_mcu1_0_xx.out, can you check if the size for the same is not 0 in the SD Card?

    For this thread, can you let me know the below with the default usecase?

    Regards,

    Nikhil

  • Hi, Nikhil
    vx_app_mcu1_0_xx.out is not 0:

    I have now integrated the bootapp function into the xip project (mcu1_0) in PDK (I want to fastest boot), and started uboot and linux in mcu1_0. I have implemented all the above functions, and Linux has been running successfully.

    Now I also want to use IPC to enable linux to communicate with mcu1_0, but during the actual test process, I found that linux made an error when loading the resource_table of mcu1_0 (because the linux kernel cannot find the resource_table of mcu1_0), so I When linux loads the resource_table of C6X, i let it borrows the resource_tabel of C6X as the resource_table of mcu1_0 (because the resource_table configuration of c6x and mcu1_0 are the same)

    But when I used rpmsg_char_simple to test, I found that linux and mcu1_0 still couldn't communicate:

    When I debug in  rpmsg_char_simple in souce_code, I find that there is no mcu1_0  rpmsg_chrdev find, but in mcu1_0 rtos_code , I have announced 

    rpmsg_chrdev. 
    Linux side:



    Rtos side:
    So how to solve this problem? 
    Pls help to check this.

    Best Regards
    Eason
  • 【continue....】:

    Using the above method, Ipc_isRemoteReady(IPC_MPU1_0) cannot be used to determine whether Linux is ready, because the Linux kernel uses the C6X resource table when loading the resource table (mcu1_0 also borrows the c6x resource table), so in the IPC driver, I modified the relevant functions, and Linux has been started by default:

    If I don't do this, I can't use VirtioIPC_createVirtioCorePair to create it for linux. However, I found during the actual debugging process that after I modified the above driver, when I used VirtioIPC_init, the program carsh

     

  • If I don't modify the driver, I won't be able to initialize using VirtioIPC_init for linux, causing RPMessage_announce(IPC_MPU1_0, rpmsg_tx_endpt, "rpmsg_chrdev") to fail
  • Hello,

    Ipc_isRemoteReady

    This API is definitely needed to ensure the R5F core announces the end point to linux after linux is running on A72 core.

    rpmsg_char_simple is example which communicates between linux and ipc_echo_test/cdd_ipc example with defined endpoint .I noticed you are testing with custom vision apps example and have done the modification for the vision app example.

    The memory layout for MCU1_0 remains same for ipc_echo_test and vision apps no need of modification in memory layout.

    Could you please attach the source code files changed rather than snippets so i could help you further ?

    Regards

    Tarun Mukesh