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.

am437x gp evm 2GB RAM on board, but only 1GB RAM usable on running system

Looking at the am437x gp evm board there are 4 MT41512M8RH-125 (512Mx8) chips which should make up 2GB of RAM.  However when I boot the system up both u-boot and the Linux kernel both report only 1GB of RAM.  Also when I run "free" at the Linux prompt it only shows 1GB of RAM available.  Is there a reason why this is the case before I begin looking into u-boot and the Linux kernel to attempt to make the entire 2GB usable?

 

  • Hi Dave,

    Which Linux version are you using? I will ask the SW team to check this.

  • Biser,

    I am running off of the SDK which is on the SD card that came with the am437x gp evm from TI.  It is the ti-sdk-am437x-evm-07.01.00.00 SDK and the Linux kernel version in this SDK is Linux-3.14.26-g2489c02.

    Thanks,

    Dave

  • Hi Dave,

    Just as a side note SDK7.0 uses kernel 3.12 & SDK8.0 - kernel 3.14:
    processors.wiki.ti.com/index.php;oldid=172167#Content_Overview
    processors.wiki.ti.com/.../Sitara_Linux_SDK_Supported_Platforms_and_Versions

    So I guess you've ported the newer kernel on SDK7.0, right?

    However, a couple of things come to my mind regarding your issue:
    - Have you added a mem=<memsize> environment variable in your bootargs ?
    - Check the #define CONFIG_MAX_RAM_BANK_SIZE in u-boot/include/configs/am437x_evm.h, in both SDK7.0 & SDK8.0 this parameter is set as:
    #define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1GB */
    - See configuration of EMIF4D_SDRAM_CONFIG & EMIF4D_SDRAM_CONFIG2 registers in both u-boot & kernel stages.

    Hope this helps.

    Best Regards,
    Yordan

  • Yordan,

    You are right about the kernel version. SDK 7.0 is using kernel 3.12. That was a cut and paste error on my part. That is I was also trying SDK8.0 which has the 3.14 kernel to see if that would solve the issue and I grabbed the kernel version from there by accident. Anyway neither SDK7.0 or SDK8.0 have 2GB of functional RAM (only 1GB is usable).

    Last week I had already tried updating u-boot CONFIG_MAX_RAM_BANK_SIZE to (2048<<20)/*2GB*/ and in u-boot changed SDRAM_CONFIG PAGESIZE from 512 to 1024 based on the information in the datasheet for MT41512M8RH-125. I didn't modify SDRAM_CONFIG2, so I'll try that. The system did not boot successfully (hung in u-boot) with just those modifications. I'm worried that some of the more complicated things (refresh, timing, etc.) may need tweaking to get this to work. I was hoping someone else (TI/Mistral) had already got this working, since this can be time consuming/difficult to get working properly (since it is a TI/Mistral board). Anyway I will let you know how it goes.

    Thanks,

    Dave
  • Yordan,

    As I said I previously had modified CONFIG_MAX_RAM_BANK_SIZE to (2048<<20)/*2GB*/. I checked SDRAM_CONFIG2, but I do not see anything in there which needs to be modified.

    I am in the process of working my way through understanding the u-boot/board/ti/am43xx/board.c file, in particular:

    /* EMIF DDR3 Configurations are different for production AM43X GP EVMs */
    const struct emif_regs ddr3_emif_regs_400Mhz_production = {
    .sdram_config = 0x638413B2,
    .ref_ctrl = 0x00000C30,
    .sdram_tim1 = 0xEAAAD4DB,
    .sdram_tim2 = 0x266B7FDA,
    .sdram_tim3 = 0x107F8678,
    .read_idle_ctrl = 0x00050000,
    .zq_config = 0x50074BE4,
    .temp_alert_config = 0x0,
    .emif_ddr_phy_ctlr_1 = 0x0E004008,
    .emif_ddr_ext_phy_ctrl_1 = 0x08020080,
    .emif_ddr_ext_phy_ctrl_2 = 0x00000066,
    .emif_ddr_ext_phy_ctrl_3 = 0x00000091,
    .emif_ddr_ext_phy_ctrl_4 = 0x000000B9,
    .emif_ddr_ext_phy_ctrl_5 = 0x000000E6,
    .emif_rd_wr_exec_thresh = 0x80000405,
    .emif_prio_class_serv_map = 0x80000001,
    .emif_connect_id_serv_1_map = 0x80000094,
    .emif_connect_id_serv_2_map = 0x00000000,
    .emif_cos_config = 0x000FFFFF
    };

    So if you have any suggestions on modifications for making 2GB RAM work let me know. So far I believe .sdram_config should be changed to 0x638413B3 (1024 word page).

    So do you know exactly is keeping it to 1GB of RAM? It appears that CONFIG_MAX_RAM_BANK_SIZE is used to calculate an end address for the 2GB RAM, but not really used for configuration.

    Thanks,

    Dave
  • Yordan,

    I just tried changing only CONFIG_MAX_RAM_BANK_SIZE to (2048<<20)/*2GB*/ (before I was always changing this along with SDRAM_CONFIG) and now I see the 2GB of RAM. I will look at this some more in the morning, but it appears that changing just CONFIG_MAX_RAM_BANK_SIZE works. I don't understand why the SDRAM_CONFIG change is not necessary...

    Thanks,

    Dave
  • Yordan,

    Confirmed that just changing CONFIG_MAX_RAM_BANK_SIZE to (2048<<20)  /*2GB*/ works.  In looking more carefully at the u-boot code this opens up the address range from 1GB to 2GB as well as passing the 2GB RAM size to the kernel.

    I also now understand where I was going wrong with thinking the PAGESIZE needed to change.  In the technical reference manual the description field is as follows:

    Page Size.

    Defines the internal page size of connected SDRAM devices.

    Set to 0 for

    256-word page (8 column bits), set to 1 for

    512-word page (9 column bits), set to 2 for

    1024-word page (10 column bits), and set to 3 for

    2048-word page (11 column bits).

    All other values are reserved

    I saw the line with 1024-word page (10 column bits) and set to 3 on the same line and thought the value should be 3.  However when I read it more carefully the "set to 2" in the line above this is for 1024-word page and that is what the PAGESIZE value currently is.  Thus SDRAM_CONFIG PAGESIZE is correct and does not need to change.

    Thanks again for your help!!!

    Dave

  • Hi Dave,

    I'm glad to hear that your issue is resolved.
    Also thank you for sharing your findings in such detail, this will be very useful to other e2e users.

    Best Regards,
    Yordan