iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Request direct mapping for modem device
@ 2020-03-17 15:09 Sibi Sankar
  2020-03-17 15:09 ` [PATCH v2 1/3] dt-bindings: remoteproc: qcom: Add iommus property Sibi Sankar
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Sibi Sankar @ 2020-03-17 15:09 UTC (permalink / raw)
  To: bjorn.andersson, robh+dt, joro, robin.murphy
  Cc: ohad, devicetree, linux-arm-msm, linux-remoteproc, linux-kernel,
	dianders, iommu, agross, Sibi Sankar

The Q6 modem sub-system has direct access to DDR through memnoc and
an indirect access routed through a SMMU which MSS CE (crypto engine
sub-component of MSS) uses during out of reset sequence. Request direct
mapping for the modem device since smmu is not expected to provide access
control/translation for these SIDs (sandboxing of the modem is achieved
through XPUs engaged using SMC calls). This is done on platforms which
don't have TrustZone (which programs the modem SIDs) to prevent the
following global faults seen on Cheza/Trogdor:

Cheza:
arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
arm-smmu 15000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000000,
			 GFSYNR1 0x00000781, GFSYNR2 0x00000000

Trogdor:
arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
arm-smmu 15000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000000,
			 GFSYNR1 0x00000461, GFSYNR2 0x00000000

V2:
 * Request direct mapping from SoC-specific corner of the SMMU
   driver [Robin]
 * Add iommu property to remoteproc modem node on Cheza

Depends on:
https://lore.kernel.org/patchwork/cover/1183528/

Sibi Sankar (3):
  dt-bindings: remoteproc: qcom: Add iommus property
  remoteproc: qcom_q6v5_mss: Request direct mapping for modem device
  arm64: dts: qcom: sdm845-cheza: Add iommus property

 Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt | 3 +++
 arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi                 | 4 ++++
 drivers/iommu/arm-smmu-qcom.c                              | 6 ++++++
 3 files changed, 13 insertions(+)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/3] dt-bindings: remoteproc: qcom: Add iommus property
  2020-03-17 15:09 [PATCH v2 0/3] Request direct mapping for modem device Sibi Sankar
@ 2020-03-17 15:09 ` Sibi Sankar
  2020-03-30 22:11   ` Rob Herring
  2020-03-17 15:09 ` [PATCH v2 2/3] remoteproc: qcom_q6v5_mss: Request direct mapping for modem device Sibi Sankar
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Sibi Sankar @ 2020-03-17 15:09 UTC (permalink / raw)
  To: bjorn.andersson, robh+dt, joro, robin.murphy
  Cc: ohad, devicetree, linux-arm-msm, linux-remoteproc, linux-kernel,
	dianders, iommu, agross, Sibi Sankar

Add iommus property to allow Q6 modem to boot on platforms which do
not have trustZone.

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
---
 Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt b/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt
index 88dfa3fc15f78..130e50aab7419 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt
@@ -184,6 +184,9 @@ For the compatible strings below the following phandle references are required:
 		    followed by the offset within syscon for conn_box_spare0
 		    register.
 
+The Hexagon node must contain iommus property as described in ../iommu/iommu.txt
+on platforms which do not have TrustZone.
+
 = SUBNODES:
 The Hexagon node must contain two subnodes, named "mba" and "mpss" representing
 the memory regions used by the Hexagon firmware. Each sub-node must contain:
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/3] remoteproc: qcom_q6v5_mss: Request direct mapping for modem device
  2020-03-17 15:09 [PATCH v2 0/3] Request direct mapping for modem device Sibi Sankar
  2020-03-17 15:09 ` [PATCH v2 1/3] dt-bindings: remoteproc: qcom: Add iommus property Sibi Sankar
@ 2020-03-17 15:09 ` Sibi Sankar
  2020-03-17 15:09 ` [PATCH v2 3/3] arm64: dts: qcom: sdm845-cheza: Add iommus property Sibi Sankar
  2020-03-17 15:52 ` [PATCH v2 0/3] Request direct mapping for modem device Sibi Sankar
  3 siblings, 0 replies; 6+ messages in thread
From: Sibi Sankar @ 2020-03-17 15:09 UTC (permalink / raw)
  To: bjorn.andersson, robh+dt, joro, robin.murphy
  Cc: ohad, devicetree, linux-arm-msm, linux-remoteproc, linux-kernel,
	dianders, iommu, agross, Sibi Sankar

Request direct mapping for modem on platforms which don't have TrustZone
(which programs the modem SIDs) to prevent the following global faults seen
on Cheza/Trogdor:

arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
arm-smmu 15000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000000,
			 GFSYNR1 0x00000781, GFSYNR2 0x00000000

arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
arm-smmu 15000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000000,
			 GFSYNR1 0x00000461, GFSYNR2 0x00000000

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
---
 drivers/iommu/arm-smmu-qcom.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c
index ff746acd1c816..5dd7a788f59e1 100644
--- a/drivers/iommu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm-smmu-qcom.c
@@ -20,12 +20,18 @@ static const struct arm_smmu_client_match_data qcom_mdss = {
 	.direct_mapping = true,
 };
 
+static const struct arm_smmu_client_match_data qcom_mss = {
+	.direct_mapping = true,
+};
+
 static const struct of_device_id qcom_smmu_client_of_match[] = {
 	{ .compatible = "qcom,adreno", .data = &qcom_adreno },
 	{ .compatible = "qcom,mdp4", .data = &qcom_mdss },
 	{ .compatible = "qcom,mdss", .data = &qcom_mdss },
 	{ .compatible = "qcom,sc7180-mdss", .data = &qcom_mdss },
+	{ .compatible = "qcom,sc7180-mss-pil", .data = &qcom_mss },
 	{ .compatible = "qcom,sdm845-mdss", .data = &qcom_mdss },
+	{ .compatible = "qcom,sdm845-mss-pil", .data = &qcom_mss },
 	{},
 };
 
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/3] arm64: dts: qcom: sdm845-cheza: Add iommus property
  2020-03-17 15:09 [PATCH v2 0/3] Request direct mapping for modem device Sibi Sankar
  2020-03-17 15:09 ` [PATCH v2 1/3] dt-bindings: remoteproc: qcom: Add iommus property Sibi Sankar
  2020-03-17 15:09 ` [PATCH v2 2/3] remoteproc: qcom_q6v5_mss: Request direct mapping for modem device Sibi Sankar
@ 2020-03-17 15:09 ` Sibi Sankar
  2020-03-17 15:52 ` [PATCH v2 0/3] Request direct mapping for modem device Sibi Sankar
  3 siblings, 0 replies; 6+ messages in thread
From: Sibi Sankar @ 2020-03-17 15:09 UTC (permalink / raw)
  To: bjorn.andersson, robh+dt, joro, robin.murphy
  Cc: ohad, devicetree, linux-arm-msm, linux-remoteproc, linux-kernel,
	dianders, iommu, agross, Sibi Sankar

Add iommus property to remoteproc modem node.

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
index 8d16d016efec1..01c7d7cc95c2d 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
@@ -626,6 +626,10 @@ &mdss_mdp {
 	status = "okay";
 };
 
+&mss_pil {
+	iommus = <&apps_smmu 0x780 0x1>;
+};
+
 &pm8998_pwrkey {
 	status = "disabled";
 };
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/3] Request direct mapping for modem device
  2020-03-17 15:09 [PATCH v2 0/3] Request direct mapping for modem device Sibi Sankar
                   ` (2 preceding siblings ...)
  2020-03-17 15:09 ` [PATCH v2 3/3] arm64: dts: qcom: sdm845-cheza: Add iommus property Sibi Sankar
@ 2020-03-17 15:52 ` Sibi Sankar
  3 siblings, 0 replies; 6+ messages in thread
From: Sibi Sankar @ 2020-03-17 15:52 UTC (permalink / raw)
  To: bjorn.andersson, robh+dt, joro, robin.murphy
  Cc: ohad, devicetree, linux-arm-msm, linux-remoteproc, linux-kernel,
	dianders, iommu, agross

On 2020-03-17 20:39, Sibi Sankar wrote:
> The Q6 modem sub-system has direct access to DDR through memnoc and
> an indirect access routed through a SMMU which MSS CE (crypto engine
> sub-component of MSS) uses during out of reset sequence. Request direct
> mapping for the modem device since smmu is not expected to provide 
> access
> control/translation for these SIDs (sandboxing of the modem is achieved
> through XPUs engaged using SMC calls). This is done on platforms which
> don't have TrustZone (which programs the modem SIDs) to prevent the
> following global faults seen on Cheza/Trogdor:
> 
> Cheza:
> arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
> arm-smmu 15000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000000,
> 			 GFSYNR1 0x00000781, GFSYNR2 0x00000000
> 
> Trogdor:
> arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
> arm-smmu 15000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000000,
> 			 GFSYNR1 0x00000461, GFSYNR2 0x00000000
> 
> V2:
>  * Request direct mapping from SoC-specific corner of the SMMU
>    driver [Robin]
>  * Add iommu property to remoteproc modem node on Cheza
> 
> Depends on:
> https://lore.kernel.org/patchwork/cover/1183528/
> 
> Sibi Sankar (3):
>   dt-bindings: remoteproc: qcom: Add iommus property
>   remoteproc: qcom_q6v5_mss: Request direct mapping for modem device

iommu: arm-smmu-qcom: Request direct mapping for modem device

sry should have been ^^ instead


>   arm64: dts: qcom: sdm845-cheza: Add iommus property
> 
>  Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt | 3 +++
>  arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi                 | 4 ++++
>  drivers/iommu/arm-smmu-qcom.c                              | 6 ++++++
>  3 files changed, 13 insertions(+)

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: remoteproc: qcom: Add iommus property
  2020-03-17 15:09 ` [PATCH v2 1/3] dt-bindings: remoteproc: qcom: Add iommus property Sibi Sankar
@ 2020-03-30 22:11   ` Rob Herring
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2020-03-30 22:11 UTC (permalink / raw)
  To: Sibi Sankar
  Cc: ohad, devicetree, dianders, linux-arm-msm, linux-remoteproc,
	linux-kernel, bjorn.andersson, iommu, robh+dt, agross,
	robin.murphy, Sibi Sankar

On Tue, 17 Mar 2020 20:39:08 +0530, Sibi Sankar wrote:
> Add iommus property to allow Q6 modem to boot on platforms which do
> not have trustZone.
> 
> Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
> ---
>  Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt | 3 +++
>  1 file changed, 3 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-30 22:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-17 15:09 [PATCH v2 0/3] Request direct mapping for modem device Sibi Sankar
2020-03-17 15:09 ` [PATCH v2 1/3] dt-bindings: remoteproc: qcom: Add iommus property Sibi Sankar
2020-03-30 22:11   ` Rob Herring
2020-03-17 15:09 ` [PATCH v2 2/3] remoteproc: qcom_q6v5_mss: Request direct mapping for modem device Sibi Sankar
2020-03-17 15:09 ` [PATCH v2 3/3] arm64: dts: qcom: sdm845-cheza: Add iommus property Sibi Sankar
2020-03-17 15:52 ` [PATCH v2 0/3] Request direct mapping for modem device Sibi Sankar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).