UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
1,701 Views
Registered: ‎05-04-2016

Tell ARM not not cache specific memory region

Hi,

 

Is it possible to mark some region  of DDR memory (e.g. from 0x0FC00000 to 0x0FF00000) not to be cacheable neither by L1 nor by L2 ?

0 Kudos
3 Replies
Scholar ericv
Scholar
1,661 Views
Registered: ‎04-13-2015

Re: Tell ARM not not cache specific memory region

Hi @leonid_galperin

 

It is achieved with the setting of entries in the MMU translation table(s).

 

Could you provide more info on how you application is built?

I may be able to give you info on the changes to apply to set that region to non-cacheable (device or strongly ordered).

0 Kudos
1,649 Views
Registered: ‎05-04-2016

Re: Tell ARM not not cache specific memory region

I supposed that... Unfortunately documentation about translation tables and Xil_SetTlbAttributes function is bit unclear...

Is there any examples for such functionality?

 

My app is writing to memory buffer in DDR and PL is reading this buffer. So I need to turn off caching of that region.

And I don't want to flush or disable DCache while writing to this buffer.

0 Kudos
Scholar ericv
Scholar
1,629 Views
Registered: ‎04-13-2015

Re: Tell ARM not not cache specific memory region

Hi @leonid_galperin

 

There is fair amount of info on Xil_SetTlbAttributes() in this doc:

https://www.xilinx.com/Attachment/Changing_The_Cacheability_for_Memory.pdf

You should also go through the "Virtual Memory System" section on the ARM v7 Architecture reference manual

 

As indicated in the first doc, table entries are 1M each, so to set 0x0FC00000 --> 0x0FF00000 you'll have to use Xil_SetTlbAttributes() 3 times (for 0x0FC00000, 0x0FD00000 and 0x0FE00000).

To disable the cache on L1 & L2, you'll have to use both INNER_NON_CACHE (L1) and OUTER_NON_CACHE (L2). and AP_FULL and SHAREABLE for full access

I think that should do it.