UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer redglass
Observer
381 Views
Registered: ‎06-10-2018

How to change the memory size with linux

Hi, All Some times, I need reduce ddr memory to 512MB for hardware cost down, and sometimes need to change to like 4GB for some products.

 

How can I change Linux code for adapt for different memory size?

 

thanks!

0 Kudos
2 Replies
Moderator
Moderator
343 Views
Registered: ‎04-24-2017

Re: How to change the memory size with linux

Hi @redglass,

 

If you are using petalinux then current petalinux doesn’t work when you change the memory configurations and it doesn’t update the memory node in device-tree property. Also selecting Only upper 2GB also doesn’t work we have a CR on this one as well.

 

Only way you can to modify the memory nodes in <plnx-proj-root>/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi or your dts nodes if you are using OSL flow as show below.

 

Below are some examples.

 

==========================
memory config device-tree:
==========================
/* 4.0GB configurations */
/ {
     memory {
           device_type = "memory";
           reg = <0x0 0x0 0x0 0x80000000>, <0x8 0x0 0x0 0x80000000>;
     };
}

/* 3.5GB configurations */
/ {
     memory {
           device_type = "memory";
           reg = <0x0 0x0 0x0 0x60000000>, <0x8 0x0 0x0 0x80000000>;
     };
}

/* 3.0GB configurations */
/ {
     memory {
           device_type = "memory";
           reg = <0x0 0x0 0x0 0x60000000>, <0x8 0x0 0x0 0x60000000>;
     };
}

/* 2.0GB configurations */ - THIS DOESN’T WORK IN CURRENT RELEASE
/ {
     memory {
           device_type = "memory";
           reg = <0x8 0x0 0x0 0x80000000>;
     };
}

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor thiruparan
Visitor
189 Views
Registered: ‎11-09-2018

Re: How to change the memory size with linux

were you able to reduce the ram size used by linux...

i am trying to do the same i have 4 GB available, I want to reduce ram available for linux to 1 GB 

 

0 Kudos