How to reserve a block of memory in Linux?

How to reserve a block of memory in Linux?

To reserve a block of memory from the kernel in ARM based Linux, you can also use a reserved-memory node in your device tree (dts) file. In kernel documentation (see here ), there is an example:

How to reserve memory in the device tree?

Now I want to reserve the memory area of 0x800000000- 0x860000000. I added mem=1536M in the bootargs, and in the startup log, I can see the reserved memroy is from 0xc000000000-0xc060000000. Does anyone knows how to make the reservation at the right place? (0x800000000) And I tried add following lines into system-top.dtsi and zynqmp.dtsi.

Do you need a driver to reserve this memory?

You need to write a driver to reserve this memory. Yes, I realize you said you didn’t want the OS to intervene, and a driver becomes part of the OS, but in absence of a driver’s reservation, the kernel believes all memory belongs to it. (Unless you tell the kernel to ignore the memory block, per Aaron’s answer, that is.)

Why do I get an error when I want to reserve memory?

Below is the error log information: I assume the error is because that the virtual memory I want to reserve is 0x8 00000000 which exceed the range of 32 bit. What should I do next?

Is there such a thing as reserved memory?

I have the seemingly common Hardware Reserved Memory issue, wherein I have 32GB (4×8) of RAM installed, but the system is reserving 8.1gb.

What should I do about hardware reserved memory?

You don`t say anything about a video card, the hardware reserved is for video. You need to buy a video card. Looking at the bios screenshot which is only showing 24576MB as useable I would suggest either a motherboard or ram stick problem, maybe try the A1 A2 B1 B2 combination and see what happens?

How is physical memory mapped in Linux kernel?

Each zone type suitable a different type of usage. ZONE_DMAis memory in the lower physical memory ranges which certain ISA devices require. Memory within ZONE_NORMALis directly mapped by the kernel into the upper region of the linear address space which is discussed further in Section 4.1.