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.

Regarding cmem module insert error for dra7xx-evm



Hello,

We are working on dra7xx-evm(OMAP5777)  board. Here we are using these things:

1.  linux-3.12.25  kernel

2. Toolchain- gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux.

3. Filesystem- arago-glsdk-multimedia-image-dra7xx-evm.

4. glsdk_6.10.00.02

5.linuxutils_4_00_01_08(cmem )

We are trying to insert cmem kernel module. For this we have done the following change in the linux kernel source code.

In linux/arch/arm/mach-omap2/common.c

We have modified two lines to accommodate our cmem space.

#define DRA7_PHYS_ADDR_CMEM_BASE        (0xC5FFF000)
#define DRA7_CMEM_SIZE                                  (50*SZ_4M)

From the linux kernel  system.map file , we have verified that  0xC5FFF000 is falling  outside the kernel memory allocation .

After that we are trying to insert our cmem module with the modified kernel as follow:

insmod cmemk.ko  phys_start=0xC5FFF000 phys_end=0xC69FF000 

But it is given the following error:

root@dra7xx-evm:~# insmod cmemk.ko phys_start=0xC5FFF000 phys_end=0xCC3FF000

[ 37.381990] CMEMK module: built on Dec 2 2014 at 19:33:49

[ 37.387977] Reference Linux version 3.12.25

[ 37.392575] File /home/mistral/ti-glsdk_dra7xx-evm_6_10_00_02/component-sources/linuxutils_4_00_01_08/src/cmem/module/cmemk.c

[ 37.405030] CMEMK Error: CMEM phys_start (0xc5fff000) overlaps kernel (0x80000000 -> 0xd3600000)

insmod: ERROR: could not insert module cmemk.ko: Invalid parameters

 

For the previous glsdk (glsdk_6.04.00.02) with linux 3.8  and cmem(linuxutils_4_00_00_06), the same command was working fine, i.e allocating the require memory space.

 

Please help in this regard.

 

Regads

Naveen

 



  • Hi Naveen,

    As shown by this message, you're  making cmem to use physical memory starting at 0xC5FFF000 (phys_start=0xC5FFF000), but the kernel probably already owns this memor, you can  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 0xC5FFF000 you would want something like:
        u-boot-prompt# setenv bootargs 'console=... mem=<size>M@0x80000000 mem=<size>M@0xCC3FF000'
    This would grant memory to the kernel from 0x80000000 -> 0xC5FFF000 and 0xCC3FF000 -> 0xd3600000, allowing CMEM to use 0xC5FFF000 -> 0xCC3FF000.

    *<size> - the calculated size in MB

    Regards,

    Boyko