Reserved Memory Node and Shared DMA Pool Configuration in Device Tree
Reserved Memory Node and Shared DMA Pool Configuration in Device Tree
This Device Tree fragment defines a reserved memory node and configures a shared DMA pool within it.
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
linux,cma {
compatible = 'shared-dma-pool';
reusable;
size = <0x14000000>;
linux,cma-default;
};
};
Explanation of Each Line:
'reserved-memory': Defines a node representing a reserved memory region.#address-cells = <1>: Specifies that the node's address is defined using a single cell (32-bit).#size-cells = <1>: Specifies that the node's size is defined using a single cell (32-bit).ranges: Defines the address range of the reserved memory region.'linux,cma': Defines a shared DMA pool within the reserved memory node.compatible = 'shared-dma-pool': Indicates the compatibility string for the shared DMA pool.reusable: Defines the shared DMA pool as reusable, allowing it to be allocated and freed dynamically.size = <0x14000000>: Defines the size of the shared DMA pool as 320MB (0x14000000 = 320 * 1024 * 1024).'linux,cma-default': Identifies this shared DMA pool as the system's default CMA (Contiguous Memory Allocator) for allocating physically contiguous memory regions.
原文地址: https://www.cveoy.top/t/topic/n5R3 著作权归作者所有。请勿转载和采集!