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.

Drive memory overlap with Kernel

Hi,

I am new to Linux. I have a driver that works for OMAP35x EVM and I needed to port it to Torpedo SOM. Under Torpedo SOM kernel, when I run insmod, I got that the driver memory overlap with the kernel. the driver (not developped by us), use the fixed memory location and passed them in by module_param(). I am wondering whether I can find out (1) can I dynamic find the available physical address by the module and lock it for my module use (instead of passing in to the module)  (2) how to find which physical addresses are avaiable from a running kernel? Thanks.

 

Annie

 

 

 

  • I assume you're talking about CMEM from Linux Utils (since it does have "overlaps kernel" diagnostic message).  If so...

    The CMEM memory needs to be completely separate from the Linux kernel memory.  The "overlaps kernel" message is typically displayed when running loadmodules.sh on a DM365/DM368 board, but in actuality it doesn't really overlap the kernel memory.  The reason the message is displayed is because the overlap check is crude and only checks that the CMEM memory is beyond (after) the kernel memory.  In the case of DM365/DM368 a 2nd CMEM block is configured at 0x00001000 -> 0x00008000, and since this is not *after* kernel memory, the message is displayed.

    On most TI-processor based boards, CMEM and Linux both use the DDR2 memory banks, which start at address 0x80000000.  The Linux kernel bootargs variable specifies how much of the DDR2 memory to use, and a start address of 0x80000000 is assumed.  So, if you say "mem=80M" in the bootargs, that implies the Linux kernel owns memory from 0x80000000 -> 0x85000000 (80 MB total).  CMEM can then safely be placed starting at 0x85000000.  CMEM memory is specified on the "insmod cmemk.ko ..." command line in loadmodules.sh.  But embedded systems often have other explicit memory assignments for the memory that lies outside of the Linux kernel's ownership, so the CMEM memory placement needs to take into account the memory placement needs.

    Regards,

    - Rob