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.

EZSDK Memory Map

Hi, all!

I have custom board, based on DM816x EVM. On board have  512MB DDR3 connected to the EMIF1 at address 0xC0000000. At this moment I work only with ARM processor and Linux. But I need write some DSP program and have some questions about SDK components.

1) Must I change EZSDK memory map to do this task or not?

2) On this wiki page http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map in section "H/W and S/W limitations to consider for deciding memory map" in "Hardware Limitations"  said: "Media Controller cannot access any program memory above 0xA0000000". What does it mean? In my board I can't use MC at all? Or I misunderstood something?

3) What should I change to sys_top working correctly. sys_top output  message:

# ./sys_top
Unhandled fault: Precise External Abort on non-linefetch (0x1818) at 0x400d0000
Bus error

Thank you.

  • From just reading that web page, it suggests that you should map the memory to exist at both 8000 and A000, see diagram and mapping settings further down:

    "For a 512MB system, we create 2 system address spaces of length 512MB and map to the same physical memory. On Media Controllers, the first address range is used to access DDR with cache enabled and the second address is used to access the same DDR with cache disabled.
    • System Address 0x80000000 is mapped to physical address 0x00000000
    • System Address 0xA0000000 is mapped to physical address 0x00000000"

  • Hi, Mike!

    Thank you for your answer! I have some questions.  Please, answer me

    1) system addresses - it is addresses from processor side, while u-boot or Linux running on it?

    2) In wiki diagram for 512MB systems DDR3 memory connected to the EMIF0, EMIF1, but on my board connected only EMIF1. Please, tell me, how I must set correct values of LISA_MAP_x registers in u-boot?

    Now I set:

     __raw_writel(0, DMM_LISA_MAP__0);
     __raw_writel(0, DMM_LISA_MAP__1);
     __raw_writel(0, DMM_LISA_MAP__2);
     __raw_writel(0xC0500200, DMM_LISA_MAP__3);
    i.e. map system address 0xC0000000 to physical address 0x0, 512MB size, non interleaved. And I changed u-boot and linux load and start address from 0x80000000 to 0xC0000000 (with offsets). It is correct?
    
    
    Thank you.
  • Hi, all!

    I read documentation about DMM from sprugx9.pdf and from sprs680a.pdf about EMIF adresses. And I still don't understand how my device is working :)

    Please help me to understand my mistakes.

    1) I have board based on C6A8168 processor. DDR3 connected to EMIF1 CS0 (size 512 MB). When I change some files in u-boot:

    in board/ti/ti8168/config.mk

    TEXT_BASE = 0xC0700000 

    in board/ti/ti8168/evm.c set all LISA mapping (and some changes specific, to my board)

    DMM_LISA_MAP__[0:2] = 0x0
    DMM_LISA_MAP__[3] = 0xC0500200

    in include/configs/ti8168_evm.h set 

    #define PHYS_DRAM_2 0xC0000000 /* DRAM Bank #2 */

    #define PHYS_DRAM_2_SIZE 0x20000000 /* 512 MB */

    rebuild u-boot, burn it on SPI or NAND it is working fine. Linux boot successfully (it start address 0xC0X00000)

    2) If I set all addresses (As note in EZSDK Memory Map):

    TEXT_BASE = 0x80700000 

    DMM_LISA_MAP__[0:1] = 0x0
    DMM_LISA_MAP__2 = 0x80400200
    DMM_LISA_MAP__3 = 0xA0400210
    or
    DMM_LISA_MAP__[0:2] = 0x0
    DMM_LISA_MAP__3 = 0x80500200

    #define PHYS_DRAM_2 0x80000000 /* DRAM Bank #2 */

    #define PHYS_DRAM_2_SIZE 0x20000000 /* 512 MB */

    system hung at u-boot stage.

    3) Why system don't work in the second 2) case? To my mind it should not work in the first 1) case, because EMIF1 CS0 starting at address 0x80000000 (or 0xC0000000). Please explain me. I'm confused.

    4) How  I can set DMM_LISA_MAP_x registers properly to work with EZSDK system map for 512 MB board? Please help!

  • Hi, All!

    I found solution for my custom board. I must change all DMM_LISA_MAP__x registers in this manner:

    __raw_writel(0x0, DMM_LISA_MAP__0);
    __raw_writel(0x80500200, DMM_LISA_MAP__1);
    __raw_writel(0xA0500200, DMM_LISA_MAP__2);
    __raw_writel(0xC0500200, DMM_LISA_MAP__3);

    If I set DMM_LISA_MAP__3 to 0x0 nothing is working. May be it was useful for someone.