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.

OMAPL138 CMEM parameters not followed for Heap

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

Hello,

This is happening on the OMAPL138 SOM from LogicPD.  Part number = OMAP-L138 SOM-M1

When passing the parameters for the CMEM, it does not follow the parameters set for the heap.  The remaining parameters are followed.  It always places the heap buffer at 0xC300 0000.  But we want it at 0xC700 0000, which is in the parameters we set for the CMEM.   

 

Is this hard coded?  What is the work around for this?

Thanks.

 

  • This sounds like a software question.  Are you using an OS?

  • We are the originators of this question. Yes, we are using Linux.

  • Ok.  I'll move this over to the Linux forum where they have more experience with configuring the resources.

  • It sounds like you're a little confused as to how CMEM configuration is specified.  Using the 'insmod' or 'modprobe' command, you specify the complete CMEM block (or blocks) using 'phys_start/phys_end' as well as the 'pools" for pool-based allocations.  In CMEM there are pools and the heap.  The heap is not specified at all, since it is comprised of all the remaining physical memory *after* the pools are carved out.

    CMEM carves out the pools starting at the top (phys_end) and works its way down until all the pools have been satisfied.  Whatever is left over is for the heap, and it will *always* start at 'phys_start' and end just below the last pool's start address.  So, if you want a heap to start at 0xC7000000 you need to specify 'phys_start' as 0xC7000000.  CMEM supports multiple blocks being specified, so perhaps your single block can be turned into two adjacent blocks, with one block for your heap allocations and another for your pool allocations.  If you do split into multiple blocks then you would need to use the "blockid" based versions of CMEM APIs (e.g., CMEM_alloc2(blockId, size, align)).  Please see the CMEM cdocs in the product, or take a look in <linuxutils>/ti/sdo/linuxutils/cmem/src/interface/cmem.h for further documentation.

    Perhaps you could illustrate how you want to configure CMEM's memory block, and I will let you know if that particular "geometry" is achievable with CMEM.

    Regards,

    - Rob