# \[PATCH v6 3/4\] drivers: of: add initialization code for dma reserved memory

- From: Rob Herring \<hidden\>
- Date: 2013-08-26 12:20:57 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2013/08/8075486
- Thread: https://ratatoskr.run/linux-devicetree/2013/08/8075486/t.md

```text
On Mon, Aug 19, 2013 at 10:04 AM, Marek Szyprowski
[ref] wrote:
> This patch adds device tree support for contiguous and reserved memory
> regions defined in device tree.
>
> Large memory blocks can be reliably reserved only during early boot.
> This must happen before the whole memory management subsystem is
> initialized, because we need to ensure that the given contiguous blocks
> are not yet allocated by kernel. Also it must happen before kernel
> mappings for the whole low memory are created, to ensure that there will
> be no mappings (for reserved blocks) or mapping with special properties
> can be created (for CMA blocks). This all happens before device tree
> structures are unflattened, so we need to get reserved memory layout
> directly from fdt.
>
> Later, those reserved memory regions are assigned to devices on each
> device structure initialization.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
> Acked-by: Michal Nazarewicz <redacted>
> Acked-by: Tomasz Figa <redacted>

Reviewed-by: Rob Herring <redacted>
```
