[V3,04/10] dt-bindings: remoteproc: qcom,sc7280-mss-pil: Update memory-region

Message ID 20230111114337.24782-5-quic_sibis@quicinc.com
State New
Headers
Series Fix XPU violation during modem metadata authentication |

Commit Message

Sibi Sankar Jan. 11, 2023, 11:43 a.m. UTC
  The dynamic memory region used for metadata authentication would still
be a part of the kernel mapping and any access to this region by the
application processor after assigning it to the remote Q6 will result
in a XPU violation. This is fixed by using a no-map carveout instead.
Update the bindings to reflect the addition of the new modem metadata
carveout on SC7280 SoC.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
---

v3:
 * remove double space [Krzysztof]
 * Pickup R-b

v2:
 * Pad commit message to explain bindings break [Krzysztof]
 * Split dt/bindings per SoC  [Krzysztof] 

 .../devicetree/bindings/remoteproc/qcom,sc7280-mss-pil.yaml    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Rob Herring Jan. 11, 2023, 1:29 p.m. UTC | #1
On Wed, 11 Jan 2023 17:13:31 +0530, Sibi Sankar wrote:
> The dynamic memory region used for metadata authentication would still
> be a part of the kernel mapping and any access to this region by the
> application processor after assigning it to the remote Q6 will result
> in a XPU violation. This is fixed by using a no-map carveout instead.
> Update the bindings to reflect the addition of the new modem metadata
> carveout on SC7280 SoC.
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
> ---
> 
> v3:
>  * remove double space [Krzysztof]
>  * Pickup R-b
> 
> v2:
>  * Pad commit message to explain bindings break [Krzysztof]
>  * Split dt/bindings per SoC  [Krzysztof]
> 
>  .../devicetree/bindings/remoteproc/qcom,sc7280-mss-pil.yaml    | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230111114337.24782-5-quic_sibis@quicinc.com


remoteproc@4080000: memory-region: [[226], [227]] is too short
	arch/arm64/boot/dts/qcom/sc7280-idp.dtb

remoteproc@4080000: memory-region: [[231], [232]] is too short
	arch/arm64/boot/dts/qcom/sc7280-idp2.dtb

remoteproc@4080000: memory-region: [[234], [235]] is too short
	arch/arm64/boot/dts/qcom/sc7280-crd-r3.dtb

remoteproc@4080000: memory-region: [[240], [241]] is too short
	arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dtb

remoteproc@4080000: memory-region: [[243], [244]] is too short
	arch/arm64/boot/dts/qcom/sc7280-herobrine-crd.dtb
	arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r1-lte.dtb

remoteproc@4080000: memory-region: [[248], [249]] is too short
	arch/arm64/boot/dts/qcom/sc7280-herobrine-zombie-lte.dtb

remoteproc@4080000: memory-region: [[251], [252]] is too short
	arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dtb

remoteproc@4080000: memory-region: [[252], [253]] is too short
	arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker-lte.dtb

remoteproc@4080000: qcom,halt-regs:0: [231] is too short
	arch/arm64/boot/dts/qcom/sc7280-idp.dtb

remoteproc@4080000: qcom,halt-regs:0: [236] is too short
	arch/arm64/boot/dts/qcom/sc7280-idp2.dtb

remoteproc@4080000: qcom,halt-regs:0: [239] is too short
	arch/arm64/boot/dts/qcom/sc7280-crd-r3.dtb

remoteproc@4080000: qcom,halt-regs:0: [245] is too short
	arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dtb

remoteproc@4080000: qcom,halt-regs:0: [248] is too short
	arch/arm64/boot/dts/qcom/sc7280-herobrine-crd.dtb
	arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r1-lte.dtb

remoteproc@4080000: qcom,halt-regs:0: [253] is too short
	arch/arm64/boot/dts/qcom/sc7280-herobrine-zombie-lte.dtb

remoteproc@4080000: qcom,halt-regs:0: [256] is too short
	arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dtb

remoteproc@4080000: qcom,halt-regs:0: [257] is too short
	arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker-lte.dtb
  

Patch

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc7280-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc7280-mss-pil.yaml
index b4de0521a89d..005cb21732af 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sc7280-mss-pil.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc7280-mss-pil.yaml
@@ -95,6 +95,7 @@  properties:
     items:
       - description: MBA reserved region
       - description: modem reserved region
+      - description: metadata reserved region
 
   firmware-name:
     $ref: /schemas/types.yaml#/definitions/string-array
@@ -240,7 +241,7 @@  examples:
                         <&rpmhpd SC7280_MSS>;
         power-domain-names = "cx", "mss";
 
-        memory-region = <&mba_mem>, <&mpss_mem>;
+        memory-region = <&mba_mem>, <&mpss_mem>, <&mdata_mem>;
 
         qcom,qmp = <&aoss_qmp>;