Applying DTB Overlays from ATF on RZ/G2

Adam Ford aford173 at gmail.com
Wed Jan 4 22:35:33 CET 2023


ATF generates a couple memory nodes based on how it's compiled and
generates a reserved-memory node, and I want to overlay it with the
device tree so Linux knows about this reserved memory.

When I boot U-Boot, I can read the reserved-memory node:

=> fdt addr 0xe631e588
Working FDT set to e631e588
=> fdt print /reserved-memory
reserved-memory {
lossy-decompression at 54000000 {
renesas,formats = <0x00000000>;
no-map;
reg = <0x00000000 0x54000000 0x00000000 0x03000000>;
compatible = "renesas,lossy-decompression", "shared-dma-pool";
};
};
=>

I attempt to overlay it with the following:

=> run loadfdt
65932 bytes read in 6 ms (10.5 MiB/s)
=> fdt addr $load_addr
Working fdt: e631e588
=> fdt resize 8192
=> fdt apply 0xe631e588

At this point, I would expect the reserved-memory node to be merged
with the main FDT, but it appears to be missing.

=> fdt print /reserved-memory
libfdt fdt_path_offset() returned FDT_ERR_BADMAGIC
=>

There are no errors, but there are no overlays either.

Does someone have any suggestions as to what I am doing wrong?
Without the reserved memory node, Linux can crash if it tries to use
the memory in that restricted area, and that node might change
depending on how ATF is compiled.

Thanks for any help.

adam


More information about the U-Boot mailing list