Hello.I want to reserve memory in device tree. So I define four device node in reserve-memory.
but it doesn’t work well .There is always one node or two nodes that can not be reserved successfully.
I define the reserved memory as below:
reserved-memory {
#address-cells = <0x02>;
#size-cells = <0x02>;
ranges;
pcie-carveout {
reg = <0x1 0x0 0x1 0x0>;
no-map;
};
pcie-carveout1 {
reg = <0x2 0x0 0x1 0x0>;
no-map;
};
pcie-carveout2 {
reg = <0x3 0x0 0x1 0x0>;
no-map;
};
pcie-carveout3 {
reg = <0x4 0x0 0x1 0x0>;
no-map;
};
}
I define four nodes "pcie-carveout ",“pcie-carveout1”,“pcie-carveout2”,“pcie-carveout3”.When the device booted, sometimes the “pcie-carveout1” cannot be reserved, sometimes the “pcie-carveout2” cannot be reserved.
1.For the first time, the boot log as follows:
After device booted . I use command “cat /proc/iomem”,I find that the memory area "200000000-2ffffffff " has been used by System RAM.
2.For the second time, the boot log as follows:
After device booted . I use command “cat /proc/iomem”,I find that the memory area "300000000-3ffffffff " has also been used by System RAM.

So these two boot logs mean that "Kernel code " and “Kernel data” are not in the fixed area.
Can I assigned a fixed area for “Kernel code” and “Kernel data”?
Or is there another way to solve the error “Reserved memory: failed to reserve memory for node ‘pcie-carveout1’ or ‘pcie-carveout2’” in boot log?
Kind regards
Bryan