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.

Linux/TDA2P-ACD: CMEM issues:CMEM Error: registerAlloc: ioctl CMEM_IOCREGUSER failed for phys addr 0xa9000000: -1

Part Number: TDA2P-ACD

Tool/software: Linux

Hello:

  Checked with this post https://e2e.ti.com/support/arm/sitara_arm/f/791/t/604490 

root@dra7xx-evm:~# ./dso_dataset files=images.zip gamma=pcalib.txt vignette=vignette.png preset=0 mode=0
loading data from images.zip!
loading gammaCalib from pcalib.txt!
loading vignette from vignette.png!

=============== PRESET Settings: ===============
DEFAULT settings:
- no real-time enforcing
- 2000 active points
- 5-7 active frames
- 1-6 LM iteration each KF
- original image resolution
==============================================
PHOTOMETRIC MODE WITH CALIBRATION!
ERROR 4 reading archive images.zip!
CMEM Error: registerAlloc: ioctl CMEM_IOCREGUSER failed for phys addr 0xa9000000: -1
TIOCL FATAL: The TI Multicore Tools daemon (/usr/bin/ti-mctd) is not running. Re-run application after starting the daemon. Refer User Guide for details.
Aborted (core dumped)
root@dra7xx-evm:~#

root@dra7xx-evm:~# /usr/bin/ti-mctd
ti-mctd: /jenkins/psdkla-krogoth/release/dra7xx/yocto/tisdk/build/arago-tmp-external-linaro-toolchain/work/dra7xx_evm-linux-gnueabi/opencl/1.1.12.0-r0.0/git/host/mct-daemon/cmem_allocator.h:80: CmemAllocator::CmemAllocator(): Assertion `ddr_alloc_dsp_addr_ == ddr_addr' failed.
Aborted (core dumped)
root@dra7xx-evm:~#

  • buildc onfiguration is MAKECONFIG?=tda2px_evm_linux_all

  •     run 'vecadd"

root@dra7xx-evm:/usr/share/ti/examples/opencl/vecadd# ./vecadd
CMEM Error: registerAlloc: ioctl CMEM_IOCREGUSER failed for phys addr 0xa9000000: -1
TIOCL FATAL: The TI Multicore Tools daemon (/usr/bin/ti-mctd) is not running. Re-run application after starting the daemon. Refer User Guide for details.
Aborted (core dumped)

  • cmem info

         

root@dra7xx-evm:/usr/share/ti/examples/opencl/vecadd# cat /proc/cmem

Block 0: Pool 0: 4 bufs size 0x7e9000 (0x7e9000 requested)

Pool 0 busy bufs:

Pool 0 free bufs:
id 0: phys addr 0xaa7bb000
id 1: phys addr 0xa9fd2000
id 2: phys addr 0xa97e9000

  • Hi:

      And we have nothing change with DTS, just apply an patch to fix the early boot and late attach.

    7127.0001-dra7xx-disable-LPAE.patch.txt
    From ba07c1a86fc48b92eed32828cdec82e902c0d1fb Mon Sep 17 00:00:00 2001
    From: Subhajit Paul <subhajit_paul@ti.com>
    Date: Tue, 22 May 2018 18:14:50 +0530
    Subject: [PATCH] dra7xx: disable LPAE
    
    Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
    ---
     ti_config_fragments/defconfig_map.txt | 4 ++--
     ti_config_fragments/dra7_only.cfg     | 2 --
     2 files changed, 2 insertions(+), 4 deletions(-)
    
    diff --git a/ti_config_fragments/defconfig_map.txt b/ti_config_fragments/defconfig_map.txt
    index 6d2e9ff..2718db7 100644
    --- a/ti_config_fragments/defconfig_map.txt
    +++ b/ti_config_fragments/defconfig_map.txt
    @@ -1,14 +1,14 @@
     # Release Defconfigs
     classification: SDK_Release_Defconfigs type: ti_sdk_am3x_release defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg wlan.cfg omap_soc.cfg am33xx_only.cfg systemd.cfg
     classification: SDK_Release_Defconfigs type: ti_sdk_am4x_release defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg wlan.cfg omap_soc.cfg am43xx_only.cfg systemd.cfg
    -classification: SDK_Release_Defconfigs type: ti_sdk_dra7x_release defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg wlan.cfg omap_soc.cfg lpae.cfg dra7_only.cfg systemd.cfg auto.cfg boot_opt.cfg
    +classification: SDK_Release_Defconfigs type: ti_sdk_dra7x_release defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg wlan.cfg omap_soc.cfg dra7_only.cfg systemd.cfg auto.cfg
     classification: SDK_Release_Defconfigs type: ti_sdk_omap2_release defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg wlan.cfg omap_soc.cfg systemd.cfg
     classification: SDK_Release_Defconfigs type: ti_sdk_k2g_release defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg keystone.cfg lpae.cfg k2g_only.cfg systemd.cfg
     classification: SDK_Release_Defconfigs type: ti_sdk_keystone_release defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg keystone.cfg lpae.cfg systemd.cfg
     # Debug Defconfigs
     classification: SDK_Debug_Defconfigs type: ti_sdk_am3x_debug defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg wlan.cfg omap_soc.cfg am33xx_only.cfg systemd.cfg debug_options.cfg
     classification: SDK_Debug_Defconfigs type: ti_sdk_am4x_debug defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg wlan.cfg omap_soc.cfg am43xx_only.cfg systemd.cfg debug_options.cfg
    -classification: SDK_Debug_Defconfigs type: ti_sdk_dra7x_debug defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg wlan.cfg omap_soc.cfg lpae.cfg dra7_only.cfg systemd.cfg debug_options.cfg
    +classification: SDK_Debug_Defconfigs type: ti_sdk_dra7x_debug defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg wlan.cfg omap_soc.cfg dra7_only.cfg systemd.cfg debug_options.cfg
     classification: SDK_Debug_Defconfigs type: ti_sdk_omap2_debug defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg wlan.cfg omap_soc.cfg systemd.cfg debug_options.cfg
     classification: SDK_Debug_Defconfigs type: ti_sdk_k2g_debug defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg keystone.cfg lpae.cfg k2g_only.cfg systemd.cfg debug_options.cfg
     classification: SDK_Debug_Defconfigs type: ti_sdk_keystone_debug defconfig: multi_v7_defconfig config_file: None extra_configs: multi_v7_prune.cfg baseport.cfg ipc.cfg connectivity.cfg audio_display.cfg keystone.cfg lpae.cfg systemd.cfg debug_options.cfg
    diff --git a/ti_config_fragments/dra7_only.cfg b/ti_config_fragments/dra7_only.cfg
    index db0d4ab..a5e1fd5 100644
    --- a/ti_config_fragments/dra7_only.cfg
    +++ b/ti_config_fragments/dra7_only.cfg
    @@ -21,5 +21,3 @@ CONFIG_SOC_AM43XX=n
     CONFIG_SOC_DRA7XX=y
     
     CONFIG_ARCH_KEYSTONE=n
    -
    -CONFIG_ARM_LPAE=y
    -- 
    2.7.4
    
    

  • Hi,

    Could you please tell me what the exact use-case is? Are you trying to run OpenCL use-cases using Vision-SDK (VSDK)?
    What version of VSDK are you using? Whats the configuration used to build VSDK?

    Regards
    Shravan
  • Hello Shravan:

    1.  the running case is from

    and we just remove the display of Pangolin.

    1. the visionSDK is 03_04_00_03 from
    2. the configuration used to build VSDK is MAKECONFIG?=tda2px_evm_linux_all
    3. and we check the post above and also failed to run /usr/bin/ti-mct

  • Hello,


    Can you explain how do you end up calling this CMEM api?
    Where are you using VIsion SDK wrt to the git repo you have mentioned?

    Can you provide call stack of where this is getting called from in the application?
    You can run with gdb to get backtrace

    Regards,
    Nikhil D
  • Hello Nikhil D:

    •  Firstly, enable cmem

    cd /opt/vision_sdk/
    root@dra7xx-evm:/opt/vision_sdk# source /opt/vision_sdk/vision_sdk_load.sh 
    Error: I2C Read failed
    Error: I2C Read failed
    Error: I2C Read failed
    ./disableDssInterruptsOnA15.sh: line 11: @0x4A002ACA:: command not found
    ./disableDssInterruptsOnA15.sh: line 12: @0x4A002ACA:: command not found
    ./disableDssInterruptsOnA15.sh: line 13: @0x4A002ACA:: command not found
    ./disableDssInterruptsOnA15.sh: line 14: @0x4A002ACA:: command not found
    ./disableDssInterruptsOnA15.sh: line 15: @0x4A002ACA:: command not found
    ./disableDssInterruptsOnA15.sh: line 16: @0x4A002ACA:: command not found
    ./disableDssInterruptsOnA15.sh: line 17: @0x4A002ACA:: command not found
    ./disableDssInterruptsOnA15.sh: line 18: @0x4A002ACA:: command not found
    ./disableDssInterruptsOnA15.sh: line 19: @0x4A002ACA:: command not found
    updated 0x4A002ACA value is 00930000
    • use gdb to debug the DSO
    PHOTOMETRIC MODE WITH CALIBRATION!
    [New Thread 0xb1a82430 (LWP 1070)]
    ERROR 4 reading archive images.zip!
    CMEM Error: registerAlloc: ioctl CMEM_IOCREGUSER failed for phys addr 0xa9000000: -1
    TIOCL FATAL: The TI Multicore Tools daemon (/usr/bin/ti-mctd) is not running. Re-run application after starting the daemon. Refer User Guide for details.
    
    Program received signal SIGABRT, Aborted.
    __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
    47      ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: No such file or directory.
    (gdb) where
    #0  __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
    #1  0xb5622488 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
    #2  0xb5623192 in __GI_abort () at abort.c:89
    #3  0xb3de2be4 in tiocl::ReportError(tiocl::ErrorType, tiocl::ErrorKind, ...) () from /usr/lib/libOpenCL.so.1
    #4  0xb3dfb73c in tiocl::InitializationPolicyCMEM::DiscoverMemoryRanges(std::vector<tiocl::MemoryRange, std::allocator<tiocl::MemoryRange> >&) ()
       from /usr/lib/libOpenCL.so.1
    #5  0xb3e098e0 in tiocl::SharedMemoryProvider<tiocl::InitializationPolicyCMEM, ReadWritePolicyCMEM, HeapsMultiProcessPolicy>::SharedMemoryProvider(unsigned char)
        () from /usr/lib/libOpenCL.so.1
    #6  0xb3df903c in tiocl::SharedMemoryProviderFactory::CreateSharedMemoryProvider(unsigned char) () from /usr/lib/libOpenCL.so.1
    #7  0xb3de08e4 in Coal::Platform::Platform() () from /usr/lib/libOpenCL.so.1
    #8  0xb3de0a2c in Loki::SingletonHolder<Coal::Platform, Loki::CreateUsingNew, Loki::NoDestroy, Loki::ClassLevelLockable, Loki::Mutex>::MakeInstance() ()
       from /usr/lib/libOpenCL.so.1
    #9  0xb3dcdc68 in ?? () from /usr/lib/libOpenCL.so.1
    #10 0xb6fe262c in _dl_fini () at dl-fini.c:252
    #11 0xb5624008 in __run_exit_handlers (status=status@entry=1, listp=0xb56e74bc <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
    #12 0xb5624030 in __GI_exit (status=status@entry=1) at exit.c:104
    #13 0x0004207a in ImageFolderReader::ImageFolderReader (this=0xb56e7000, path=..., calibFile=..., gammaFile=..., vignetteFile=...)
        at /mnt/workshop/ZhangYunfeng/DSO/src/util/DatasetReader.h:129
    #14 0x00039024 in main (argc=<optimized out>, argv=<optimized out>) at /mnt/workshop/ZhangYunfeng/DSO/src/main_dso_pangolin.cpp:366

  • Hello Nikhil D:
    Apply the opencl_fs_patches.tar.gz following the document <path>ti/vision_sdk/docs/Linux/VisionSDK_Linux_UserGuide.pdf
    the issue remain.
    The IOMM info:

    80000000-953fffff : System RAM
    80008000-808e000b : Kernel code
    80936000-809ce97f : Kernel data
    95800000-a8ffffff : System RAM
    a9000000-aafa3fff : CMEM
    ad000000-bfafffff : System RAM
    bfd00000-fedfffff : System RAM
  • Hello:
    rootfs is tisdk-rootfs-image-dra7xx-evm.tar.xz from downloads.ti.com/.../index_FDS.html
  • Hello:

      Any update? we are blocked in this issue.

  • Hello:
    any update?
  • Hi,

    Sorry for the delayed response. We had discussion about the problem and I can summarize it as follows:
    After VSDK 3.2 release OPENCL usecase has some issue on linux configuration.
    This is a known issue and has been mentioned in release notes of VSDK 3.4 with a JIRA-ID ADASVISION-1894.
    The features you try to use haven’t been fully tested / supported. While the issue seems to be on kernel, specifically
    Open-CL calls to the cmem driver, the team here isn’t aware of the workings of Open-CL on VSDK and/or how
    memory is managed using CMEM.

    Regards,
    Yordan
  • Hi Yordan:
    From visionSDK 3.04, For TDA2Px, OpenCL is removed, did TI have plan to support it?
    We expect to use OpenCL to manipulate the DSP and GPU.
  • Hello
    OpenCL is deprecated from VSDK 3.2 onwards. This is because of some non-compatibility issue between the Linux Kernel/CMEM and openCL prebuilt libs. We do not support rebuilding on these libs and hence no plan to resume this support for any VSDK future releases

    regards, Shiju