I forgot to also say that BIOS's KOV (Kernel Object Viewer) is a great
way see stack usage.
 
Regards,
 
- Rob


________________________________

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Tivy, Robert
        Sent: Thursday, January 31, 2008 3:57 PM
        To: Joshua Hintze; Sam Hague (shague); Ring, Chris;
[email protected]
        Subject: RE: Codec Engine hangs when tracing is enabled
        
        
        The config var prog.module("MEM").STACKSIZE controls the startup
and interrupt stack (for HWI & SWI usage).  Each TSK has its own stack,
whose size is controlled by a different means.  From a DSP-only
perspective, you would need to rebuild the DSP code to effect this
change, but there may be a way for CE to specify the size of
dynamically-created TSKs that it creates (I'm still learning CE so I'm
not sure).
         
        Short of adding run-time calls to the DSP app to determine stack
usage, you can inspect the DSP's memory.  Each stack starts by getting
"stamped" with a magic value, so you can inspect each stack to see if
there are any of these magic values at the very top of the stack (base
address of the stack block on a C6x).  If a stack is overflowing there
will be very few (if any) stackstamp values at the ultimate "top".  Look
for the value TRG_STACKSTAMP in BIOS's trg.h to find out the magic value
(0xBE on a C6x).  The interrupt stack gets stamped with a different
value than TSK stacks (0x00C0FFEE on C6x).  Let me know if you need more
info on finding each TSK's stack (or the system stack for startup and
interrupts).
         
        Each TSK can specify its own stack size, or it can inherit the
default.  For TSKs, the default is set with:
            prog.module("TSK").STACKSIZE = 0x1000;
         
        Regards,
         
        - Rob


________________________________

                From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Joshua Hintze
                Sent: Thursday, January 31, 2008 10:38 AM
                To: 'Sam Hague (shague)'; Ring, Chris;
[email protected]
                Subject: RE: Codec Engine hangs when tracing is enabled
                
                

                 

                >>I see this wiki,
http://wiki.davincidsp.com/index.php?title=DDRALGHEAP. This looks like
the best I can do from the Arm side.

                 

                The wiki only describes a method for determining how
much of the DDRALGHEAP is being used. This is the location where the
codecs will malloc up memory if setup properly in the .tcf file. The
stack I believe is placed in the DDR (DDR2 in new CE). I'm not sure how
to tell during runtime how big it has grown.

                 

                The line in the .tcf file you might have to modify is

                 

                /*
========================================================================
===

                 *  MEM : startup and SWI stack size

                 *
========================================================================
===

                 */

                prog.module("MEM").STACKSIZE = 0x1000;

                 

                 

                Also I'm pretty new to all this stuff so I might be
wrong in any of what I am saying. Hopefully somebody will correct me if
I am wrong.

                 

                Josh

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to