Quoting Marten Lindahl (2022-01-13 07:56:42) > On Tue, Jan 11, 2022 at 07:34:00PM +0100, Rob Herring wrote: > > On Tue, Jan 11, 2022 at 6:25 AM Mårten Lindahl <marten.lindahl@xxxxxxxx> wrote: > > Hi Rob! > Thanks for looking at this. > > > > > > If a DT specified reserved memory region overlaps an already registered > > > reserved region no notification is made. Starting the system with > > > overlapped memory regions can make it very hard to debug what is going > > > wrong. This is specifically true in case the ramoops console intersects > > > with initrd since the console overwrites memory that is used for initrd, > > > which leads to memory corruption. > > > > > > Highlight this by printing a message about overlapping memory regions. > > > > Won't this be noisy if a region is described in both /memreserve/ and > > /reserved-memory node? > > > Yes, it can potentially be noisy if doing so. But I think notifying this > can be useful. Should it perhaps be a notification instead of a warning? > Please don't print any message for /memreserve/ and /reserved-memory nodes overlapping. On the chromebook at my desk we have overlapping /memreserve/ and /reserved-memory. My understanding is that it's redundant to have both, especially when a reserved-memory node has 'no-map', but it isn't forbidden. The /memreserve/ is like a no-map /resreved-memory node without the phandle. Given that initrd is special cased in drivers/of/fdt.c can the reserved memory handling code look to see if it overlaps with the initrd region and skip that /reserved-memory carveout? A warning could probably be printed and ramoops should fail to probe.