0

This board has 4G of memory. I'm new to embedded development and trying to reserve 3G CMA, I first tried with kernel bootargs which didn't work and can only reserve up to ~1700M.

Then decided to change device tree and added:

reserved-memory {
    #address-cells = <2>;
    #size-cells = <2>;
    ranges;
        
    reserved: buffer@0 {
        compatible = "shared-dma-pool";
        reusable;
        size = <0 0x80000000>;
        linux,cma-default;
    };
};

And it can allocate 2048M but if I go higher it won't work and without any error message, just says `allocated 256M`.

But if I do `free -m` It shows that I have 4G of ram and I can allocate it with python:

x = bytearray(3024*1024*1000)

I asked the question in xilinx forum before and found this question that says increase the memory address but when I do that it doesn't load the kernel correctly.

My device tree file:

https://ufile.io/29gkn15s

sdfsdewre
  • 1
  • 1
  • You probably don't have more than 2G of contiguous memory to reserve and are stomping on other memory ranges in use by other parts of the system. You might have to reserve two separate ranges that don't conflict with anything else. – thelummox Mar 16 '23 at 14:54
  • @thelummox How can I reserve two separate ranges? If I use another memory block wouldn't it override the first one? – sdfsdewre Mar 16 '23 at 17:15

0 Answers0