From: Bjorn Andersson <quic_bjorande@quicinc.com>
To: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: <linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Bjorn Andersson <quic_bjorande@quicinc.com>
Subject: [PATCH v3 1/3] dt-bindings: reserved-memory: rmtfs: Allow guard pages
Date: Wed, 20 Sep 2023 19:37:30 -0700 [thread overview]
Message-ID: <20230920-rmtfs-mem-guard-pages-v3-1-305b37219b78@quicinc.com> (raw)
In-Reply-To: <20230920-rmtfs-mem-guard-pages-v3-0-305b37219b78@quicinc.com>
On some Qualcomm platforms the firwmare, or hardware, does not
gracefully handle memory protection of the rmtfs memory region when
placed adjacent to other protected region. Some DeviceTree authors have
worked around this issue by explicitly reserving the space around the
region, but this prevents such author to use rely on the OS to place the
region, through the use of "size" (instead of a fixed location).
Introduce a flag to indicate that guard pages need be carved at the
beginning and end of the memory region. The user shall account for the
two 4k blocks in the defined size.
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---
.../devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml
index bab982f00485..2d7be508c5a0 100644
--- a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml
+++ b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml
@@ -26,6 +26,17 @@ properties:
description: >
identifier of the client to use this region for buffers
+ qcom,use-guard-pages:
+ type: boolean
+ description: >
+ Indicates that the firmware, or hardware, does not gracefully handle
+ memory protection of this region when placed adjacent to other protected
+ memory regions, and that padding around the used portion of the memory
+ region is necessary.
+
+ When this is set, the first and last 4kB should be left unused, and the
+ effective size of the region will thereby shrink with 8kB.
+
qcom,vmid:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: >
--
2.25.1
next prev parent reply other threads:[~2023-09-21 2:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 2:37 [PATCH v3 0/3] soc: qcom: rmtfs: Support dynamic allocation Bjorn Andersson
2023-09-21 2:37 ` Bjorn Andersson [this message]
2023-09-21 7:06 ` [PATCH v3 1/3] dt-bindings: reserved-memory: rmtfs: Allow guard pages Konrad Dybcio
2023-09-23 17:46 ` Krzysztof Kozlowski
2023-09-21 2:37 ` [PATCH v3 2/3] soc: qcom: rmtfs: Support discarding " Bjorn Andersson
2023-09-21 7:28 ` Konrad Dybcio
2023-09-21 18:04 ` Stephan Gerhold
2023-09-22 2:51 ` Bjorn Andersson
2023-09-22 7:35 ` Stephan Gerhold
2023-09-22 13:50 ` Bjorn Andersson
2023-09-21 2:37 ` [PATCH v3 3/3] soc: qcom: rtmfs: Handle reserved-memory allocation issues Bjorn Andersson
2023-09-21 7:09 ` Konrad Dybcio
2023-09-21 18:11 ` Stephan Gerhold
2023-09-22 2:44 ` Bjorn Andersson
2023-09-28 0:34 ` (subset) [PATCH v3 0/3] soc: qcom: rmtfs: Support dynamic allocation Bjorn Andersson
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=20230920-rmtfs-mem-guard-pages-v3-1-305b37219b78@quicinc.com \
--to=quic_bjorande@quicinc.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@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 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).