From: Janne Grunau <j@jannau.net>
To: iommu@lists.linux-foundation.org
Cc: "Isaac J. Manjarres" <isaacm@codeaurora.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Will Deacon <will@kernel.org>, Hector Martin <marcan@marcan.st>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
asahi@lists.linux.dev,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Robin Murphy <robin.murphy@arm.com>,
Alyssa Rosenzweig <alyssa@rosenzweig.io>,
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject: [PATCH v3 0/5] iommu: M1 Pro/Max DART support
Date: Tue, 21 Jun 2022 09:18:43 +0200 [thread overview]
Message-ID: <20220621071848.14834-1-j@jannau.net> (raw)
Hej,
this is the next attempt adding support for the DART found in Apple's
M1 Pro/Max/Ultra. This adds a separate io-pgtable implementation for
DART. As already mentioned in v2 the pte format is not fully compatible
with io-pgtable-arm. Especially the 2nd least significant bit is used
and is not available to tag tables/pages.
io-pgtable-dart.c is copied from io-pgtable-arm.c and support for
unused features is removed. Support for 4k IO pages is left for A7 to
A11 SoCs as there's work underway to run Linux on them.
The incompatibilities between both Apple DART pte seems manageable in
their own io-pgtable implementation. A short list of the known
differences:
- the physical addresses are shifted left by 4 bits and and have 2 more
bits inside the PTE entries
- the read/write protection flags are at a different position
- the subpage protection feature is now mandatory. For Linux we can
just configure it to always allow access to the entire page.
- BIT(1) tags "uncached" mappings (used for the display controller)
There is second type of DART (t8110) present on M1 Pro/Max SoCs which
uses the same PTE format as t6000.
Changes in v3:
- move APPLE_DART to its own io-pgtable implementation, copied from
io-pgtable-arm and simplified
Changes in v2:
- added Rob's Acked-by:
- add APPLE_DART2 io-pgtable format
Janne Grunau (1):
iommu/io-pgtable: Move Apple DART support to its own file
Sven Peter (4):
dt-bindings: iommu: dart: add t6000 compatible
iommu/io-pgtable: Add DART subpage protection support
iommu/io-pgtable-dart: Add DART PTE support for t6000
iommu: dart: Support t6000 variant
.../devicetree/bindings/iommu/apple,dart.yaml | 4 +-
MAINTAINERS | 1 +
drivers/iommu/Kconfig | 1 -
drivers/iommu/Makefile | 2 +-
drivers/iommu/apple-dart.c | 24 +-
drivers/iommu/io-pgtable-arm.c | 63 --
drivers/iommu/io-pgtable-dart.c | 623 ++++++++++++++++++
drivers/iommu/io-pgtable.c | 3 +
include/linux/io-pgtable.h | 1 +
9 files changed, 653 insertions(+), 69 deletions(-)
create mode 100644 drivers/iommu/io-pgtable-dart.c
--
2.35.1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
WARNING: multiple messages have this Message-ID (diff)
From: Janne Grunau <j@jannau.net>
To: iommu@lists.linux-foundation.org
Cc: Konrad Dybcio <konrad.dybcio@somainline.org>,
asahi@lists.linux.dev, Alyssa Rosenzweig <alyssa@rosenzweig.io>,
Georgi Djakov <quic_c_gdjako@quicinc.com>,
Hector Martin <marcan@marcan.st>,
"Isaac J. Manjarres" <isaacm@codeaurora.org>,
Joerg Roedel <joro@8bytes.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Mark Kettenis <mark.kettenis@xs4all.nl>,
Rob Herring <robh+dt@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Sven Peter <sven@svenpeter.dev>, Will Deacon <will@kernel.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/5] iommu: M1 Pro/Max DART support
Date: Tue, 21 Jun 2022 09:18:43 +0200 [thread overview]
Message-ID: <20220621071848.14834-1-j@jannau.net> (raw)
Hej,
this is the next attempt adding support for the DART found in Apple's
M1 Pro/Max/Ultra. This adds a separate io-pgtable implementation for
DART. As already mentioned in v2 the pte format is not fully compatible
with io-pgtable-arm. Especially the 2nd least significant bit is used
and is not available to tag tables/pages.
io-pgtable-dart.c is copied from io-pgtable-arm.c and support for
unused features is removed. Support for 4k IO pages is left for A7 to
A11 SoCs as there's work underway to run Linux on them.
The incompatibilities between both Apple DART pte seems manageable in
their own io-pgtable implementation. A short list of the known
differences:
- the physical addresses are shifted left by 4 bits and and have 2 more
bits inside the PTE entries
- the read/write protection flags are at a different position
- the subpage protection feature is now mandatory. For Linux we can
just configure it to always allow access to the entire page.
- BIT(1) tags "uncached" mappings (used for the display controller)
There is second type of DART (t8110) present on M1 Pro/Max SoCs which
uses the same PTE format as t6000.
Changes in v3:
- move APPLE_DART to its own io-pgtable implementation, copied from
io-pgtable-arm and simplified
Changes in v2:
- added Rob's Acked-by:
- add APPLE_DART2 io-pgtable format
Janne Grunau (1):
iommu/io-pgtable: Move Apple DART support to its own file
Sven Peter (4):
dt-bindings: iommu: dart: add t6000 compatible
iommu/io-pgtable: Add DART subpage protection support
iommu/io-pgtable-dart: Add DART PTE support for t6000
iommu: dart: Support t6000 variant
.../devicetree/bindings/iommu/apple,dart.yaml | 4 +-
MAINTAINERS | 1 +
drivers/iommu/Kconfig | 1 -
drivers/iommu/Makefile | 2 +-
drivers/iommu/apple-dart.c | 24 +-
drivers/iommu/io-pgtable-arm.c | 63 --
drivers/iommu/io-pgtable-dart.c | 623 ++++++++++++++++++
drivers/iommu/io-pgtable.c | 3 +
include/linux/io-pgtable.h | 1 +
9 files changed, 653 insertions(+), 69 deletions(-)
create mode 100644 drivers/iommu/io-pgtable-dart.c
--
2.35.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Janne Grunau <j@jannau.net>
To: iommu@lists.linux-foundation.org
Cc: Konrad Dybcio <konrad.dybcio@somainline.org>,
asahi@lists.linux.dev, Alyssa Rosenzweig <alyssa@rosenzweig.io>,
Georgi Djakov <quic_c_gdjako@quicinc.com>,
Hector Martin <marcan@marcan.st>,
"Isaac J. Manjarres" <isaacm@codeaurora.org>,
Joerg Roedel <joro@8bytes.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Mark Kettenis <mark.kettenis@xs4all.nl>,
Rob Herring <robh+dt@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Sven Peter <sven@svenpeter.dev>, Will Deacon <will@kernel.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/5] iommu: M1 Pro/Max DART support
Date: Tue, 21 Jun 2022 09:18:43 +0200 [thread overview]
Message-ID: <20220621071848.14834-1-j@jannau.net> (raw)
Hej,
this is the next attempt adding support for the DART found in Apple's
M1 Pro/Max/Ultra. This adds a separate io-pgtable implementation for
DART. As already mentioned in v2 the pte format is not fully compatible
with io-pgtable-arm. Especially the 2nd least significant bit is used
and is not available to tag tables/pages.
io-pgtable-dart.c is copied from io-pgtable-arm.c and support for
unused features is removed. Support for 4k IO pages is left for A7 to
A11 SoCs as there's work underway to run Linux on them.
The incompatibilities between both Apple DART pte seems manageable in
their own io-pgtable implementation. A short list of the known
differences:
- the physical addresses are shifted left by 4 bits and and have 2 more
bits inside the PTE entries
- the read/write protection flags are at a different position
- the subpage protection feature is now mandatory. For Linux we can
just configure it to always allow access to the entire page.
- BIT(1) tags "uncached" mappings (used for the display controller)
There is second type of DART (t8110) present on M1 Pro/Max SoCs which
uses the same PTE format as t6000.
Changes in v3:
- move APPLE_DART to its own io-pgtable implementation, copied from
io-pgtable-arm and simplified
Changes in v2:
- added Rob's Acked-by:
- add APPLE_DART2 io-pgtable format
Janne Grunau (1):
iommu/io-pgtable: Move Apple DART support to its own file
Sven Peter (4):
dt-bindings: iommu: dart: add t6000 compatible
iommu/io-pgtable: Add DART subpage protection support
iommu/io-pgtable-dart: Add DART PTE support for t6000
iommu: dart: Support t6000 variant
.../devicetree/bindings/iommu/apple,dart.yaml | 4 +-
MAINTAINERS | 1 +
drivers/iommu/Kconfig | 1 -
drivers/iommu/Makefile | 2 +-
drivers/iommu/apple-dart.c | 24 +-
drivers/iommu/io-pgtable-arm.c | 63 --
drivers/iommu/io-pgtable-dart.c | 623 ++++++++++++++++++
drivers/iommu/io-pgtable.c | 3 +
include/linux/io-pgtable.h | 1 +
9 files changed, 653 insertions(+), 69 deletions(-)
create mode 100644 drivers/iommu/io-pgtable-dart.c
--
2.35.1
next reply other threads:[~2022-06-21 7:18 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 7:18 Janne Grunau [this message]
2022-06-21 7:18 ` [PATCH v3 0/5] iommu: M1 Pro/Max DART support Janne Grunau
2022-06-21 7:18 ` Janne Grunau
2022-06-21 7:18 ` [PATCH v3 1/5] dt-bindings: iommu: dart: add t6000 compatible Janne Grunau
2022-06-21 7:18 ` Janne Grunau
2022-06-21 7:18 ` Janne Grunau
2022-06-21 7:18 ` [PATCH v3 2/5] iommu/io-pgtable: Move Apple DART support to its own file Janne Grunau
2022-06-21 7:18 ` Janne Grunau
2022-06-21 7:18 ` Janne Grunau
2022-06-27 15:09 ` Robin Murphy
2022-06-27 15:09 ` Robin Murphy
2022-06-27 15:09 ` Robin Murphy
2022-09-01 0:15 ` Janne Grunau
2022-09-01 0:15 ` Janne Grunau
2022-06-21 7:18 ` [PATCH v3 3/5] iommu/io-pgtable: Add DART subpage protection support Janne Grunau
2022-06-21 7:18 ` Janne Grunau
2022-06-21 7:18 ` Janne Grunau
2022-06-21 7:18 ` [PATCH v3 4/5] iommu/io-pgtable-dart: Add DART PTE support for t6000 Janne Grunau
2022-06-21 7:18 ` Janne Grunau
2022-06-21 7:18 ` Janne Grunau
2022-06-27 15:13 ` Robin Murphy
2022-06-27 15:13 ` Robin Murphy
2022-06-27 15:13 ` Robin Murphy
2022-07-31 7:04 ` Hector Martin
2022-07-31 7:04 ` Hector Martin
2022-09-01 0:22 ` Janne Grunau
2022-09-01 0:22 ` Janne Grunau
2022-06-21 7:18 ` [PATCH v3 5/5] iommu: dart: Support t6000 variant Janne Grunau
2022-06-21 7:18 ` Janne Grunau
2022-06-21 7:18 ` Janne Grunau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220621071848.14834-1-j@jannau.net \
--to=j@jannau.net \
--cc=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=devicetree@vger.kernel.org \
--cc=iommu@lists.linux-foundation.org \
--cc=isaacm@codeaurora.org \
--cc=konrad.dybcio@somainline.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=mark.kettenis@xs4all.nl \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.