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.

Understanding CMEM and demo apps

Other Parts Discussed in Thread: OMAP3530

I have built and run the DVSDK demo applications, but needed to modify the CMEM settings before it would work.

The intital cmem settings were loaded from the /opt/dvsdk/loadmodules.sh file:

insmod cmemk.ko phys_start=0x85800000 phys_end=0x86800000 pools=20x4096,8x131072,5x1048576,1x1429440,1x256000,1x3600000,5x829440

 

and this allows the default demo interface and decode applications to startup and run fine.  However the audio_copy and video_copy applications produce the following error with these settings:

[root@OMAP3EVM video_copy]# ./app.out
App-> Application started.
Configuration error: Exceeded maximum number [31] of Translation  Look-aside Buf
fers.
@0x00069a07:[T:0x40964490] OP - Processor_create_d> Loading and starting DSP ser
ver 'video_copy.x64P' FAILED, status=[0x80008052] (look for error code 'DSP_EBAS
E + 0x52' in dsplink*/packages/dsplink/gpp/inc/errbase.h)
@0x00069b1a:[T:0x40964490] OP - Processor_delete_d> Closing remote transport FAI
LED, status=0x80008002.
@0x00069b57:[T:0x40964490] OP - Processor_delete_d> Stopping DSP FAILED, status=
0x80008002
@0x00069b94:[T:0x40964490] OP - Processor_delete_d> Closing pool FAILED, status=
0x80008000
@0x00069bb2:[T:0x40964490] OP - Processor_delete_d> Detaching from DSP FAILED, s
tatus=0x80008000
@0x0006df4a:[T:0x4001cfb0] CE - rserverOpen: can't start 'video_copy.x64P'; Proc
essor_create failed
CEapp-> ERROR: can't open engine video_copy
App-> Application FAILED.
[root@OMAP3EVM video_copy]#

 

So modifing the cmem to this:

insmod cmemk.ko phys_start=0x85800000 phys_end=0x86000000 pools=20x4096,10x131072,2x1048576

 

now  the video_copy app runs fine, but then produces similar Configuration buffer errors with the original interface and decode demo application.

It would appear the different applications are configured for aquiring different memory pools. And the cmem configurations are not compatilble for each of the different applications. 

So the questions I have are:

1. where is the memory configured for each of the applications?  (.tcf or .tci files)

2. How are the cmem initialization configuration related to the application configuration memory requirements?

 

Thanks for any help.

-simon

  • The following article helps describe how the system memory map is defined.  It was from a DaVinci point of view (as opposed to OMAP35x), but it should largely apply to OMAP as well.

    http://wiki.davincidsp.com/index.php/Changing_the_DVEVM_memory_map

    It is worth noting that the main difference in the CMEM definitions above is the phy_end value; I am guessing that changing CMEM size via phy_end is what is making the difference.

  • Hi Juan,

     

    This article was very helpful and I believe I now understand the the memory map configurations and why in both cases I was getting errors.  It was two different problems, that resulted in a very similar error messages.

    In the first case the video_copy and audio_copy applications could not run because the initial loadmodules.sh cmem assignments and the memory configuration in the ~\workspace\TICodecExamples\examples\ti\sdo\ce\examples\servers\all_codecs\all_evm3530.tci file overlapped.

    And in the second case the modified cmem assignments did not have enough memory blocks allocated for the decode application demo to run.

     

    So my solution, to run all the demo's with the same configuration, was to modify the cmem assignment into a lower physical memory loacation so that it maintains all the buffers required for the decode application demo and no longer overlaps with the memory map of the video_copy and audio_copy application codec configurations.

     

    my loadmodules.sh is now:


    insmod cmemk.ko phys_start=0x85000000 phys_end=0x86000000 pools=20x4096,8x131072,5x1048576,1x1429440,1x256000,1x3600000,5x829440

    # insert DSP/BIOS Link driver
    #
    insmod dsplinkk.ko

    # make /dev/dsplink
    rm -f /dev/dsplink
    mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0

    # insert Local Power Manager driver
    #
    insmod lpm_omap3530.ko

     

    and my bootargs loads the linux at 0x80000000 and limits memory to 80M.

     

  • This is great news; thank you for sharing the solution with our community.  FYI, there are lots of similarly good articles in our wiki site (good resource to keep in mind)