-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move Contiguous Memory Region Specification to the Device Tree #4
Comments
This DMA Buffer driver already has support for "reserved-memory": You probably already know this project, but if not it might contain some useful code. |
I am using petalinux, programming over JTAG right now, and I do not know where to set to configure CMA, when I run the benchmark I get : cma: cma_alloc: alloc failed, req-size: 2025 pages, ret: -12 I tried to set it in the system-user.dtsi |
Hello @maikonadams, For CMA configuration using petalinux (tested with 2017.4): Go to kernel features Then enable and set the CMA value: Go to Device Drivers / Generic Driver options |
thank you @guerricmeurice ! |
To allocate large regions of physically-contiguous memory, the driver uses the CMA (contiguous memory allocator). At boot time, the user specifies the
cma=<size>M
parameter to reserve a region ofsize
megabytes for the CMA.It would be much nicer if the user could instead specify this in the device tree, as this requires less manual user intervention, since they don't need to update the command line via U-Boot or the device tree.
This can be done via a reserved memory region device tree node. The user specifies a device tree node that describes the contiguous memory region (size, alignment, type, etc.). Then the user would put the memory-region property in the driver's device tree node. This is simply a phandle to the reserved memory region device tree node. See the reserved-memory documentation for more details.
The text was updated successfully, but these errors were encountered: