Reserve memory in device tree

For a custom device a memory carveout is necessary. I see the following snippet in the device tree source (decompiled from the current system’s dtb to be absolutely sure):

generic_carveout {
                        compatible = "nvidia,generic_carveout";
                        size = <0x0 0x0>;
                        alignment = <0x0 0x100000>;
                        alloc-ranges = <0x0 0x0 0x1 0x0>;
                        status = "okay";
                        linux,phandle = <0xc5>;
                        phandle = <0xc5>;

                grid-of-semaphores {
                        compatible = "nvidia,gosmem";
                        size = <0x0 0x6000>;
                        alignment = <0x0 0x1000>;
                        status = "okay";
                        cvdevs = <0xc0 0xc1 0xc2 0xc3 0x86 0x8d>;
                        linux,phandle = <0xc4>;
                        phandle = <0xc4>;

                ramoops_carveout {
                        compatible = "nvidia,ramoops";
                        size = <0x0 0x200000>;
                        alignment = <0x0 0x10000>;
                        alloc-ranges = <0x0 0x0 0x1 0x0>;
                        status = "okay";
                        linux,phandle = <0x1bb>;
                        phandle = <0x1bb>;

                vpr-carveout {
                        compatible = "nvidia,vpr-carveout";
                        size = <0x0 0x2a000000>;
                        alignment = <0x0 0x400000>;
                        alloc-ranges = <0x0 0x80000000 0x0 0x70000000>;
                        linux,phandle = <0x1bc>;
                        phandle = <0x1bc>;

I also see during boot:

OF: reserved mem: initialized node ramoops_carveout, compatible id nvidia,ramoops
OF: reserved mem: initialized node grid-of-semaphores, compatible id nvidia,gosmem

As you see, I’ve turned on generic_carveout for a test, however it does not show up in the kernel log. What am I missing, how to create custom memory reserve?

If the reserve is assigned dynamically, how can one get the physical address of it?

hello gabor.wacha,

we’re going to investigate this internally.
will get back to you after we have some conclusions.

hello gabor.wacha,

L4T r31.1 C-Boot sources is now available via Jetson Download Center,
all carveouts are allocated in MB1, you should modifying the C-Boot source if you need to create customize carveouts for your own usage.
please also access the documentation via ~/cboot_src_t194/CBoot_Standalone_Readme.txt for reference.