Add bindings for the "lendable-dma-pool" reserved-memory CMA pool, used to dynamically unmap pages from the kernel direct map before lending them to a secure world. Signed-off-by: Vincent Donnefort --- .../reserved-memory/lendable-dma-pool.yaml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/devicetree/bindings/reserved-memory/lendable-dma-pool.yaml diff --git a/Documentation/devicetree/bindings/reserved-memory/lendable-dma-pool.yaml b/Documentation/devicetree/bindings/reserved-memory/lendable-dma-pool.yaml new file mode 100644 index 000000000000..0b924d941b4d --- /dev/null +++ b/Documentation/devicetree/bindings/reserved-memory/lendable-dma-pool.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/reserved-memory/lendable-dma-pool.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: /reserved-memory Lendable DMA Pool + +maintainers: + - Vincent Donnefort + +description: | + This indicates a region of memory meant to be used as a pool of DMA buffers + that can be dynamically unmapped from the kernel direct map (e.g. before + lending to a secure world such as via Arm FF-A). + + On architectures where the direct map cannot be arbitrarily modified at + runtime (such as arm64 without BBML3 or without rodata=full), the operating + system ensures this pool is mapped using last-level (PTE) page table entries. + + The reusable property must be set, and no-map must not be set. + +allOf: + - $ref: reserved-memory.yaml + +properties: + compatible: + const: lendable-dma-pool + + linux,cma-default: + type: boolean + description: > + If this property is present, then Linux will use the region for + the default pool of the contiguous memory allocator. + + no-map: false + +required: + - compatible + - reusable + +unevaluatedProperties: false + +examples: + - | + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + linux,cma { + compatible = "lendable-dma-pool"; + reusable; + size = <0x4000000>; + alignment = <0x200000>; + linux,cma-default; + }; + }; -- 2.56.0.542.g3ef89b7020-goog