Robert,

The actual memory on your board will be much more. We only put in
information for the memory needed by DSPLink. So your DDR memory segment
size can actually be increased to accommodate the extra size.

For example:
Assume that you have 256 MB on your board. You want to split this as:

ARM: 64MB (4000000), 
DSP: 192MB (C000000)

Now, you do the following:
1. Specify mem=64M on your Linux bootargs. This means you are saying
that Linux (ARM) will use only the first 64MB. The last 196MB will be
used by DSP & shared memory.

2. The last address is 0x8FFFFFFF. So if the last 192MB is for DSP, you
need to start DSP & shared memory space at: (0x90000000 - C000000 =
84000000).
So your configuration will be:
    {
        0,                     /* ENTRY          : Entry number */
        "DSPLINKMEM",          /* NAME           : Name of the memory
region */
        0x84000000,            /* ADDRPHYS       : Physical address */
        0x84000000,            /* ADDRDSPVIRT    : DSP virtual address
*/
        (Uint32) -1,           /* ADDRGPPVIRT    : GPP virtual address
(if known) */
        0x5000,                /* SIZE           : Size of the memory
region */
        TRUE                   /* SHARED         : Shared access memory?
*/
    },
    {
        1,                     /* ENTRY          : Entry number */
        "DSPLINKMEM1",         /* NAME           : Name of the memory
region */
        0x84005000,            /* ADDRPHYS       : Physical address */
        0x84005000,            /* ADDRDSPVIRT    : DSP virtual address
*/
        (Uint32) -1,           /* ADDRGPPVIRT    : GPP virtual address
(if known) */
        0xFB000,               /* SIZE           : Size of the memory
region */
        TRUE                   /* SHARED         : Shared access memory?
*/
    },
    {
        2,                     /* ENTRY          : Entry number */
        "RESETCTRL",           /* NAME           : Name of the memory
region */
        0x84100000,            /* ADDRPHYS       : Physical address */
        0x84100000,            /* ADDRDSPVIRT    : DSP virtual address
*/
        (Uint32) -1,           /* ADDRGPPVIRT    : GPP virtual address
(if known) */
        0x00000080,            /* SIZE           : Size of the memory
region */
        FALSE                  /* SHARED         : Shared access memory?
*/
    },
    {
        3,                     /* ENTRY          : Entry number */
        "DDR",                 /* NAME           : Name of the memory
region */
        0x84100080,            /* ADDRPHYS       : Physical address */
        0x84100080,            /* ADDRDSPVIRT    : DSP virtual address
*/
        (Uint32) -1,           /* ADDRGPPVIRT    : GPP virtual address
(if known) */
        0xBEFFF80,             /* SIZE           : Size of the memory
region */
        FALSE                  /* SHARED         : Shared access memory?
*/
    },

So you have reserved almost 191MB for DSP-side and 1MB for (DSPLINKMEM &
DSPLINKMEM1) shared memory.

3. Correspondingly, DSP-side TCF file would have:
/*
========================================================================
====
 *  MEM : DSPLINKMEM
 *
========================================================================
====
 */
var DSPLINKMEM = prog.module("MEM").create("DSPLINKMEM");
DSPLINKMEM.base             = 0x84000000;
DSPLINKMEM.len              = 0x100000;
DSPLINKMEM.createHeap       = false;
DSPLINKMEM.comment          = "DSPLINKMEM";

/*
========================================================================
====
 *  MEM : RESET_VECTOR
 *
========================================================================
====
 */
var RESET_VECTOR = prog.module("MEM").create("RESET_VECTOR");
RESET_VECTOR.base        = 0x84100000;
RESET_VECTOR.len         = 0x00000080;
RESET_VECTOR.space       = "code/data";
RESET_VECTOR.createHeap  = false;
RESET_VECTOR.comment     = "RESET_VECTOR";

/*
========================================================================
====
 *  MEM : DDR
 *
========================================================================
====
 */
var DDR = prog.module("MEM").create("DDR");
DDR.base             = 0x84100080;
DDR.len              = 0x0BEFFF80;
DDR.space            = "code/data";
DDR.createHeap       = true;
DDR.heapSize         = 0x10000;
DDR.comment          = "DDR";

4. You can even split up DDR into two or more memory segments on
DSP-side if it makes more sense.

5. You can now increase your heap size to whatever you need (keep in
mind DSP/BIOS restrictions on heap size, if any).

6. Ensure that you also change the MAR settings for DSP cache to match
the new DSP memory map.
prog.module("GBL").C64PLUSMAR128to159 = 0x00008000 ;
For this, refer to SPRU871.pdf for MAR address ranges and DSP/BIOS
documentation for syntax for the settings.

Regards,
Mugdha

-----Original Message-----
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
.com] On Behalf Of Robert W. Kuhn
Sent: Friday, February 15, 2008 12:34 PM
To: davinci-linux-open-source@linux.davincidsp.com
Subject: Re: DSP-Heap

Am Thu, 14 Feb 2008 20:51:20 +0530 schrieb Kamoolkar, Mugdha:

> Yes, I meant that you need to refer to DSP/BIOS documentation on how 
> to create heaps (syntax) within BIOS. The memory to be reserved is 
> through TCF of course. Free memory and base address is configurable by

> you through the steps that I had mentioned in the earlier e-mail for 
> adding READMEM & WRITEMEM segments.

Yes, thats clear. But my problem is: what are the addresses I can use? 
My 6446 has 256MB RAM. Linux is using 118MB. 256-118=138MB. This is the
memory map from readwrite.tcf:

                base            len     length (kByte)
ARM             10008000        4000    16,00
CACHE_L1D       11f10000        8000    32,00
CACHE_L1P       11e08000        8000    32,00
CACHE_L2        11808000        8000    32,00
DDR             8ff00080        fff80   1023,88
DSPLINKMEM      8fe00000        100000  1024,00
IRAM            11800000        8000    32,00
L1DSRAM         11f04000        c000    48,00
READMEM         8fd00000        100000  1024,00
RESET_VECTOR    8ff00000        80      0,13
WRITEMEM        8fc00000        100000  1024,00
                                        -------
                                        43MB
                                        
138-43=95. So where are the 95MB? Can I use them for heap?


Bye - Robert

_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to