[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250715101223.GA6320@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
Date: Tue, 15 Jul 2025 03:12:23 -0700
From: Abhishek Tiwari <abhitiwari@...ux.microsoft.com>
To: Rob Herring <robh@...nel.org>
Cc: krzk+dt@...nel.org, conor+dt@...nel.org, kees@...nel.org,
tony.luck@...el.com, gpiccoli@...lia.com,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org, abhitiwari@...rosoft.com
Subject: Re: [PATCH] dt-bindings: memory: Document linux,usable-memory
property
On Thu, Mar 13, 2025 at 01:57:30PM -0500, Rob Herring wrote:
> On Thu, Mar 13, 2025 at 9:03 AM Abhishek Tiwari
> <abhitiwari@...ux.microsoft.com> wrote:
> >
> > Add Documentation for linux,usable-memory
> >
> > Signed-off-by: Abhishek Tiwari <abhitiwari@...ux.microsoft.com>
> > ---
> > .../bindings/linux,usable-memory.txt | 32 +++++++++++++++++++
> > 1 file changed, 32 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/linux,usable-memory.txt
> >
> > diff --git a/Documentation/devicetree/bindings/linux,usable-memory.txt b/Documentation/devicetree/bindings/linux,usable-memory.txt
> > new file mode 100644
> > index 000000000000..167054d2e9a2
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/linux,usable-memory.txt
> > @@ -0,0 +1,32 @@
> > +linux,usable-memory
> > +===================
>
> This belongs here:
> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/memory.yaml
>
> > +
> > +Description
> > +-----------
> > +The ``linux,usable-memory`` property can be used to restrict usable memory
> > +region. This property holds a base address and size, Memory outside of this
> > +range is not accessible by the kernel. This property is particularly useful
> > +in specialized hardware platforms where certain memory regions must be
> > +reserved for specific use.
> > +
> > +Common use cases include:
> > +- Allocating ``ramoops`` region
> > +- Reserving memory for hardware-specific needs
> > +- Fake Protecting persistent memory (PMEM)
>
> All these examples belong in /reserved-memory nodes, not
> linux,usable-memory. Go see the ramoops binding for example.
>
> This was really for the case where you already have 'reg' (in the
> memory node), but need to limit memory while at the same time not
> overwriting 'reg'. Basically, for kexec where you can keep booting
> another kernel forever. If that's not your usecase, you shouldn't be
> using this.
>
> Rob
Thank you for your suggestions and explanations. I will update
the definition and examples accordingly, and submit a PR with
the documentation for this property in the specified repository.
Powered by blists - more mailing lists