1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/reserved-memory/shared-dma-pool.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: /reserved-memory DMA pool node bindings
10 - devicetree-spec@vger.kernel.org
13 - $ref: "reserved-memory.yaml"
18 - const: shared-dma-pool
20 This indicates a region of memory meant to be used as a shared
21 pool of DMA buffers for a set of devices. It can be used by an
22 operating system to instantiate the necessary pool management
23 subsystem if necessary.
25 - const: restricted-dma-pool
27 This indicates a region of memory meant to be used as a pool
28 of restricted DMA buffers for a set of devices. The memory
29 region would be the only region accessible to those devices.
30 When using this, the no-map and reusable properties must not
31 be set, so the operating system can create a virtual mapping
32 that will be used for synchronization. The main purpose for
33 restricted DMA is to mitigate the lack of DMA access control
34 on systems without an IOMMU, which could result in the DMA
35 accessing the system memory at unexpected times and/or
36 unexpected addresses, possibly leading to data leakage or
37 corruption. The feature on its own provides a basic level of
38 protection against the DMA overwriting buffer contents at
39 unexpected times. However, to protect against general data
40 leakage and system memory corruption, the system needs to
41 provide way to lock down the memory access, e.g., MPU. Note
42 that since coherent allocation needs remapping, one must set
43 up another device coherent pool by shared-dma-pool and use
44 dma_alloc_from_dev_coherent instead for atomic coherent
50 If this property is present, then Linux will use the region for
51 the default pool of the contiguous memory allocator.
56 If this property is present, then Linux will use the region for
57 the default pool of the consistent DMA allocator.
63 const: restricted-dma-pool
69 unevaluatedProperties: false
78 /* global autoconfigured region for contiguous allocations */
80 compatible = "shared-dma-pool";
87 display_reserved: framebuffer@78000000 {
88 reg = <0x78000000 0x800000>;
91 restricted_dma_reserved: restricted-dma-pool@50000000 {
92 compatible = "restricted-dma-pool";
93 reg = <0x50000000 0x4000000>;