cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mishuk
Participant
Participant
4,180 Views
Registered: ‎09-11-2017

Reserve a DDR memory region

Jump to solution

Hello!

I`m using Petalinux 2017.2 with zedBoard BSP.

I reserved DDR memory region through *.dtsi file as described here: https://www.kernel.org/doc/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt

and got boot fail "rootfs image is not initramfs (write error); looks like an initrd".

The same boot fail I got when booting with "mem=" parameter. 

Without "mem=" boot parameter and without memory reservation through *.dtsi file Linux boots fine.

 

I need help!

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
shabbirk
Moderator
Moderator
5,510 Views
Registered: ‎12-04-2016

Hi

 

You would need to add device tree node something like this, for example, to reserve 0x2000000 of total memory 0x80000000:-

 

memory {
                reg = <0x0 0x0 0x0 0x80000000>;
        };
        reserved-memory {
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;

                te_linux_shm_reserved: te_linux_shm@7e000000 {
                        reg = <0x0 0x7e000000 0x0 0x2000000>;
                };
        };

View solution in original post

5 Replies
shabbirk
Moderator
Moderator
5,511 Views
Registered: ‎12-04-2016

Hi

 

You would need to add device tree node something like this, for example, to reserve 0x2000000 of total memory 0x80000000:-

 

memory {
                reg = <0x0 0x0 0x0 0x80000000>;
        };
        reserved-memory {
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;

                te_linux_shm_reserved: te_linux_shm@7e000000 {
                        reg = <0x0 0x7e000000 0x0 0x2000000>;
                };
        };

View solution in original post

mishuk
Participant
Participant
4,153 Views
Registered: ‎09-11-2017

I have already done it.  Take a look at dtsi file attached

0 Kudos
radheys
Xilinx Employee
Xilinx Employee
4,136 Views
Registered: ‎02-20-2014

Can you try some other address for reserved memory? i.e higher 16MB

 

Thanks,

Radhey

0 Kudos
mishuk
Participant
Participant
4,117 Views
Registered: ‎09-11-2017

I have tried three different addresses (low, medium and high): 0xf00000, 0x10000000, 0x1F000000.  I have 512M RAM on the board, so valid RAM addresses are 0...0x20000000.  Each time boot failure.

0 Kudos
mishuk
Participant
Participant
4,057 Views
Registered: ‎09-11-2017

Your answer works.   Problems with initramfs were far away from memory reservation

0 Kudos