Pynq & maximum allocatable memory (CMA)


I have some limitations when using a DMA on a ZCU111. I can’t allocate all the memory I need in my buffers when I use “allocate” function.
After some research, I find this : " This buffer is allocated inside the kernel space using xlnk driver. The maximum allocatable memory is defined at kernel build time using the CMA memory parameters. For Pynq-Z1 kernel, it is specified as 128MB. " (

I think it is necessary to configure the Linux Kernel : Failed to allocate Memory when i use the fuction 'cma_alloc'
But I have no more information.

Someone can help me ?

Thanks :slight_smile:


I forgot to specify : I try to build a new image (, but I don’t find any parameters to modify to increase this maximum allocatable memory.

Thanks :slight_smile:


Check under Petalinux Kernel Config. There was a tutorial here a while ago by Peter showing how to port to a new board. If I recall correctly is under the same settings as DMA APF.

Device Drivers->Generic Driver Options->Size in Mega Bytes(1024)
Device Drivers->Staging drivers (ON)->Xilinx APF Accelerator driver (ON)->Xilinx APF DMA engines support (ON)

Hi :slight_smile:
Thank you so much for your answers

You’re talking about this guide : Deploying PYNQ and Jupyter with Petalinux ?


Yep, that’s it.

Hello again.

I’m testing the guide, and it’s probably going to work.
Nevertheless, I lost the current configuration of ZCU111 v2.5, myrootfs… :frowning:

Do you know if I can:

  • just copy the new build kernel to my ZCU111 SD card?
  • or maybe just specify the kernel option when I use this guide: ? Because I can’t configure the kernel with it (or I don’t know how to do this)
  • maybe something else?

Thank you very much, again