On Mon, May 17, 2021 at 8:05 AM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote: > > Hi Adam, > > On Mon, May 17, 2021 at 2:50 PM Adam Ford <aford173@xxxxxxxxx> wrote: > > The bootloader/TF-A configuration we're using is based on the 4.19 CIP > > kernel that Renesas released. TF-A, we allocate some memory for the > > Where can I find this BSP? > rcar-3.9.x is based on v4.14, and rcar-4.0.x on v5.4. I don't know about > BSPs using a kernel version in between. Their URL is: https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-cortex-a-mpus/rzg-linux-platform/rzg-marketplace/verified-linux-package/rzg2-vlp-eva They have a github repo with a Yocto recipe which includes references to the CIP kernel and their list of patches: https://github.com/renesas-rz/meta-rzg2/tree/BSP-1.0.6/recipes-kernel/linux > > > lossy compression and this memory is not available for Linux. I'd > > prefer to not have to use a special TF-A for the mainline Linux, but > > what appears to be happening is that Linux doesn't know about the > > reserved memory, so memory corruption happens. > > > > The Renesas CIP kernel uses the following to define the space > > > > /* device specific region for Lossy Decompression */ > > lossy_decompress: linux,lossy_decompress@54000000 { > > no-map; > > reg = <0x00000000 0x54000000 0x0 0x03000000>; > > }; > > That is, inside a "reserved-memory" node. > > > Then uses the following to carve it out so Linux doesn't think it can use it. > > > > mmngr { > > compatible = "renesas,mmngr"; > > memory-region = <&mmp_reserved>, <&lossy_decompress>; > > }; > > > > Unfortunately, renesas,mmngr doesn't exist upstream. > > > > I thought about changing the memory node to break it up, but it seems > > like a hack. > > > > What is the best suggestion for blocking this memory area from Linux > > while still appearing to show the full memory size? > > I think "renesas,mmngr" is a red herring, as both rcar-3.9.x and > rcar-4.0.x use that compatible value in DTS files, but don't include > a driver. That seems true for the 4.19-CIP kernel as well. > > Does it work if you manually add the reserved-memory node and the > relevant subnodes to your DTS file? I'll give the reserved memory node a try. The extra "renesas,mmngr" threw me off. Thanks for the suggestion. adam > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds