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.

Loading of the cmemk.ko module failed

Other Parts Discussed in Thread: DM3730

Hi,

I have used the DM3730 EVM with DVSDK v4.03.00.06 but the loading of the
cmemk.ko module failed.
Is there any way to load it correctly?

# /etc/init.d/loadmodule-rc start
[ 125.184478] CMEMK module: built on Dec 22 2011 at 23:52:43
[ 125.190307] Reference Linux version 2.6.37
[ 125.194763] File /datalocal/DVSDK43_HPDL380G7/arago-tmp/work/dm37x-evm-arago-linux-gnueabi/ti-linuxutils-1_2_26_02_05-r102d/linuxutils_2_26_02_05/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
[ 125.213562] CMEM Range Overlaps Kernel Physical - allowing overlap
[ 125.220062] CMEM phys_start (0x83700000) overlaps kernel (0x80000000 -> 0x8fc00000)
[ 125.228088] CMEMK Error: Failed to request_mem_region(0x83700000, 35651584)
FATAL: Error inserting cmemk (/lib/modules/2.6.37/kernel/drivers/dsp/cmemk.ko): Bad address
numid=49,iface=MIXER,name='HeadsetL Mixer AudioL1'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=46,iface=MIXER,name='HeadsetR Mixer AudioR1'
; type=BOOLEAN,access=rw------,values=1
: values=on
Simple mixer control 'Headset',0
Capabilities: pvolume penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 3
Mono:
Front Left: Playback 2 [67%] [0.00dB]
Front Right: Playback 2 [67%] [0.00dB]# /etc/init.d/loadmodule-rc start
[ 125.184478] CMEMK module: built on Dec 22 2011 at 23:52:43
[ 125.190307] Reference Linux version 2.6.37
[ 125.194763] File /datalocal/DVSDK43_HPDL380G7/arago-tmp/work/dm37x-evm-arago-linux-gnueabi/ti-linuxutils-1_2_26_02_05-r102d/linuxutils_2_26_02_05/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
[ 125.213562] CMEM Range Overlaps Kernel Physical - allowing overlap
[ 125.220062] CMEM phys_start (0x83700000) overlaps kernel (0x80000000 -> 0x8fc00000)
[ 125.228088] CMEMK Error: Failed to request_mem_region(0x83700000, 35651584)
FATAL: Error inserting cmemk (/lib/modules/2.6.37/kernel/drivers/dsp/cmemk.ko): Bad address
numid=49,iface=MIXER,name='HeadsetL Mixer AudioL1'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=46,iface=MIXER,name='HeadsetR Mixer AudioR1'
; type=BOOLEAN,access=rw------,values=1
: values=on
Simple mixer control 'Headset',0
Capabilities: pvolume penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 3
Mono:
Front Left: Playback 2 [67%] [0.00dB]
Front Right: Playback 2 [67%] [0.00dB]

  • Kenji Kondoh said:
    [ 125.213562] CMEM Range Overlaps Kernel Physical - allowing overlap
    [ 125.220062] CMEM phys_start (0x83700000) overlaps kernel (0x80000000 -> 0x8fc00000)

    As shown by this message, you're insmod'ing (or modprobe'ing) cmemk.ko to use physical memory starting at 0x83700000 (phys_start=0x83700000 cmemk.ko param), but the kernel already owns this memory, hence the failed request_mem_region().  You need to either:
        - prevent the Linux kernel from "owning" that memory, or
        - move cmemk.ko's phys_start/end away from kernel memory.

    It's possible to "punch" a hole in kernel memory with 2 "mem=" specifications in the Linux bootargs variable.  If you'd like to keep CMEM's memory starting at 0x83700000 you would want something like:
        u-boot-prompt# setenv bootargs 'console=... mem=55M@0x80000000 mem=163M@0x85900000'
    This would grant memory to the kernel from 0x80000000 -> 0x83700000 and 0x85900000 -> 0x8fc00000, allowing CMEM to use 0x83700000 -> 0x85900000.

    Since cmemk.ko reports your kernel memory being 0x80000000 -> 0x8fc00000 you probably have mem=252M in your bootargs.  If you'd like your 34 MB of CMEM memory to come after the kernel, you would use mem=218M with bootargs and have cmemk.ko's phys_start=0x8da00000 (and phys_end=0x8fc00000).

    Regards,

    - Rob