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.

question about bootargs

I have a question about linux mem.

I set the linux mem is 300M, the bootargs like this:

but When I do this ./loadmodules.sh:It failed.

the loadModules.sh is like this:

I don't know Why linux used the other 58M memory.

I also set the bootargs 364M instead of 300M, and set the loadmodules phys_start = 0x96c00000, there have the same error.

Please help !

  • I am sorry, the pic down't show.

    first cmdlice:
    console=ttyO2,115200n8 notifyk.vpssm3_sva=0xBF900000 rootwait root=ubi0:rootfs ubi.mtd=3 rootfstype=ubifs rw mem=300M@0x80000000 mem=128M@0x9FC00000 vmalloc=500M earlyprink vram=70M ti816xfb.vram=0:16M,1:16M,2:6M ip=off noinitrd user_debug=31

    root@dm816x-evm:~# ./loadmodules.sh
    insmod: error inserting 'syslink.ko': -1 File exists
    CMEMK module: built on Jan 29 2013 at 09:28:05
    Reference Linux version 2.6.37
    File /usr/local/ezsdk/5_05/component-sources/linuxutils_3_22_00_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
    CMEMK Error: CMEM phys_start (0x92c00000) overlaps kernel (0x80000000 -> 0x92C00000)
    insmod: error inserting 'cmemk.ko': -1 Invalid parameters

    root@dm816x-evm:~# cat loadmodules.sh
    #!/bin/sh
    #
    # Copyright (c) 2009, Texas Instruments Incorporated
    # All rights reserved.
    #
    # Redistribution and use in source and binary forms, with or without
    # modification, are permitted provided that the following conditions
    # are met:
    #
    # * Redistributions of source code must retain the above copyright
    # notice, this list of conditions and the following disclaimer.
    #
    # * Redistributions in binary form must reproduce the above copyright
    # notice, this list of conditions and the following disclaimer in the
    # documentation and/or other materials provided with the distribution.
    #
    # * Neither the name of Texas Instruments Incorporated nor the names of
    # its contributors may be used to endorse or promote products derived
    # from this software without specific prior written permission.
    #
    # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    #firmware_loader 0 dm81xx_c6xdsp_debug.xe674 stop
    #
    # Assumed Memory Map
    #
    # Start Addr Size Description
    # -------------------------------------------
    # 0x40200000 60 KB CMEM (internal memory, see comment below)
    # 0x80000000 128 MB Linux
    # 0x88000000 16 MB CMEM (external memory)
    # 0x8B000000 24 MB DDR3_DSP (BIOS, Codecs, Applications)
    # 0x8C800000 8 MB DDRALGHEAP (for C674 DSP)
    # 0x8D000000 12 MB DDR3_SR1 (Ipc)
    # 0x8DC00000 2 MB DDR3_HDVPSS (M3)
    # 0x8DE00000 2 MB DDR3_V4L2
    # 0x8E000000 16 MB DDR3_SR0 (SysLink)
    # 0x8F000000 8 MB DDR3_M3 (BIOS, Codecs, Applications)
    # 0x8F800000 8 MB DDRALGHEAP (for Ducati M3s)


    # insert CMEM driver, using one block of memory
    #
    # Note: phys_end = (addr + 1)
    #
    # block 0: 0xa0000000 - 0xa07fffff (8 MB)
    # pool: 80 KB, 20 x 4 KB buffers
    # pool: 1280 KB, 10 x 128 KB buffers
    # pool: 2048 KB, 2 x 1 MB buffers
    # heap: 4784 KB, (~4.67 MB)
    #
    CMEM_MODPARAMS="phys_start=0x92c00000 phys_end=0x93ffffff pools=20x4096,10x131072,2x1048576"

    # insert CMEM driver, using two blocks of memory
    #
    # To use this command, the kernel must be configured such that it does not
    # use the internal memory located at 0x40200000 - 0x4020EFFF.
    #
    # block 1: 0x40200000 - 0x4020EFFF (60 KB), Internal Memory
    # pool: 60 KB, 15 x 4 KB buffers (4 KB minimum size buffer allowed)
    #
    #CMEM_MODPARAMS="$CMEM_MODPARAMS phys_start_1=0x40200000 phys_end_1=0x4020F000 pools_1=15x4096 allowOverlap=1"

    # For now, syslink.ko must be 'insmod'ed first so that the device major number
    # matches with the hard-coded /dev/syslinkipc entries
    if [ -e syslink.ko ]
    then
    insmod syslink.ko TRACE=0 TRACEFAILURE=1 TRACEENTER=1
    else
    modprobe syslink TRACE=0 TRACEFAILURE=1 TRACEENTER=1
    fi

    if [ -e /dev/syslinkipc ]
    then
    for dev in `ls /dev/syslinkipc`; do
    chmod 666 /dev/syslinkipc/$dev
    done
    fi

    if [ -e cmemk.ko ]
    then
    insmod cmemk.ko $CMEM_MODPARAMS
    else
    modprobe cmemk $CMEM_MODPARAMS
    fi

    # Allow cmem driver to be used by all users
    if [ -e /dev/cmem ]
    then
    chmod 666 /dev/cmem
    fi
  • Are you using EZSDK or DVR RDK?

    See if the below e2e thread will be in help:
    e2e.ti.com/.../397771

    Regards,
    Pavel
  • I use the ezsdk.the version is 5.05.02.00
  • Are you using 1GByte DDR3 memory?

    Regards,
    Pavel
  • yes.I use that 1G DDR3 memory.
    I see the link. this may not answer my question.
    I use top cmd, it shows that :
    Mem: 99524K used, 134468K free, 0K shrd, 1028K buff, 30024K cached
    so 300-240=50M.
    but that linux must not to cross addr from 0x80000000 to 0x82c00000.
  • Jun,

    If you need to run the Codec Engine, you should set the linux memory to 169M. See the below instructions:

    ti-ezsdk_dm816x-evm_5_05_02_00/docs/DM816x_EZ_Software_Developers_Guide.pdf
    3.3 Running the Codec Engine examples

    Regards,
    Pavel
  • When I set the linux mem to 169M as below, I am able to insert syslink and cmem modules successful.

    Kernel command line: console=ttyO2,115200n8 rootwait root=/dev/mmcblk0p2 rw mem=169M@0x80000000 vmalloc=500M notifyk.vpssm3_sva=0xBF900000 ip=off noinitrd

    root@dm816x-evm:/usr/share/ti/ti-codec-engine-examples# modprobe syslink
    SysLink version : 2.20.02.20
    SysLink module created on Date:Dec 26 2012 Time:11:03:34
    root@dm816x-evm:/usr/share/ti/ti-codec-engine-examples# modprobe cmemk phys_start=0x94000000 phys_end=0x947fffff pools=20x4096,10x131072,2x1048576
    CMEMK module: built on Dec 26 2012 at 11:23:47
    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 0xd1000000 of size 0x4ac000
    cmemk initialized