Forums - what is the difference between the RPCMEM_FLAG_UNCACHED and RPCMEM_FLAG_CACHED.

2 posts / 0 new
Last post
what is the difference between the RPCMEM_FLAG_UNCACHED and RPCMEM_FLAG_CACHED.
jcdhf0902
Join Date: 20 Apr 17
Posts: 4
Posted: Sat, 2018-10-27 02:33

what is the difference between the RPCMEM_FLAG_UNCACHED and RPCMEM_FLAG_CACHED when I allocate  memory for DSP?  can you tell me the details when I call the DSP function with memory address allocated with the two different parameters.

  • Up0
  • Down0
gesqdn-forum
Join Date: 4 Nov 18
Posts: 184
Posted: Tue, 2019-02-26 05:37

Hi,

The flags RPCMEM_FLAG_UNCACHED and RPCMEM_FLAG_CACHED are passed as second parameter to the function rpcmem_alloc(),

 

rpcmem_alloc(0, RPCMEM_HEAP_DEFAULT, len);

The second parameter, RPCMEM_FLAG_CACHED, means that the allocated memory will be cached.


To allocate an uncached buffer instead, use the RPCMEM_HEAP_UNCACHED parameter:

rpcmem_alloc(0, RPCMEM_HEAP_UNCACHED, len);


The reason for this optimization is that all cached buffers are shared across multiple processing units, so the cache coherency mechanism must be in place. Therefore, if you are certain the HLOS will not modify this allocated buffer other than during HVX processing, mark the memory buffer as uncached so that all mechanisms and related latencies will be circumvented.


For more reference, kindly look into the below document in the link

https://usermanual.wiki/Pdf/80N70392FASTRPCDEBUGGUIDE.399075392.pdf

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.