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 crochetx
Observer
1,203 Views

Specify RAM size to store data while running Linux

Jump to solution

Hi,

 

I'm trying to store data in RAM while running Linux. I cannot figure out how to specify the OS that it can only use the half memory.

I already try to change to modify the "memory" field in the device tree, to add a uEnv.txt size to alter the boot procedure, to modify the zynq_zed.h file.

Maybe I'd need to configure the u-boot or the FSBL compilation, but I didn't find out how to do it.

Can someone give me a clue?

 

Already, thank you

0 Kudos
1 Solution

Accepted Solutions
Teacher muzaffer
Teacher
2,221 Views

Re: Specify RAM size to store data while running Linux

Jump to solution

@crochetx you can look at the following thread to see how you can modify the device-tree to add a memory reserve section for your needs. Basically you need to do this:

 

reserved-memory {
  #address-cells = <1>;
  #size-cells = <1>;
  ranges;

  vin_reserved: vin@0x10000000 {
    reg = <0x10000000 0x40000>;
  };
};

 

https://forums.xilinx.com/t5/Embedded-Linux/Zynq-Petalinux-reserve-a-DDR-memory-region/td-p/529237/page/2

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
2 Replies
Teacher muzaffer
Teacher
2,222 Views

Re: Specify RAM size to store data while running Linux

Jump to solution

@crochetx you can look at the following thread to see how you can modify the device-tree to add a memory reserve section for your needs. Basically you need to do this:

 

reserved-memory {
  #address-cells = <1>;
  #size-cells = <1>;
  ranges;

  vin_reserved: vin@0x10000000 {
    reg = <0x10000000 0x40000>;
  };
};

 

https://forums.xilinx.com/t5/Embedded-Linux/Zynq-Petalinux-reserve-a-DDR-memory-region/td-p/529237/page/2

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Observer crochetx
Observer
1,162 Views

Re: Specify RAM size to store data while running Linux

Jump to solution

Thank you Muzzafer, now it works.

 

Thus the solution is :

  add the new field 'reserved-memory' in the device tree.

  'reg' specifies the address of the beginning of the reserved memory and its length.

 

Thank you

0 Kudos