*** Reserved memory regions *** Reserved memory is specified as a node under the /reserved-memory node. The operating system shall exclude reserved memory from normal usage one can create child nodes describing particular reserved (excluded from normal use) memory regions. Such memory regions are usually designed for the special usage by various device drivers. Parameters for each memory region can be encoded into the device tree with the following nodes: /reserved-memory node --------------------- #address-cells, #size-cells (required) - standard definition - Should use the same values as the root node ranges (required) - standard definition - Should be empty /reserved-memory/ child nodes ----------------------------- Each child of the reserved-memory node specifies one or more regions of reserved memory. Each child node may either use a 'reg' property to specify a specific range of reserved memory, or a 'size' property with optional constraints to request a dynamically allocated block of memory. Following the generic-names recommended practice, node names should reflect the purpose of the node (ie. "framebuffer" or "dma-pool"). Unit address (@
) should be appended to the name if the node is a static allocation. Properties: Requires either a) or b) below. a) static allocation reg (required) - standard definition b) dynamic allocation size (required) - length based on parent's #size-cells - Size in bytes of memory to reserve. alignment (optional) - length based on parent's #size-cells - Address boundary for alignment of allocation. alloc-ranges (optional) - prop-encoded-array (address, length pairs). - Specifies regions of memory that are acceptable to allocate from. If both reg and size are present, then the reg property takes precedence and size is ignored. Additional properties: compatible (optional) - standard definition - may contain the following strings: - shared-dma-pool: This indicates a region of memory meant to be used as a shared pool of DMA buffers for a set of devices. It can be used by an operating system to instantiate the necessary pool management subsystem if necessary. - restricted-dma-pool: This indicates a region of memory meant to be used as a pool of restricted DMA buffers for a set of devices. The memory region would be the only region accessible to those devices. When using this, the no-map and reusable properties must not be set, so the operating system can create a virtual mapping that will be used for synchronization. The main purpose for restricted DMA is to mitigate the lack of DMA access control on systems without an IOMMU, which could result in the DMA accessing the system memory at unexpected times and/or unexpected addresses, possibly leading to data leakage or corruption. The feature on its own provides a basic level of protection against the DMA overwriting buffer contents at unexpected times. However, to protect against general data leakage and system memory corruption, the system needs to provide way to lock down the memory access, e.g., MPU. Note that since coherent allocation needs remapping, one must set up another device coherent pool by shared-dma-pool and use dma_alloc_from_dev_coherent instead for atomic coherent allocation. - vendor specific string in the form