Re: [PATCH v9 1/5] dt-bindings: reserved-memory: Document iommu-addresses

Thierry Reding
2022-10-07T13:54:34Z

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

On Fri, Oct 07, 2022 at 02:45:31PM +0100, Robin Murphy wrote:
> On 2022-09-23 13:35, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > This adds the "iommu-addresses" property to reserved-memory nodes, which
> > allow describing the interaction of memory regions with IOMMUs. Two use-
> > cases are supported:
> >
> > 1. Static mappings can be described by pairing the "iommu-addresses"
> > property with a "reg" property. This is mostly useful for adopting
> > firmware-allocated buffers via identity mappings. One common use-
> > case where this is required is if early firmware or bootloaders
> > have set up a bootsplash framebuffer that a display controller is
> > actively scanning out from during the operating system boot
> > process.
> >
> > 2. If an "iommu-addresses" property exists without a "reg" property,
> > the reserved-memory node describes an IOVA reservation. Such memory
> > regions are excluded from the IOVA space available to operating
> > system drivers and can be used for regions that must not be used to
> > map arbitrary buffers.
>
> Bah, I've only just realised: don't we also need to change the "oneOf:
> required: ..." schema to permit "iommu-addresses" without "reg" or "size"?

Hm... good point. I think at least we'll want another:

- required:
- iommu-addresses

in there. I wonder if we also need to avoid the combination of "size"
and "iommu-addresses". When "size" is specified, is it guaranteed that
those regions will be allocated before the direct mapping needs to be
created?

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]