I also tried increasing the amount of reserved memory from 256K to 4M and
didn't see any change. I increased the size way beyond physical memory, and
didn't get any errors. So I suspect it is being ignored. Do I need a kernel
flag or something to reserve memory?
So, is there any way to verify that the memory is getting reserved? (I
suspect nothing is reserved, so I would be writing to random memory if I
tried to use the buffer.)
Other than noticing the reduced amount of free ram, I don't think the
reserved memory regions show up until/unless they are requested by a
: I got the reserved-memory to load two ways. I figured out that I need
to use target-path = "/"; in the dtc file so it gets loaded under the root
node. Next, in case reserved-memory didn't work as an overlay, I edited
am335x-bone-common.dtsi under /opt/source/dtb-4.14-ti.
There's likely an issue in your device tree. Make sure your entries
are showing up under /sys:
$ find /sys/firmware/devicetree/base/reserved-memory/ -type f
~$ hd /sys/firmware/devicetree/base/reserved-memory/NewTek_Reserved/reg
00000000 18 00 00 00 08 00 00 00 |........|
* This is from a Zynq (not a BBB), but it should match if you're using
a recent 4.x kernel.
* The names should match whatever you have in device-tree
* The values in the "reg" file are in wacky device-tree byte order,
the hex dump above corresponds to a "reg = <0x18000000 0x08000000>;"
entry in the device-tree.
* You don't need the status="okay"; entries in your node
* Don't use overlays and put the reserved-memory node at the root of
the device-tree (I think you already figured this out).
* Double (and then triple) check for typos!
* Note that just because something shows up in the "live" device tree
(under /sys/firmware/devicetree/base/) doesn't mean the kernel did
anything with it. If you misspell "reserved-memory" for instance,
your node will show up in the device tree, but you won't have actually
reserved any memory. The kernel doesn't complain about unknown or
unexpected elements in the device-tree.