Page 7 of 7

Re: RPi Camera bounty

PostPosted: Tue May 16, 2017 1:06 pm
by miguel_rodrigues
wiegmink wrote:Hi all,

This is probably a very stupid question but I can't immediately find the answer. Our application uses the same mechanism as the RPi cam bounty (DMA from PL, memory reserved in DT, and transferred to the application using mmap). Right now I have a cache coherence problem. In the post dated June 30th in this thread tnt said: 1) Map the memory you use for DMA as uncached in the userspace process : This is what's done currently.

My question is: How is it done? Where did you make a modification in order to use that memory as uncached?

I put the question in this threat, bacause it refers to a discussion earlier in here. Maybe it should be put somewhere else.


To mark the memory as uncached, you can limit the amount of memory that Linux sees by adding "mem=512M" to the bootargs line of code in the Device Tree. By doing this, only the first 512M will be cached, and the others will be uncached. Linux will never use the remaining DDR memory but you can still access it (via mmap or userspace drivers) by setting up a DDR peripheral in the Device Tree.

Re: RPi Camera bounty

PostPosted: Wed May 24, 2017 7:41 am
by wiegmink
Thanks Miguel! I wasn't aware that memory not assigned to the kernel was excluded from caching.