External Memory for PRU (uio_pruss)

I’m running Angstrom (Linux 3.8.13, September 12, 2013) on a BeagleBone Black and I’ve tried configuring uio_pruss to allocate a large amount of external memory, but I have found that sizes greater than 8MB don’t work and lead to uio_pruss failure.

The command I have been trying is:

/sbin/modprobe uio_pruss extram_pool_sz=0x800001

… and the error message I receive is:

pruss_uio 4a300000.pruss: Could not allocate external memory

I would like to allocate more than 8MB of external memory for PRU access. Is it possible to allocate more than 8MB? If so, what can I do to make it work?

0x800000 is the max amount I’ve been able to allocate. I think it has something to do with max size allowed by dma_alloc_coherent with the GFP_KERNEL flag. The max with the beaglebone white (256mb ram instead of 512mb) was 0x400000. So far I haven’t been able to turn up where these limits may be coming from though… someone suggested it may be tunable with a kernel parameter.

Also we’ve gotten around this limit by treating that 8mb as a ring buffer and having a C program which streams data from that ring buffer into a much larger userland malloc()ed buffer.