Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: reserved-memory: rmtfs: Allow guard pages

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 pages in the defined size.

Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230920-rmtfs-mem-guard-pages-v3-1-305b37219b78@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Bjorn Andersson and committed by
Bjorn Andersson
3ad96787 f6aa7386

+11
+11
Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml
··· 26 26 description: > 27 27 identifier of the client to use this region for buffers 28 28 29 + qcom,use-guard-pages: 30 + type: boolean 31 + description: > 32 + Indicates that the firmware, or hardware, does not gracefully handle 33 + memory protection of this region when placed adjacent to other protected 34 + memory regions, and that padding around the used portion of the memory 35 + region is necessary. 36 + 37 + When this is set, the first and last page should be left unused, and the 38 + effective size of the region will thereby shrink with two pages. 39 + 29 40 qcom,vmid: 30 41 $ref: /schemas/types.yaml#/definitions/uint32-array 31 42 description: >