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.

dsplink : Proc_attach failed

Other Parts Discussed in Thread: DM3730, OMAP3530

Hello,

I have a dm3730 on which I'm trying to run the message program from dsplink samples.

I've compiled both gpp and dsp side of dsplink and the sample programs and when i try to run messagegpp i get this:

./messagegpp ./message.out 100

========== Sample Application : MESSAGE ==========
Entered MESSAGE_Create ()
PROC_setup (). Status = [0x8000]
PROC_attach () failed. Status = [0x8000800c]
PROC_setup () failed. Status = [0x8000800c]
Leaving MESSAGE_Create ()
Entered MESSAGE_Delete ()
Assertion failed (IS_VALID_MSGQ (msgqQueue)). File : msgq.c Line : 478
MSGQ_release () failed. Status = [0x8000800b]
Assertion failed (IS_VALID_MSGQ (msgqQueue)). File : msgq.c Line : 329
Leaving MESSAGE_Delete ()
====================================================

PROC_attach() is returing 0x8000800c (DSP_EMEMORY), which is strange since according to the proc.h file, PROC_attach should'nt return this error ...

Anyway I don't know how to fix this memory allocation failure. Can anyone help me?

This is what a dmesg gives me :

[ 1565.245635] WARNING: at arch/arm/mm/ioremap.c:207 __arm_ioremap_pfn_caller+0x48/0x188()
[ 1565.253692] Modules linked in: dsplinkk
[ 1565.257598] [<c003c208>] (unwind_backtrace+0x0/0xec) from [<c005d890>] (warn_slowpath_common+0x4c/0x7c)
[ 1565.267517] [<c005d890>] (warn_slowpath_common+0x4c/0x7c) from [<c005d8dc>] (warn_slowpath_null+0x1c/0x24)
[ 1565.277252] [<c005d8dc>] (warn_slowpath_null+0x1c/0x24) from [<c003de94>] (__arm_ioremap_pfn_caller+0x48/0x188)
[ 1565.287414] [<c003de94>] (__arm_ioremap_pfn_caller+0x48/0x188) from [<c003e044>] (__arm_ioremap_caller+0x58/0x60)
[ 1565.297882] [<c003e044>] (__arm_ioremap_caller+0x58/0x60) from [<bf017d64>] (MEM_Map+0x5c/0xe8 [dsplinkk])
[ 1565.307708] [<bf017d64>] (MEM_Map+0x5c/0xe8 [dsplinkk]) from [<bf0012cc>] (OMAP3530_init+0xcc/0x2bc [dsplinkk])
[ 1565.317962] [<bf0012cc>] (OMAP3530_init+0xcc/0x2bc [dsplinkk]) from [<bf000498>] (DSP_init+0x54/0x68 [dsplinkk])
[ 1565.328277] [<bf000498>] (DSP_init+0x54/0x68 [dsplinkk]) from [<bf003a78>] (LDRV_PROC_init+0x2e8/0x400 [dsplinkk])
[ 1565.338806] [<bf003a78>] (LDRV_PROC_init+0x2e8/0x400 [dsplinkk]) from [<bf01dcfc>] (PMGR_PROC_attach+0x150/0x488 [dsplinkk])
[ 1565.350250] [<bf01dcfc>] (PMGR_PROC_attach+0x150/0x488 [dsplinkk]) from [<bf01f2c4>] (DRV_Ioctl+0x378/0x7ec [dsplinkk])
[ 1565.361633] [<bf01f2c4>] (DRV_Ioctl+0x378/0x7ec [dsplinkk]) from [<c00cbcac>] (vfs_ioctl+0x60/0x70)
[ 1565.370758] [<c00cbcac>] (vfs_ioctl+0x60/0x70) from [<c00cc344>] (do_vfs_ioctl+0x4b8/0x500)
[ 1565.379150] [<c00cc344>] (do_vfs_ioctl+0x4b8/0x500) from [<c00cc3c4>] (sys_ioctl+0x38/0x5c)
[ 1565.387603] [<c00cc3c4>] (sys_ioctl+0x38/0x5c) from [<c0037f00>] (ret_fast_syscall+0x0/0x30)
[ 1565.396087] ---[ end trace 2507c381e0533cbc ]---
[ 1565.400726] Failure [0x8000800c] in [0x504] at line 453
[ 1565.406005] Failure [0x8000800c] in [0x801] at line 535
[ 1565.411285] Failure [0x8000800c] in [0x701] at line 362
[ 1565.416534]  DSP_init status [0x8000800c]
[ 1565.420684] Assertion failed (dspState->halObject != NULL). File : /home/jdoe/igep/dsplink_linux_1_65_00_03/dsplink/gpp/src/../../gpp/src/arch/OMAP3530/omap3530.c Line : 650
[ 1565.436279] Failure [0x8000800c] in [0x300] at line 468
[ 1565.441558] Failure [0x8000800c] in [0x300] at line 555

 

Thanks for your help!

 

Jonathan

  • Some aditionnal details :

    with trace enabled i get :

    ========== Sample Application : MESSAGE ==========
    Entered MESSAGE_Create ()
    Entered PROC_setup ()
        linkCfg    [0x0]
    Entered DRV_Initialize ()
        drvObj    [0x37814]
        arg    [0x0]
    Leaving DRV_Initialize ()     status [0x8000]
    Entered DRV_ProtectInit ()
        drvObj    [0x1a38008]
    Leaving DRV_ProtectInit ()     status [0x8000]
    Entered DRV_ProtectEnter ()
        drvObj    [0x1a38008]
    Leaving DRV_ProtectEnter ()     status [0x8000]
    Entered DRV_Invoke ()
        drvObj    [0x1a38008]
        cmdId    [0xc018e011]
        arg1    [0xbe93eaf8]
        arg2    [0x0]
    Entered DRV_installCleanupRoutines ()
        linkCfgPtr    [0x377ec]
    Leaving DRV_installCleanupRoutines ()
    osStatus: 0
    Entered _POOL_init ()
    Leaving _POOL_init ()
    Status: 8000
    Leaving DRV_Invoke ()     status [0x8000]
    Entered _MEM_USR_init ()
    Leaving _MEM_USR_init ()     status [0x8000]
    Entered _IDM_USR_init ()
    Entered DRV_Invoke ()
        drvObj    [0x1a38008]
        cmdId    [0xc018e053]
        arg1    [0xbe93eac4]
        arg2    [0x0]
    Status: 8000
    Leaving DRV_Invoke ()     status [0x8000]
    Leaving _IDM_USR_init ()     status [0x8000]
    Entered _SYNC_USR_init ()
    Entered _IDM_USR_create ()
        key    [0x10080]
        attrs    [0xbe93eacc]
    Entered DRV_Invoke ()
        drvObj    [0x1a38008]
        cmdId    [0xc018e055]
        arg1    [0xbe93ea9c]
        arg2    [0x0]
    Status: 8000
    Leaving DRV_Invoke ()     status [0x8000]
    Leaving _IDM_USR_create ()     status [0x8000]
    Leaving _SYNC_USR_init ()     status [0x8000]
    Entered _SYNC_USR_createCS ()
        idKey    [0x2bdfc]
        csObj    [0x3781c]
    Entered _IDM_USR_acquireId ()
        key    [0x10080]
        idKey    [0x2bdfc]
        id    [0xbe93ead0]
    Entered DRV_Invoke ()
        drvObj    [0x1a38008]
        cmdId    [0xc018e057]
        arg1    [0xbe93ea9c]
        arg2    [0x0]
    Status: 8000
    Leaving DRV_Invoke ()     status [0x8000]
    Leaving _IDM_USR_acquireId ()     status [0x8000]
    Leaving _SYNC_USR_createCS ()     status [0x8000]
    Entered DRV_ProtectLeave ()
        drvObj    [0x1a38008]
    Leaving DRV_ProtectLeave ()     status [0x8000]
    Entered PROC_resetCurStatus ()
    Leaving PROC_resetCurStatus ()
    Leaving PROC_setup ()     status [0x8000]
    PROC_setup (). Status = [0x8000]
    Entered PROC_attach ()
        procId    [0x0]
        attr    [0x0]
    Entered DRV_Initialize ()
        drvObj    [0x37814]
        arg    [0x0]
    Entered _SYNC_USR_enterCS ()
        csObj    [0x1a38020]
    Leaving _SYNC_USR_enterCS ()     status [0x8000]
    Entered _SYNC_USR_leaveCS ()
        csObj    [0x1a38020]
    Leaving _SYNC_USR_leaveCS ()     status [0x8000]
    Leaving DRV_Initialize ()     status [0x8000]
    Entered _SYNC_USR_enterCS ()
        csObj    [0x1a38020]
    Leaving _SYNC_USR_enterCS ()     status [0x8000]
    Entered DRV_Invoke ()
        drvObj    [0x1a38008]
        cmdId    [0xc018e018]
        arg1    [0xbe93eaf4]
        arg2    [0x0]
    Status: 8000800c
    Leaving DRV_Invoke ()     status [0x8000800c]
    Entered _SYNC_USR_leaveCS ()
        csObj    [0x1a38020]
    Leaving _SYNC_USR_leaveCS ()     status [0x8000]
    Leaving PROC_attach ()     status [0x8000800c]
    PROC_attach () failed. Status = [0x8000800c]

     

     

     

     

  • I haven't used the dm3730 but I know that for the beagleboard and omap3530 evm you have to pass a u-boot argument to make sure that DSPLink has enough memory to run the command "mem=80M" basically allocates 80 MB and unless you make that u-boot modification dsplink won't work.  I'm assuming that you have to do something similar for the dm3730 I think the dsplink documentation includes platform specific recommendation which might be discussing this.

  • Hi,

    You were assuming right.

    There was no memory allocation set on my u-boot bootarg.

    With mem=126M, it seems to work fine now.

     

    Thanks!

     

    Jonathan

  • Hi ,

    i'm using AM35x-OMAP35x-LINUX-PSP-04.02.00.07 with Beagle board REVC5. i used kernel from the PSP. then i built syslink with the following tools.

    bios_6_33_00_19

    ipc_1_23_05_40

    codec_engine_3_21_02_25

    TI_CGT_C6000_7.3.1

    xdctools_3_23_00_32

    syslink_2_10_01_15

    after built i'm running with the following bootargs

    console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootfstype=ext2 rw rootwait mem=250M

    after booting into file system when i'm trying to load syslink.ko i'm getting following messages.

    /]#insmod /lib/modules/2.6.37/kernel/drivers/dsp/syslink.ko TRACE=1 TRACEFAILURE=1
    [   38.611999] SysLink version : 2.10.01.15
    [   38.611999] SysLink module created on Date:Jan  6 2012 Time:14:13:04
    [   38.622894] Trace enabled
    [   38.625701] Trace SetFailureReason enabled
    [   38.907684] ------------[ cut here ]------------
    [   38.912567] WARNING: at /home/eswar/vtobbc/script-build/kernel/kernel/lockdep.c:2481 lockdep_trace_alloc+0xac/0xec()
    [   38.923583] Modules linked in: syslink(+)
    [   38.927825] [<c004a348>] (unwind_backtrace+0x0/0xec) from [<c00721d0>] (warn_slowpath_common+0x4c/0x64)
    [   38.937683] [<c00721d0>] (warn_slowpath_common+0x4c/0x64) from [<c0072200>] (warn_slowpath_null+0x18/0x1c)
    [   38.947784] [<c0072200>] (warn_slowpath_null+0x18/0x1c) from [<c009e870>] (lockdep_trace_alloc+0xac/0xec)
    [   38.957824] [<c009e870>] (lockdep_trace_alloc+0xac/0xec) from [<c00fa000>] (kmem_cache_alloc_notrace+0x1c/0xd0)
    [   38.968383] [<c00fa000>] (kmem_cache_alloc_notrace+0x1c/0xd0) from [<c00f1d5c>] (__get_vm_area_node+0xac/0x1f8)
    [   38.978942] [<c00f1d5c>] (__get_vm_area_node+0xac/0x1f8) from [<c00f276c>] (__vmalloc_node+0x70/0xa8)
    [   38.988586] [<c00f276c>] (__vmalloc_node+0x70/0xa8) from [<c00f28c0>] (vmalloc+0x24/0x2c)
    [   38.997802] [<c00f28c0>] (vmalloc+0x24/0x2c) from [<bf02aa8c>] (MemoryOS_alloc+0xc0/0x1a4 [syslink])
    [   39.008117] [<bf02aa8c>] (MemoryOS_alloc+0xc0/0x1a4 [syslink]) from [<bf01f970>] (Memory_alloc+0x68/0x154 [syslink])
    [   39.019805] [<bf01f970>] (Memory_alloc+0x68/0x154 [syslink]) from [<bf020408>] (GateMutex_create+0x1c/0x90 [syslink])
    [   39.031616] [<bf020408>] (GateMutex_create+0x1c/0x90 [syslink]) from [<bf043268>] (GateMP_setup+0xd8/0x3b4 [syslink])
    [   39.043457] [<bf043268>] (GateMP_setup+0xd8/0x3b4 [syslink]) from [<bf018118>] (Platform_setup+0x188/0x5b8 [syslink])
    [   39.055267] [<bf018118>] (Platform_setup+0x188/0x5b8 [syslink]) from [<bf043898>] (Ipc_setup+0xa0/0x158 [syslink])
    [   39.066772] [<bf043898>] (Ipc_setup+0xa0/0x158 [syslink]) from [<bf1134d8>] (KnlUtilsDrv_initializeModule+0x4d8/0x568 [syslink])
    [   39.079193] [<bf1134d8>] (KnlUtilsDrv_initializeModule+0x4d8/0x568 [syslink]) from [<c003a3b8>] (do_one_initcall+0xc8/0x1a0)
    [   39.090942] [<c003a3b8>] (do_one_initcall+0xc8/0x1a0) from [<c00ab434>] (sys_init_module+0x90/0x1b0)
    [   39.100494] [<c00ab434>] (sys_init_module+0x90/0x1b0) from [<c0044540>] (ret_fast_syscall+0x0/0x3c)
    [   39.109954] ---[ end trace eda13c4b30a0aa20 ]---
    [   39.114776] BUG: sleeping function called from invalid context at /home/eswar/vtobbc/script-build/kernel/mm/slab.c:3101
    [   39.126068] in_atomic(): 0, irqs_disabled(): 128, pid: 635, name: insmod
    [   39.133056] INFO: lockdep is turned off.
    [   39.137176] irq event stamp: 30895
    [   39.140716] hardirqs last  enabled at (30894): [<c00d53d8>] get_page_from_freelist+0x304/0x490
    [   39.149749] hardirqs last disabled at (30895): [<bf02633c>] Gate_enterSystem+0x10/0x18 [syslink]
    [   39.159271] softirqs last  enabled at (29553): [<c007837c>] irq_exit+0x50/0x9c
    [   39.166839] softirqs last disabled at (29546): [<c007837c>] irq_exit+0x50/0x9c
    [   39.174438] [<c004a348>] (unwind_backtrace+0x0/0xec) from [<c00fa018>] (kmem_cache_alloc_notrace+0x34/0xd0)
    [   39.184631] [<c00fa018>] (kmem_cache_alloc_notrace+0x34/0xd0) from [<c00f1d5c>] (__get_vm_area_node+0xac/0x1f8)
    [   39.195220] [<c00f1d5c>] (__get_vm_area_node+0xac/0x1f8) from [<c00f276c>] (__vmalloc_node+0x70/0xa8)
    [   39.204864] [<c00f276c>] (__vmalloc_node+0x70/0xa8) from [<c00f28c0>] (vmalloc+0x24/0x2c)
    [   39.213775] [<c00f28c0>] (vmalloc+0x24/0x2c) from [<bf02aa8c>] (MemoryOS_alloc+0xc0/0x1a4 [syslink])
    [   39.224060] [<bf02aa8c>] (MemoryOS_alloc+0xc0/0x1a4 [syslink]) from [<bf01f970>] (Memory_alloc+0x68/0x154 [syslink])
    [   39.235717] [<bf01f970>] (Memory_alloc+0x68/0x154 [syslink]) from [<bf020408>] (GateMutex_create+0x1c/0x90 [syslink])
    [   39.247528] [<bf020408>] (GateMutex_create+0x1c/0x90 [syslink]) from [<bf043268>] (GateMP_setup+0xd8/0x3b4 [syslink])
    [   39.259368] [<bf043268>] (GateMP_setup+0xd8/0x3b4 [syslink]) from [<bf018118>] (Platform_setup+0x188/0x5b8 [syslink])
    [   39.271179] [<bf018118>] (Platform_setup+0x188/0x5b8 [syslink]) from [<bf043898>] (Ipc_setup+0xa0/0x158 [syslink])
    [   39.282684] [<bf043898>] (Ipc_setup+0xa0/0x158 [syslink]) from [<bf1134d8>] (KnlUtilsDrv_initializeModule+0x4d8/0x568 [syslink])
    [   39.295074] [<bf1134d8>] (KnlUtilsDrv_initializeModule+0x4d8/0x568 [syslink]) from [<c003a3b8>] (do_one_initcall+0xc8/0x1a0)
    [   39.306823] [<c003a3b8>] (do_one_initcall+0xc8/0x1a0) from [<c00ab434>] (sys_init_module+0x90/0x1b0)
    [   39.316406] [<c00ab434>] (sys_init_module+0x90/0x1b0) from [<c0044540>] (ret_fast_syscall+0x0/0x3c)

    when i tried to run samples i'm getting following message.

    [root@VRINDA-OBBC messageq]# ./messageqapp_release 1 DSP ./messageq_omap3530_dsp.x64P

    MessageQApp sample application
    Entered MessageQApp_startup
    Loa[  120.398803] *** _OMAP3530_halMmuEnable: iommu_get failed!
    [  120.398803]  Error [0x86a85003] at Line no: 375 in file /home/eswar/vtobbc/syslink/ti/syslink_2_10_01_15/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/family/hlos/knl/omc
    ding and startin[  120.426666] *** OMAP3530_halMmuCtrl: Failed to configure DSP MMUat _OMAP3530_halMmuEnable
    [  120.426666]  Error [0x86a85003] at Line no: 184 in file /home/eswar/vtobbc/syslink/ti/syslink_2_10_01_15/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/family/hlos/knl/omc
    g procId [0] wit[  120.458496] *** OMAP3530PROC_attach: Failed to enable the slave MMU
    [  120.458496]  Error [0x86a85003] at Line no: 1091 in file /home/eswar/vtobbc/syslink/ti/syslink_2_10_01_15/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/family/hlos/knl/oc
    h [./messageq_om[  120.487518] *** Processor_attach: Failed to attach to the specific Processor!
    [  120.487548]  Error [0x86a85003] at Line no: 121 in file /home/eswar/vtobbc/syslink/ti/syslink_2_10_01_15/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/procMgr/common/Proc
    ap3530_dsp.x64P][  120.515075] *** ProcMgr_attach: Processor_attach failed!
    [  120.515075]  Error [0x86a85003] at Line no: 986 in file /home/eswar/vtobbc/syslink/ti/syslink_2_10_01_15/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/procMgr/common/Proc

    [  120.540557] *** ProcMgrDrv_ioctl: Kernel-side ProcMgr_attach failed
    [  120.540588]  Error [0x86a85003] at Line no: 925 in file /home/eswar/vtobbc/syslink/ti/syslink_2_10_01_15/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/procMgr/hlos/knl/Lc
    ProcMgr_attach failed [0x86a85003]
    SlaveLoader_startup status [-2035789821]
    Leaving MessageQApp_startup 86a85003



    after searched i found this thread. i'm using 2.6.37 kernel. so i think iva2 patch is already applied.
    So, can anyone please help to solve .