[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3d69cb4-b0f9-40b0-b526-52fdc1a4b876@gmail.com>
Date: Thu, 24 Sep 2020 16:23:59 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Thierry Reding <thierry.reding@...il.com>,
Joerg Roedel <joro@...tes.org>
Cc: Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>,
iommu@...ts.linux-foundation.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v2 1/4] dt-bindings: reserved-memory: Document "active"
property
04.09.2020 15:59, Thierry Reding пишет:
> From: Thierry Reding <treding@...dia.com>
>
> Reserved memory regions can be marked as "active" if hardware is
> expected to access the regions during boot and before the operating
> system can take control. One example where this is useful is for the
> operating system to infer whether the region needs to be identity-
> mapped through an IOMMU.
>
> Signed-off-by: Thierry Reding <treding@...dia.com>
> ---
> .../bindings/reserved-memory/reserved-memory.txt | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt b/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
> index 4dd20de6977f..163d2927e4fc 100644
> --- a/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
> +++ b/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
> @@ -63,6 +63,13 @@ reusable (optional) - empty property
> able to reclaim it back. Typically that means that the operating
> system can use that region to store volatile or cached data that
> can be otherwise regenerated or migrated elsewhere.
> +active (optional) - empty property
> + - If this property is set for a reserved memory region, it indicates
> + that some piece of hardware may be actively accessing this region.
> + Should the operating system want to enable IOMMU protection for a
> + device, all active memory regions must have been identity-mapped
> + in order to ensure that non-quiescent hardware during boot can
> + continue to access the memory.
>
> Linux implementation note:
> - If a "linux,cma-default" property is present, then Linux will use the
>
Hi,
Could you please explain what devices need this quirk? I see that you're
targeting Tegra SMMU driver, which means that it should be some pre-T186
device. Is this reservation needed for some device that has display
hardwired to a very specific IOMMU domain at the boot time?
If you're targeting devices that don't have IOMMU enabled by default at
the boot time, then this approach won't work for the existing devices
which won't ever get an updated bootloader. I think Robin Murphy already
suggested that we should simply create a dummy "identity" IOMMU domain
by default for the DRM/VDE devices and then replace it with an
explicitly created domain within the drivers.
Secondly, all NVIDIA bootloaders are passing tegra_fbmem=... via
kernel's cmdline with the physical location of the framebuffer in
memory. Maybe we could support this option?
Powered by blists - more mailing lists