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.

Can't run video_copy on DM8168

I'm using a DM8168 with EZSDK 5.04.00.011 and I can't get the video_copy example to run. The version of Codec Engine is 3.22.01.06.

# insmod cmemk.ko phys_start=0xa0000000 phys_end=0xa07fffff  pools=20x4096,10x131072,2x1048576

CMEMK module: built on Apr 29 2012 at 20:45:57
  Reference Linux version 2.6.37
  File /swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm-none-linux-gnueabi/ti-linuxutils-1_3_22_00_02-r4d/linuxutils_3_22_00_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
allocated heap buffer 0xd8000000 of size 0x4ac000
cmemk initialized

root@dm816x-evm:/# CE_DEBUG=3 ./app_remote.xv5T -p DSP -s xe674

[t=0x00000173] [tid=0x4006b000] ti.sdo.ce.osal.Global: [+E] Global_init> Enter
[t=0x00000281] [tid=0x4006b000] ti.sdo.ce.osal.Global: [+4] Global_init> This program was built with the following packages:
[t=0x000002b7] [tid=0x4006b000] ti.sdo.ce.osal.Global: [+4]     package gnu.targets (/home/song/ti-ezsdk_dm816x-evm_5_04_00_11/component-sources/xdctools_3_23_01_43/packages/gnu/targets/) [1, 0, 1
..................

[t=0x0019c9b8] [tid=0x4006b000] ti.sdo.ce.Server: [+E] Server_init()
[t=0x001ee9d3] [tid=0x4006b000] ti.sdo.ce.Server: [+E] Server_init> Global_useLinkArbiter = 0
[t=0x001eea09] [tid=0x4006b000] ti.sdo.ce.osal.Global: [+E] Global_atexit> Enter (fxn=0x26b9c)
[t=0x001eea4a] [tid=0x4006b000] xdc.runtime.Main: [+2] main> ti.sdo.ce.examples.apps.video_copy
[t=0x001ef24c] [tid=0x4006b000] xdc.runtime.Main: [+1] App-> Application started, procId DSP engineName remote_copy_DSP input-file ./in.dat output-file ./out.dat.
[t=0x001ef2e4] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+E] Memory_alloc> Enter(0x400)
[t=0x001ef316] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+E] Memory_contigAlloc> Enter(size=0x400, align=0xffffffff, cached=FALSE, heap=FALSE)
[t=0x001ef390] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_alloc(0x400) = 0x40d4a000.
[t=0x001ef3ca] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_getPhys(0x40d4a000) = 0xa07ff000.
[t=0x001ef3fc] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> Enter(virtAddr=0x40d4a000, size=0x400, physAddr=0xa07ff000)
[t=0x001ef434] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> creating new contigBuf object
[t=0x001ef466] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> returning: cb->phys=0xa07ff000, cb->size=0x400, cb->virt=0x40d4a000
[t=0x001ef4a0] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+X] Memory_contigAlloc> return (0x40d4a000)
[t=0x001ef4f3] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0x40d4a000)
[t=0x001ef51b] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+E] Memory_alloc> Enter(0x400)
[t=0x001ef540] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+E] Memory_contigAlloc> Enter(size=0x400, align=0xffffffff, cached=FALSE, heap=FALSE)
[t=0x001ef58a] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_alloc(0x400) = 0x40d78000.
[t=0x001ef5c0] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_getPhys(0x40d78000) = 0xa07fe000.
[t=0x001ef5f1] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> Enter(virtAddr=0x40d78000, size=0x400, physAddr=0xa07fe000)
[t=0x001ef629] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> creating new contigBuf object
[t=0x001ef656] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> returning: cb->phys=0xa07fe000, cb->size=0x400, cb->virt=0x40d78000
[t=0x001ef68f] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+X] Memory_contigAlloc> return (0x40d78000)
[t=0x001ef6b8] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0x40d78000)
[t=0x001ef6df] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+E] Memory_alloc> Enter(0x400)
[t=0x001ef704] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+E] Memory_contigAlloc> Enter(size=0x400, align=0xffffffff, cached=FALSE, heap=FALSE)
[t=0x001ef74a] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_alloc(0x400) = 0x40d8c000.
[t=0x001ef77e] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_getPhys(0x40d8c000) = 0xa07fd000.
[t=0x001ef7ae] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> Enter(virtAddr=0x40d8c000, size=0x400, physAddr=0xa07fd000)
[t=0x001ef7e4] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> creating new contigBuf object
[t=0x001ef812] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> returning: cb->phys=0xa07fd000, cb->size=0x400, cb->virt=0x40d8c000
[t=0x001ef84c] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+X] Memory_contigAlloc> return (0x40d8c000)
[t=0x001ef875] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0x40d8c000)
[t=0x00242488] [tid=0x4006b000] ti.sdo.ce.Engine: [+E] Engine_open> Enter('remote_copy_DSP', 0xbe9babb4, 0xbe9bab34)
[t=0x002424cc] [tid=0x4006b000] ti.sdo.ce.Engine: [+1] Engine_open> desc->memMap [0x0], desc->useExtLoader [0]
[t=0x002424fe] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+E] Memory_alloc> Enter(0x40)
[t=0x00242527] [tid=0x4006b000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0xc1a48)
[t=0x00242550] [tid=0x4006b000] ti.sdo.ce.Engine: [+E] rmsInit> Enter(engine=0xc1a48, ec=0xbe9bab34)
[t=0x0024257b] [tid=0x4006b000] ti.sdo.ce.Engine: [+E] rmsInit> engine->desc = 0xc1660
[t=0x002425a1] [tid=0x4006b000] ti.sdo.ce.Engine: [+E] rmsInit> engine->desc->algTab = 0x9243c
[t=0x002425cb] [tid=0x4006b000] ti.sdo.ce.Engine: [+E] rmsInit> found remote alg viddec_copy
[t=0x002425f1] [tid=0x4006b000] ti.sdo.ce.Engine: [+E] rmsInit> engine has server!
[t=0x00242615] [tid=0x4006b000] ti.sdo.ce.Engine: [+E] rmsInit> engine->procId = DSP
[t=0x00242652] [tid=0x4006b000] ti.sdo.ce.Engine: [+E] rmsInit> engine->coreId = 0
[t=0x0024267a] [tid=0x4006b000] ti.sdo.ce.Engine: [+E] rserverOpen('all_DSP.xe674'), count = 0
[t=0x002426a2] [tid=0x4006b000] ti.sdo.ce.Engine: [+E] rserverOpen >, memMap = 0x0, useExtLoader = 0
[t=0x002426ce] [tid=0x4006b000] ti.sdo.ce.ipc.Processor: [+E] Processor_create> Enter(imageName='all_DSP.xe674', memMap='(null)', attrs=0xbe9bab20)
[t=0x00242a61] [BUG: Your driver calls ioremap() on system memory.  This leads
to architecturally unpredictable behaviour on ARMv6+, and ioremap()
will fail in the next kernel release.  Please fix your driver.
tid=0x4006b000] ------------[ cut here ]------------
ti.sdo.ce.osal.MWARNING: at arch/arm/mm/ioremap.c:211 __arm_ioremap_pfn_caller+0x58/0x190()
emory: [+E] Memo<8>Modules linked in:ry_alloc> Enter( cmemk0x3c)
[t=0x0024 ti81xxhdmi2a97] [tid=0x400 ti81xxfb6b000] ti.sdo.ce vpss.osal.Memory: [+ syslinkX] Memory_alloc> ipv6 return (0xc1a90<8>Backtrace: )
[t=0x00242ac7<8> r7:00000000] [tid=0x4006b00 r6:c004b0540] ti.sdo.ce.ipc r5:c03cd232.Processor: [+E] r4:000000d3 doCmd> Enter (c<8> r9:00000002mdId=1, proc=0xc r8:000000001a90)
[t=0x0024 r7:bf07f1882b20] [tid=0x40d r6:0008b00015490] ti.sdo.ce r5:00081e60.ipc.Processor: <8>r4:00000000[+X] getCmd_d> E<8> r6:00000000xit (result=1)
 r5:00081e60[t=0x00242b4b] [ r4:8b000000tid=0x40d15490] <8> r7:cbcebcc8ti.sdo.ce.ipc.Pr r6:00000000ocessor: [+E] Pr r5:cbcebc60ocessor_create_d r4:d0879000> Enter(proc=0xc<8> r8:d55fa0001a90)
[t=0x0024 r7:cbcebcc82b75] [tid=0x40d r6:0000000015490] ti.sdo.ce r5:06a85000.ipc.Processor:  r4:cbcebd48[+2] Processor_c<8> r8:40d14ca0reate_d> Retriev r7:00000008ing CPU ID for ' r6:00000008DSP'...
[t=0x00 r5:cb5e8000242ba6] [tid=0x4 r4:000000000d15490] ti.sdo.<8> r8:c0043fa8ce.ipc.Processor r7:00000036: [+2] Processor r6:00000000_create_d> Openi r5:00000000ng DSP ProcMgr f r4:40d14ca0or cpuId 0...
[---[ end trace d7fb6cf8af6d7663 ]---
t=0x00242f8f] [tid=0x40d15490] ti.sdo.ce.ipc.Processor: [+2] Processor_create_d> Attaching to DSP...
[t=0x00243fe8] [tid=0x40d15490] ti.sdo.ce.ipc.Processor: [+2] Processor_create_d> Loading all_DSP.xe674 on DSP (0 args)...
BUG: Your driver calls ioremap() on system memory.  This leads
to architecturally unpredictable behaviour on ARMv6+, and ioremap()
will fail in the next kernel release.  Please fix your driver.
------------[ cut here ]------------

..............

WARNING: at arch/arm/mm/ioremap.c:211 __arm_ioremap_pfn_caller+0x58/0x190()
<8>Modules linked in: cmemk ti81xxhdmi ti81xxfb vpss syslink ipv6<8>Backtrace: <8> r7:00000000 r6:c004b054 r5:c03cd232 r4:000000d3<8> r9:00000002 r8:00000000 r7:bf07f188 r6:0008c800 r5:00800000<8>r4:00000000<8> r6:00000000 r5:00800000 r4:8c800000<8> r7:cbcebcc8 r6:00000000 r5:cbcebc60 r4:d0879000<8> r8:d55fa000 r7:cbcebcc8 r6:00000000 r5:06a85000 r4:cbcebd48<8> r8:40d14ca0 r7:00000008 r6:00000008 r5:cb5e8000 r4:00000000<8> r8:c0043fa8 r7:00000036 r6:00000000 r5:00000000 r4:40d14ca0---[ end trace d7fb6cf8af6d7670 ]---
Unable to handle kernel paging request at virtual address d08f0914
pgd = cbcec000
[d08f0914] *pgd=8c805011, *pte=00000000, *ppte=00000000
Internal error: Oops: 807 [#1]
last sysfs file: /sys/module/vpss/initstate
<8>Modules linked in: cmemk ti81xxhdmi ti81xxfb vpss syslink ipv6
<8>CPU: 0    Tainted: G        W    (2.6.37 #36)
<8>PC is at emac_int_disable+0x2c/0x68
<8>LR is at emac_irq+0x38/0x9c
<8>pc : [<c024c470>]    lr : [<c024d778>]    psr: 60000193
<8>sp : cbcebbe0  ip : cbcebbf8  fp : cbcebbf4
<8>r10: d4e0e000  r9 : 00800000  r8 : d9000000
<8>r7 : 00000029  r6 : cc8ee340  r5 : 00000000  r4 : 60000193
<8>r3 : d08f0900  r2 : 00000000  r1 : cc8ee000  r0 : cc8ee340
<8>Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
<8>Control: 10c5387d  Table: 8bcec019  DAC: 00000015
Process app_remote.xv5T (pid: 1186, stack limit = 0xcbcea2e8)............

<8>[<bf05b868>] (ElfLoaderTrgWrite_copy+0x0/0x368 [syslink]) from [<bf05ef40>] (DLIF_copy+0x10/0x1c [syslink])
<8>[<bf05ef30>] (DLIF_copy+0x0/0x1c [syslink]) from [<bf05dcd4>] (DLOAD_load+0x734/0xa58 [syslink])
<8>[<bf05d5a0>] (DLOAD_load+0x0/0xa58 [syslink]) from [<bf05aa60>] (ElfLoader_load+0x268/0x36c [syslink])
<8>[<bf05a7f8>] (ElfLoader_load+0x0/0x36c [syslink]) from [<bf04b2d0>] (Loader_load+0xec/0x164 [syslink])
<8>[<bf04b1e4>] (Loader_load+0x0/0x164 [syslink]) from [<bf04f9cc>] (ProcMgr_load+0x220/0x2fc [syslink])
<8>[<bf04f7ac>] (ProcMgr_load+0x0/0x2fc [syslink]) from [<bf0519a4>] (ProcMgrDrv_ioctl+0xb98/0x1c38 [syslink])
<8>[<bf050e0c>] (ProcMgrDrv_ioctl+0x0/0x1c38 [syslink]) from [<c00cfcb8>] (vfs_ioctl+0x28/0x44)
<8> r8:40d14ca0 r7:00000008 r6:00000008 r5:cb5e8000 r4:00000000
<8>[<c00cfc90>] (vfs_ioctl+0x0/0x44) from [<c00d03c8>] (do_vfs_ioctl+0x500/0x540)
<8>[<c00cfec8>] (do_vfs_ioctl+0x0/0x540) from [<c00d0460>] (sys_ioctl+0x58/0x7c)
<8>[<c00d0408>] (sys_ioctl+0x0/0x7c) from [<c0043e00>] (ret_fast_syscall+0x0/0x30)
<8> r8:c0043fa8 r7:00000036 r6:00000000 r5:00000000 r4:40d14ca0
Code: f10c0080 f57ff04f e590304c e3a02000 (e5832014)
Unable to handle kernel NULL pointer dereference at virtual address 0000002c
pgd = cbcec000
[0000002c] *pgd=8b58a031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#2]

........................

<8>[<bf05b868>] (ElfLoaderTrgWrite_copy+0x0/0x368 [syslink]) from [<bf05ef40>] (DLIF_copy+0x10/0x1c [syslink])
<8>[<bf05ef30>] (DLIF_copy+0x0/0x1c [syslink]) from [<bf05dcd4>] (DLOAD_load+0x734/0xa58 [syslink])
<8>[<bf05d5a0>] (DLOAD_load+0x0/0xa58 [syslink]) from [<bf05aa60>] (ElfLoader_load+0x268/0x36c [syslink])
<8>[<bf05a7f8>] (ElfLoader_load+0x0/0x36c [syslink]) from [<bf04b2d0>] (Loader_load+0xec/0x164 [syslink])
<8>[<bf04b1e4>] (Loader_load+0x0/0x164 [syslink]) from [<bf04f9cc>] (ProcMgr_load+0x220/0x2fc [syslink])
<8>[<bf04f7ac>] (ProcMgr_load+0x0/0x2fc [syslink]) from [<bf0519a4>] (ProcMgrDrv_ioctl+0xb98/0x1c38 [syslink])
<8>[<bf050e0c>] (ProcMgrDrv_ioctl+0x0/0x1c38 [syslink]) from [<c00cfcb8>] (vfs_ioctl+0x28/0x44)
<8> r8:40d14ca0 r7:00000008 r6:00000008 r5:cb5e8000 r4:00000000
<8>[<c00cfc90>] (vfs_ioctl+0x0/0x44) from [<c00d03c8>] (do_vfs_ioctl+0x500/0x540)
<8>[<c00cfec8>] (do_vfs_ioctl+0x0/0x540) from [<c00d0460>] (sys_ioctl+0x58/0x7c)
<8>[<c00d0408>] (sys_ioctl+0x0/0x7c) from [<c0043e00>] (ret_fast_syscall+0x0/0x30)
<8> r8:c0043fa8 r7:00000036 r6:00000000 r5:00000000 r4:40d14ca0

and stop here.

======== products.mak ========
#

# Optional, but useful when many/all dependent components are in one folder
#
DEPOT = /home/user/ti-ezsdk_dm816x-evm_5_04_00_11/component-sources

# Define the product variables for the device you will be using.
IPC_INSTALL_DIR         = $(DEPOT)/ipc_1_24_02_27
FC_INSTALL_DIR          = $(DEPOT)/framework_components_3_22_01_07
LINK_INSTALL_DIR        = $(DEPOT)/syslink_2_10_03_20
OSAL_INSTALL_DIR        = $(DEPOT)/osal_1_22_01_09
XDAIS_INSTALL_DIR       = $(DEPOT)/xdais_7_22_00_03
CMEM_INSTALL_DIR        = $(DEPOT)/linuxutils_3_22_00_02
EDMA3_LLD_INSTALL_DIR   = $(DEPOT)/edma3_lld_02_11_02_04
XDC_INSTALL_DIR         = $(DEPOT)/xdctools_3_23_01_43
BIOS_INSTALL_DIR        = $(DEPOT)/bios_6_33_02_31

# Set location of various cgtools
ti.targets.C64P ?=
ti.targets.C674 ?=

ti.targets.elf.C64P ?=
ti.targets.elf.C64T ?=
ti.targets.elf.C66 ?=
ti.targets.elf.C674 =/home/wzy/ti-ezsdk_dm816x-evm_5_04_00_11/dsp-devkit/cgt6x_7_3_1

ti.targets.arm.elf.M3 ?=

# Note that GCC targets are 'special' and require more than one var to be set.
#
# The CGTOOLS_* var points at the base of the toolchain.
# The CC_* var points at the gcc binary (e.g. bin/arm-none-linux-gnueabi-gcc)
#
# Note, the *_V5T vars are for Linux GCC tools, the *_BNC are for Android
CGTOOLS_V5T =/home/user/CodeSourcery/cgt_a8/arm-2009q1
CC_V5T      =bin/arm-none-linux-gnueabi-gcc

................

Please could someone help?
Thanks,

Wu

  • Wu,

    Looks like you are trying to allocate memory from the kernel's memory area using ioremap. Can you share your kernel bootargs?

  • Hello

     My bootargs is 256M.

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    Linux version 2.6.37 (root@ubuntu) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #36 Wed Oct 17 20:42:31 PDT 2012
    bootconsole [earlycon0] enabled
    reserved size = 52428800 at 0x0
    FB: Reserving 52428800 bytes SDRAM for VRAM
    OMAP chip is TI8168 1.1
    Kernel command line: console=ttyO2,115200n8 rootwait rw mem=256M root=/dev/nfs nfsroot=192.168.1.48:/home/song/targetfs ip=192.168.1.21:192.168.1.43:192.168.1.43:255.255.255.0::eth0:off notifyk.vpssm3_sva=0xBF900000 earlyprintk
    PID hash table entries: 1024 (order: 0, 4096 bytes)
    Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    Memory: 206MB = 206MB total
    Memory: 203872k/203872k available, 58272k reserved, 0K highmem
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
        DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
        vmalloc : 0xd0800000 - 0xf8000000   ( 632 MB)
        lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
        pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
        modules : 0xbf000000 - 0xbfe00000   (  14 MB)
          .init : 0xc0008000 - 0xc0039000   ( 196 kB)
          .text : 0xc0039000 - 0xc0435000   (4080 kB)
          .data : 0xc0436000 - 0xc04712c0   ( 237 kB)

    Thanks,

    wu

  • Wu,

    Can you try to reduce it, say some where around 100M and see the behavior?

  • Wu,

    Also can you try to adjust the "phys_start=0xa0000000 phys_end=0xa07fffff" values? Looks like it is only 8MB memory that you've allocated for cmem.  

  • Hello Renjith

    I reduce the  bootargs to 100M and it can run well.

    Thank you very much

    wu