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.

OpenCL on BeagleBoard X15

Other Parts Discussed in Thread: BEAGLEBOARD-X15

I'm using BeagleBoard X15 (am57xx) and I would like to use OpenCL to do
some DSP works;

I installed firmware-am57xx-opencl-monitor but opencl/examples in directory
/usr/share/ti/examples/opencl did not work:

./simple
Unable to allocate OCL MSMC memory from 0xc0000000

I checked dmesg and it seems that DSP1 is programmed but DSP2 failed with error -12:

[ 14.551246] remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 21021108
[ 14.557912] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
[ 14.557952] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
[ 14.558043] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
[ 14.569184] remoteproc2: remote processor 40800000.dsp is now up
[ 14.574798] virtio_rpmsg_bus virtio1: rpmsg host is online
[ 14.574894] virtio_rpmsg_bus virtio1: creating channel rpmsg-proto addr 0x3d

[ 14.576226] remoteproc3: powering up 41000000.dsp
[ 14.598503] remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 21021108
[ 14.605123] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[ 14.605161] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
[ 14.605225] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
[ 14.605258] omap-rproc 41000000.dsp: dma_alloc_coherent err: 9437184
[ 14.611670] remoteproc3: Failed to process resources: -12
[ 14.623801] omap_hwmod: mmu1_dsp2: _wait_target_disable failed
[ 14.630424] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[ 14.633716] remoteproc3: rproc_boot() failed -12
[ 14.639219] virtio_rpmsg_bus: probe of virtio2 failed with error -12

I checked in /lib/firmware and files: dra7-dsp1-fw.xe66 and dra7-dsp2-fw.xe66
exists;

I'm using kernel 4.4.20-ti-r43

Regards,
Gennaro

  • Hi, it is possible to have support on this ?

    Thanks
  • Hi Gennaro,

    Gennaro Tortone said:
    I installed firmware-am57xx-opencl-monitor but opencl/examples in directory
    /usr/share/ti/examples/opencl did not work:


    From where you get this firmware-am57xx-opencl-monitor file? From where you get these opencl examples?

    Gennaro Tortone said:
    I'm using kernel 4.4.20-ti-r43

    So you are not using AM57x TI SDK ti-processor-sdk-linux-am57xx-evm-03.00.00.04? From where you get this kernel?

    Note that TI OpenCL v01.01.xx support only AM572x EVM:

    Regards,
    Pavel

  • Hi Pavel,

    I have a AM572x EVM board and I'm not using ti-processor-sdk-linux-am57xx-evm-03.00.00.04 due to a problem related to microSD flashing of
    Linux image (see this ticket: e2e.ti.com/.../1976424

    I'm using Linux Debian provided by this repository from RobertCNelson github.com/.../image-builder;
    repositories configured by this distribution also provide firmware-am57xx-opencl-monitor and ti-opencl libraries
  • Gennaro Tortone said:
    I have a AM572x EVM board and I'm not using ti-processor-sdk-linux-am57xx-evm-03.00.00.04 due to a problem related to microSD flashing of
    Linux image (see this ticket: e2e.ti.com/.../1976424

    Have you tried with another SD card or older version of the AM572x TI SDK? See also if the below e2e threads will be in help:

    Gennaro Tortone said:
    I'm using Linux Debian provided by this repository from RobertCNelson github.com/.../image-builder;
    repositories configured by this distribution also provide firmware-am57xx-opencl-monitor and ti-opencl libraries

    I am not familiar with that Linux distribution, but it seems to me that this one do not support AM572x GP EVM, but BeagleBoard-X15. Maybe the community BeagleBoard forum will be of more help.


    Regards,
    Pavel

  • Gennaro Tortone said:
    [ 14.623801] omap_hwmod: mmu1_dsp2: _wait_target_disable failed
    [ 14.630424] omap_hwmod: mmu0_dsp2: _wait_target_disable failed

    I found that these warning messages are not fatal to the proper dsp function, see the below e2e threads:

    Regards,
    Pavel

  • Hi,

    according the section 7.23.1 in the AM572x Sitara Processors Silicon Revision 2.0 Data Manual, the SD Card Interface in AM572x should be compliant with the SD Standard v3.01, aslo SDXC. So, SDHC, SD Version 2, should be also supported without any problem;

    the microsd provided with AM57xx EVM is also SDHC... and it does not working

    for Linux related questions I will try to post in BeagleBoard forum for help...
  • I am experiencing this problem too with "Unable to allocate OCL MSMC memory from 0x40500000". On the same platform. However dmesg shows me

    [ 10.733535] omap-rproc 40800000.dsp: assigned reserved memory node dsp1_cma@99000000
    [ 10.733582] remoteproc2: 40800000.dsp is available
    [ 10.733586] remoteproc2: Note: remoteproc is still under development and considered experimental.
    [ 10.733590] remoteproc2: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [ 10.733829] omap-rproc 41000000.dsp: assigned reserved memory node dsp2_cma@9f000000
    [ 10.733870] remoteproc3: 41000000.dsp is available
    [ 10.733876] remoteproc3: Note: remoteproc is still under development and considered experimental.
    [ 10.733883] remoteproc3: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [ 10.757559] remoteproc0: Direct firmware load for dra7-ipu1-fw.xem4 failed with error -2
    [ 10.757574] remoteproc0: failed to load dra7-ipu1-fw.xem4
    [ 10.763146] remoteproc1: Direct firmware load for dra7-ipu2-fw.xem4 failed with error -2
    [ 10.763155] remoteproc1: failed to load dra7-ipu2-fw.xem4
    [ 10.769175] remoteproc2: Direct firmware load for dra7-dsp1-fw.xe66 failed with error -2
    [ 10.769186] remoteproc2: failed to load dra7-dsp1-fw.xe66
    [ 10.775324] remoteproc3: Direct firmware load for dra7-dsp2-fw.xe66 failed with error -2
    [ 10.775337] remoteproc3: failed to load dra7-dsp2-fw.xe66

    Even though all the firmwares above are there in /lib/firmware.
  • Looking further into the boot logs i see dsp2 failing after the logs that i posted.


    Full boot log here:

    Looking into the logs a bit more i see

    "[   15.660498] omap-rproc 41000000.dsp: dma_alloc_coherent err: 9437184"

    Searching for that error grants no results on e2e, im thinking its trying to allocate 9Mb but failing somehow.

    Anyone know where i could increase the memory reserved for the DSP? Or somehow circumvent this error?

  • Hi Shim,

    Shim Apan said:
    I am experiencing this problem too with "Unable to allocate OCL MSMC memory from 0x40500000".

    This 0x40500000 addr is the start address of the OCMC_RAM3 memory (available on AM572x, not on AM571x). This memory is 1MB. I would suggest you to check if your application is trying to allocate more than 1MB memory from that location. Check also if this memory has been already used and locked by other driver or application.

    See if the below e2e threads will be in help:

    Shim Apan said:
    [ 10.769175] remoteproc2: Direct firmware load for dra7-dsp1-fw.xe66 failed with error -2
    [ 10.769186] remoteproc2: failed to load dra7-dsp1-fw.xe66

    Make sure you are using the correct toolchain. See the below e2e thread for more info:

    Regards,
    Pavel

  • Hello Pavel, since the "Direct firmware load" error i have fixed that but the dma_alloc_coherent error remains

    [ 18.214573] remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 21021108
    [ 18.228760] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
    [ 18.234663] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
    [ 18.240629] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
    [ 18.262404] remoteproc2: remote processor 40800000.dsp is now up
    [ 18.275065] virtio_rpmsg_bus virtio1: rpmsg host is online
    [ 18.275155] virtio_rpmsg_bus virtio1: creating channel rpmsg-proto addr 0x3d
    [ 18.295542] remoteproc3: powering up 41000000.dsp
    [ 18.346065] remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 21021108
    [ 18.360169] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
    [ 18.366070] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
    [ 18.372039] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
    [ 18.378314] omap-rproc 41000000.dsp: dma_alloc_coherent err: 9437184
    [ 18.384739] remoteproc3: Failed to process resources: -12
    [ 18.396845] omap_hwmod: mmu1_dsp2: _wait_target_disable failed
    [ 18.409296] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
    [ 18.418214] remoteproc3: rproc_boot() failed -12


    It boots up the firmware correctly but it fails when trying to allocate 9Mb of dma memory to the DSP. Would you know where i could increase the memory reserved for DSP2?
  • Shim Apan said:
    [ 18.378314] omap-rproc 41000000.dsp: dma_alloc_coherent err: 9437184

    It seems to me that it tries to allocate 9Mbit memory from DSP2_L2_SRAM (0x41000000 - 0x41047FFF), which is only 288KByte. You might try to allocate from other on-chip memory like OCMC_RAMx and OCMC_RAMx_CBUF. See the AM57x TRM, chapter 2 Memory Map.

    Regards,
    Pavel