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.

How to configure DDR memory size?

Hi,

I 'm now using a 128MByte DDR2 and accordingly setting a proper values on U-boot(ddr_def.h file on EZSDK v5.05).

 

By the way, I want Kernel to recoginize the DDR size as only 64MByte.  I guess it can be achieved via  mem variable on uEnv.txt.

I'd appreciate if you would review it.

U-Boot> setenv bootargs 'console=ttyO0,115200n8 noinitrd ip=off mem=64M rootwait=1 rw ubi.mtd=7,2048 rootfstype=ubifs root=ubi0:rootfs init=/init'

 

Thanks,

Devin

  • Hi Devin,

    Passing the mem=64M to your bootargs should result in the kernel recognizing only 64MB of RAM.

    Here is how it worked out with me on the AM335x EVM:

    When no change was introduced to the bootargs (the EVM has 512MB of memory) and I run "cat /proc/meminfo" :

    root@am335x-evm:~# cat /proc/meminfo
    MemTotal:         513332 kB
    MemFree:          428864 kB

    When I pass "mem=256M" to the bootargs:

    root@am335x-evm:~# cat /proc/meminfo
    MemTotal:         253436 kB
    MemFree:          169088 kB

    And when I pass "mem=64M":

    root@am335x-evm:~# cat /proc/meminfo
    MemTotal:          58512 kB
    MemFree:            1508 kB

    Best regards,
    Miroslav

  • Hi Mirostav,

    Thanks for your effort. It's very helpfull.

    Regards,

    Devin