[yocto] Limit RAM for Linux

Edward Wingate edwingate8 at gmail.com
Mon Jun 8 11:06:42 PDT 2015


I am using Yocto with meta-xilinx layer to create a distribution for a
custom Zynq 7000 board with 512MB RAM. In my uEnv, I'm loading the
kernel to 0x0010_0000, device tree to 0x0190_0000 and ramdisk image to
0x0210_0000.

Later in the boot process, I see this:
    Loading Kernel Image ... OK
    Loading Ramdisk to 1e16f000, end 1ed221fc ... OK
    Loading Device Tree to 1e166000, end 1e16ef40 ... OK

I'd like to restrict Linux to the lower 256MB out of 512MB of RAM.
When I add mem=256MB to boot arguments, the kernel doesn't boot.  I
can specify "mem=" down to only 494M, I assume to get it just over
those 0x1exx_xxxx addresses. Any lower and the kernel doesn't boot.
Where do the 0x1exx_xxxx come from and how can I change those?

I also tried changing the memory in device tree.  It was originally:
ps7_ddr_0: memory at 0 {
    device_type = "memory"
    reg = <0x0 0x200000000>;
}

I changed reg to <0x0 0x10000000> thinking this would limit the RAM
that Linux sees to the lower 256MB, but Linux still reports seeing all
512MB of RAM.

Can anyone point me to where else my configuration needs to change?
Thanks for your help.

Edward



More information about the yocto mailing list