Memory Allocation for dm6446 (DaVinci)

Source: Internet
Author: User

I have been working for nearly one year, and it is almost New Year's Eve. I will summarize the knowledge points learned in the next year.

Enter the subject:

The dm6446 evaluation board has MB memory and is divided into 7 segments. The default memory map is as follows:

Memory Allocation and adjustment are divided into three categories.

1. Linux

Memory for arm, which is managed and used by ARM Linux, cannot be directly accessed by applications. How can I set the size? For example:
# Setenv bootargs console = ttvs0, 115200n8 noinitrd rw ip = DHCP root =/dev/nfs nfsroot = $ (nfshost): $ (rootpath), nolock mem = 120 m

2. cmem (Data Buf sharing between DSP and arm)

Cmem is a continuous physical storage space allocation module that enables the Linux Process and DSP algorithm on the arm side to directly share the buffer. When an application needs to dynamically apply for a continuous physical space in the shared buffer zone, the cmem API can be called to transfer and process data during algorithm processing. The requested space can be accessed by the DSP.

How to allocate the size? In loadmodule. Sh, specify the physical address starting from and ending with cmem when the insmod command is used to install the cmemk. Ko driver module. For example:
  • Insmod cmemk. Ko pools = 4x30000,2x500000 phys_start = 0x0 phys_end = 0x3000000 pools_1 = 4x65536 phys_start_1 = 0x80000000 phys_end_1 = 0x80010000
  • Indicates that the memory is 0x0 ~ 0x2ffffff opened up two memory pools, the first consisting of 4 30000 bytes of cache, the second composed of 2 500000 bytes of cache. In Memory 0x80000000 ~ 0x8000ffff opened a memory pool consisting of 4 65536 bytes of cache.
  • 3. DSP Memory

    Ddralgheap, DDR/dsplinkmem, and ctrlreset are specified in the. TCF or *. TCI file in the source code of the DSP server. The default settings are as follows:

    /*
    * Setup platform-specific memory map:
    */
    VaR mem_ext = [
    {
    Comment: "ddralgheap: Off-chip memory for dynamic algmem allocation ",
    Name: "ddralgheap ",
    Base: 0x88000000, // 128 MB
    Len: 0x07700000, // 119 MB 0x07a00000
    Space: "code/Data"
    },
    {
    Comment: "DDR2: Off-chip memory for application code and Data", // if the amount of LIB code to be called by an algorithm is too large, the compilation will prompt an error in this area and a large allocation is required.

    Name: "DDR2 ",
    Base: 0x8f700000, // 250 MB 0x8fa00000
    Len: 0x00700000, // 7 MB 0x00400000
    Space: "code/Data"
    },
    {
    Comment: "dsplink: Off-chip memory reserved for dsplink code and Data ",
    Name: "dsplinkmem ",
    Base: 0x8fe00000, // 254 MB
    Len: 0x00100000, // 1 MB
    Space: "code/Data"
    },
    {
    Comment: "reset_vector: Off-chip memory for the Reset vector table ",
    Name: "reset_vector ",
    Base: 0x8ff00000, // 255 MB
    Len: 0x00000080, // 128 B
    Space: "code/Data"
    }
    ];

     

     

     

     

     

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.