Am 5. Januar 2023 00:19:36 MEZ schrieb Adam Ford <aford...@gmail.com>: >On Wed, Jan 4, 2023 at 5:15 PM Heinrich Schuchardt <xypron.g...@gmx.de> wrote: >> >> On 1/4/23 22:35, Adam Ford wrote: >> > 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@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 >> >> When actually setting the address you will see a message "Working FDT >> set to %lx\n". So I assume $load_addr is empty. >> >> Did you mean $loadaddr or $fileaddr? > >Opps, that was a copy-paste error. Even with that, I still get the >failure to overlay: >
Did you load a .dtbo file to apply? You cannot apply a devicetree. Is the fdt that you want to apply the overlay to built with symbols (dtc parameter -@)? Best regards Heinrich > >=> run loadfdt >65932 bytes read in 6 ms (10.5 MiB/s) >=> fdt addr $fdt_addr >Working FDT set to 48000000 >=> fdt resize 8192 >=> fdt apply 0xe631e588 >=> fdt print /reserved-memory >libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND >=> > > > >> >> > Working fdt: e631e588 >> > => fdt resize 8192 >> > => fdt apply 0xe631e588 >> >> Here you are apply the devicetree at e631e588 to itself which cannot work. >> >> Best regards >> >> Heinrich >> >> > >> > 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 >>