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: DSP software loading from Linux



Tool/software: TI-RTOS

Hello,

Can please anyone tell me that how ARM processor interacts with DSP processor for  loading DSP software(OS) in linux environment and how a user can check from user space that sotware on DSP processor is loaded successfully or not?

  • Hi,

    This is done through the remoteproc framework. See these links for further information:
    www.kernel.org/.../remoteproc.txt
    processors.wiki.ti.com/.../RPMsg_Kernel_Client_Application
  • Hi Biser,
    Thank u for your response. Please suggest me that how user can check from user space that sotware(OS) on DSP processor is loaded successfully or not?
  • Hi, Vishal,

    You can dmesg to see remoteproc logs:

    root@am57xx-evm:~# dmesg | grep remoteproc
    [ 11.645369] remoteproc remoteproc0: 58820000.ipu is available
    [ 11.669816] remoteproc remoteproc1: 55020000.ipu is available
    [ 11.739589] remoteproc remoteproc2: 40800000.dsp is available
    [ 11.829181] remoteproc remoteproc3: 41000000.dsp is available
    [ 12.047718] remoteproc remoteproc0: powering up 58820000.ipu
    [ 12.054098] remoteproc remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 4872056
    [ 12.109737] remoteproc remoteproc0: registered virtio0 (type 7)
    [ 12.115766] remoteproc remoteproc0: remote processor 58820000.ipu is now up
    [ 12.185523] remoteproc remoteproc1: powering up 55020000.ipu
    [ 12.192748] remoteproc remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3743164
    [ 12.313743] remoteproc remoteproc1: registered virtio1 (type 7)
    [ 12.313749] remoteproc remoteproc1: remote processor 55020000.ipu is now up
    [ 13.902417] remoteproc remoteproc3: powering up 41000000.dsp
    [ 13.909895] remoteproc remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 21891524
    [ 14.161413] remoteproc remoteproc3: registered virtio2 (type 7)
    [ 14.184254] remoteproc remoteproc3: remote processor 41000000.dsp is now up
    [ 14.304954] remoteproc remoteproc2: powering up 40800000.dsp
    [ 14.383018] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 21891524
    [ 15.186808] remoteproc remoteproc2: registered virtio3 (type 7)
    [ 15.186814] remoteproc remoteproc2: remote processor 40800000.dsp is now up
    [ 15.813381] remoteproc remoteproc4: 4b234000.pru0 is available
    [ 15.813723] remoteproc remoteproc5: 4b238000.pru1 is available
    [ 15.814041] remoteproc remoteproc6: 4b2b4000.pru0 is available
    [ 15.814324] remoteproc remoteproc7: 4b2b8000.pru1 is available

    Or check to see the sysfs

    root@am57xx-evm:/sys/kernel/debug/remoteproc# ls
    remoteproc0 remoteproc2 remoteproc4 remoteproc6
    remoteproc1 remoteproc3 remoteproc5 remoteproc7


    root@am57xx-evm:/sys/kernel/debug/remoteproc# cd remoteproc2
    root@am57xx-evm:/sys/kernel/debug/remoteproc/remoteproc2# cat name
    40800000.dsp


    root@am57xx-evm:/sys/kernel/debug/remoteproc/remoteproc2# cat trace0
    [ 0.000] 20 Resource entries at 0xfec00000
    [ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    root@am57xx-evm:/sys/kernel/debug/remoteproc/remoteproc2#

  • Hi Rex,

    Thank you for providing this information. It is really helpful for me.

  • hello Rex.

    Can u tell me that How ARM processor is able to determine that remote processor 40800000.dsp is now up or not?

    is there any file from where ARM is reading the status of DSP processor?

  • Hi, Vishal,

    No. there isn't any file to read the status other than dmesg showing if the dsp is up or down. I powered down the dsp and the dmesg shows
    the releasing of the dsp.

    [ 13.116005] remoteproc remoteproc5: 4b238000.pru1 is available
    [ 13.116301] remoteproc remoteproc6: 4b2b4000.pru0 is available
    [ 13.116551] remoteproc remoteproc7: 4b2b8000.pru1 is available
    [ 205.340461] remoteproc remoteproc2: releasing 40800000.dsp

    Rex
  • Hi Rex,
    when I am reading status of my DSP in /sys/kernel/debug/remoteproc/remoteproc2/status , it is showing "suspended" but when i m giving dmesg command it is showing that "remote processor 40800000.dsp is now up".
    1. I am not getting understand that if my DSP is up so why its status is suspended?
    2. How ARM is able to know that DSP processor's status is suspended?
    please guide me to understand this concept.

    Vishal
  • Hi, Vishal,

    The suspended is the internal state of the power management state machine in remoteproc.

    Rex
  • Vishal Badole said:

    Can u tell me that How ARM processor is able to determine that remote processor 40800000.dsp is now up or not?

    is there any file from where ARM is reading the status of DSP processor?

    If you have debugfs enabled you can get some information about the DSPs (and control recovery behavior) via these nodes (applies to remoteproc ID 0-3, I used 2 in the example below):

    /sys/kernel/debug/remoteproc/remoteproc2/name

    /sys/kernel/debug/remoteproc/remoteproc2/recovery

    /sys/kernel/debug/remoteproc/remoteproc2/state

    /sys/kernel/debug/remoteproc/remoteproc2/trace0

    /sys/kernel/debug/remoteproc/remoteproc2/version

    Gerard

  • Hello to all,

    Please suggest me that how to power down the DSP processor from ARM linux?

    Vishal

  • Vishal,

    Try using sysfs to bind/unbind the dsp.

    cd /sys/bus/platform/drivers/omap-rproc/
    echo 40800000.dsp > unbind

    Rex
  • Hi Rex,
    using echo 40800000.dsp > unbind , the message queue between DSP and ARM is removed but DSP processor is still consuming power and it is not power down. Please can u tell me how to Power down DSP processor completely so it will not consume power?
  • Hi, Vishal,

    Please refer to the power management User[s Guide in processors.wiki.ti.com/.../Linux_Core_Power_Management_User's_Guide_(v4.4)
    Currently, it only supports suspend to RAM. In RTOS SDK, there are example to put IPU in idle. I don't think DSP is doing it. I need to confirm it with the RTOS team.

    Rex