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.

CCS/AM5728: linux kernel hang after loading DSP image through CCS

Part Number: AM5728

Tool/software: Code Composer Studio

Dear Champs,

My customer is trying to do 'DSP out of reset' to debug their application on C66x DSP, and succeed to load DSP FW using CCS after kernel loading on Cortex-A15 by using below GEL function explained in below e2e.

  • dpll_dsp_config() 
  • DSPSSClkEnable()

https://e2e.ti.com/support/processors/f/791/p/826112/3057668?tisearch=e2e-sitesearch&keymatch=DSPSSClkEnable#3057668

But, after DSP FW loading, they found there is no output in the UART console of Cortex-A15 core running linux and they found below last message in the UART console.

[  112.789652] Unable to handle kernel NULL pointer dereference at virtual address 00000000

Their target is to trace DSP code while linux running independently and they did not implement IPC yet.

What should be done after DSPSSClkEnable() to resolve this issue or should modify DSPSSClkEnable() function?

Their SW is Processor SDK Linux v6.3.0.

Thanks and Best Regards,

SI.

  • Hi SI,

    Most likely boot loader would have already loaded the firmware as part of early boot & since
    there was something running loading another firmware might have resulted in a crash.

    It will be helpful if you can share the complete bootlogs as a text file attachment. Please do
    not copy paste as a response. A text file log will be lot easier to download and analyze.

    Best Regards,
    Keerthy

  • Hi Keerthy

    Thanks for your response.

    But, they did not load the firmware as part of early boot.

    They booted linux on Cortex-A15 and then, they run below sequence in CCS to load DSP FW and run it.

    1. Kernel boot ==> UART console works well.
    2. CCS Launch
    3. Show all cores > Connect CS_DAP_DebugSS
    4. Run AM572x_prcm_config.gel > AM572x_PRCM_Clock_Config_OPPHIGH script 
    5. Run AM572x_multicore_reset.gel > DSP1SSClkEnable_API script
    6. Connect DSP1
    7. Load Program > DSP RTOS out file

    When they checked, the UART console works well until 6. But, after loading DSP FW(7), the UART console was stopped.

    Thanks and Best Regards,

    SI.

  • Hi SI,

    Since the firmware is to be loaded independent of the Linux OS.
    Please disable the dsp nodes as below example diff in the dts file of the customer board.

    Also make sure that the gel files turn on the DSP clocks.

    diff --git a/arch/arm/boot/dts/am572x-idk-common.dtsi b/arch/arm/boot/dts/am572x-idk-common.dtsi
    index 25ced01da8..72ae4640cc 100644
    --- a/arch/arm/boot/dts/am572x-idk-common.dtsi
    +++ b/arch/arm/boot/dts/am572x-idk-common.dtsi
    @@ -117,12 +117,12 @@
     };
     
     &dsp1 {
    -       status = "okay";
    +       status = "disabled";
            memory-region = <&dsp1_memory_region>;
     };
     
     &dsp2 {
    -       status = "okay";
    +       status = "disabled";
            memory-region = <&dsp2_memory_region>;
     };
     
    Regards,
    Keerthy

  • Hi Keerthy,

    Thanks for your response.

    When they disabled DSP1/2 in dts as you recommended, they could not connect JTAG and they got below error message at that time.

    Could you please check below message?

    [  107.119907] Unable to handle kernel NULL pointer dereference at virtual address 00000084
    [  107.128044] Unable to handle kernel NULL pointer dereference at virtual address 00000000
    [  107.136172] pgd = f21c0acc
    [  107.138890] [00000000] *pgd=80000080004003, *pmd=00000000
    [  107.144324] Internal error: Oops: 80000206 [#1] PREEMPT SMP ARM
    [  107.150268] Modules linked in:
    [  107.150275] Unable to handle kernel paging request at virtual address bf2ae140
    [  107.160588] pgd = f21c0acc
    [  107.163306] [bf2ae140] *pgd=80000080006003, *pmd=968ca003, *pte=00000000
    [  107.170043] Internal error: Oops: 207 [#2] PREEMPT SMP ARM
    [  107.175551] Modules linked in:
    [  107.175556] Unable to handle kernel paging request at virtual address bf2ae140
    [  107.185868] pgd = f21c0acc
    [  107.188586] [bf2ae140] *pgd=80000080006003, *pmd=968ca003, *pte=00000000
    [  107.195322] Internal error: Oops: 207 [#3] PREEMPT SMP ARM
    [  107.200829] Modules linked in:
    [  107.200833] Unable to handle kernel paging request at virtual address bf2ae140
    [  107.211145] pgd = f21c0acc
    [  107.213863] [bf2ae140] *pgd=80000080006003, *pmd=968ca003, *pte=00000000
    [  107.220599] Internal error: Oops: 207 [#4] PREEMPT SMP ARM
    [  107.226107] Modules linked in:
    [  107.226111] Unable to handle kernel paging request at virtual address bf2ae140
    [  107.236423] pgd = f21c0acc
    [  107.239141] [bf2ae140] *pgd=80000080006003, *pmd=968ca003, *pte=00000000
    [  107.245877] Internal error: Oops: 207 [#5] PREEMPT SMP ARM
    [  107.251384] Modules linked in:
    [  107.251388] Unable to handle kernel paging request at virtual address bf2ae140
    [  107.261700] pgd = f21c0acc
    [  107.264416] [bf2ae140] *pgd=80000080006003, *pmd=968ca003, *pte=00000000
    [  107.271152] Internal error: Oops: 207 [#6] PREEMPT SMP ARM
    [  107.276659] Modules linked in:
    [  107.276663] Unable to handle kernel paging request at virtual address bf2ae140
    [  107.286977] pgd = f21c0acc
    [  107.289694] [bf2ae140] *pgd=80000080006003, *pmd=968ca003, *pte=00000000
    [  107.296428] Internal error: Oops: 207 [#7] PREEMPT SMP ARM
    [  107.301935] Modules linked in:
    [  107.301939] Unable to handle kernel paging request at virtual address bf2ae140
    [  107.312252] pgd = f21c0acc
    [  107.313753] Unable to handle kernel NULL pointer dereference at virtual address 00000020
    [  107.314972] [bf2ae140] *pgd=80000080006003, *pmd=968ca003, *pte=00000000
    [  107.323093] pgd = f21c0acc
    [  107.329817] Internal error: Oops: 207 [#8] PREEMPT SMP ARM
    [  107.332529] [00000020] *pgd=80000080004003, *pmd=00000000
    [  107.338032] Modules linked in:
    [  107.338036] Unable to handle kernel paging request at virtual address bf2ae140
    [  107.353754] pgd = f21c0acc
    [  107.356471] [bf2ae140] *pgd=80000080006003, *pmd=968ca003, *pte=00000000
    [  107.363207] Internal error: Oops: 207 [#9] PREEMPT SMP ARM
    [  107.368714] Modules linked in:
    [  107.368718] Unable to handle kernel paging request at virtual address bf2ae140
    [  107.379030] pgd = f21c0acc
    [  107.381747] [bf2ae140] *pgd=80000080006003, *pmd=968ca003, *pte=00000000
    [  107.388482] Internal error: Oops: 207 [#10] PREEMPT SMP ARM
    [  107.394075] Modules linked in:
    [  107.394079] Unable to handle kernel paging request at virtual address bf2ae140
    [  107.404393] pgd = f21c0acc
    [  107.407110] [bf2ae140] *pgd=80000080006003, *pmd=968ca003, *pte=00000000
    [  107.413845] Internal error: Oops: 207 [#11] PREEMPT SMP ARM
    

    I also attached their below files in the zip.

    RTOS cfg 

    Rsc_table_vayu_dsp.c

    Config.bld

    c66x_rtos.zip

    Thanks and Best Regards,

    SI.

  • Hi Keerthy,

    Is there any update on this issue?

    Thanks and Best Regards,

    SI.

  • Hi Keerthy,

    Is there anything more to allocate resources like power management to DSP in linux device tree?

    Thanks and Best Regards,

    SI.

  • Hi SI,

    If the change in dts files causes the new errors, you might want to revert the change.

    Going back to original issue with UART after DSP firmware is running, can they disable auto run to main option in CCS?

    This way they can try to step thru the code from _c_int00 (entry point of DSP code) and see what causes the issue on Linux side. 

  • Hi Stanley,

    Thanks for your response.

    As there has been no response, I persuaded them not to load new DSP FW at the debugging time and how DSP can be debugged without new DSP FW loading using below UG.

    Thanks and Best Regards,

    SI.