Enable/Disable L2 Cache

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enable/Disable L2 Cache

Jump to solution
4,942 Views
adamszalkowski
Contributor II

Is it possible to disable the L2 once it has been enabled by the boot loader? Or is it only possible via e-fuse to avoid initialization during boot? How can I initialize the L2 manually?

Labels (2)
0 Kudos
Reply
1 Solution
3,222 Views
kef2
Senior Contributor V

See the digit before N letter in part number. 1N - you have L2 cache and no RAM at 0x3f48xxxx , 0N - no L2 cache but 0.5MB RAM at 0x3f480000. You can't map L2 cache RAM to address space anyhow.

View solution in original post

0 Kudos
Reply
8 Replies
3,222 Views
adamszalkowski
Contributor II

Seems like I managed to disable the cache i.e. *(int*)0x40006100) == 0

Anyway, I would like to use the SRAM at 0x3f48xxxx for program memory. Every access to this area aborts.

0 Kudos
Reply
3,223 Views
kef2
Senior Contributor V

See the digit before N letter in part number. 1N - you have L2 cache and no RAM at 0x3f48xxxx , 0N - no L2 cache but 0.5MB RAM at 0x3f480000. You can't map L2 cache RAM to address space anyhow.

0 Kudos
Reply
3,222 Views
adamszalkowski
Contributor II

Pity, thanks for the clarification

0 Kudos
Reply
3,222 Views
kef2
Senior Contributor V

Another pity is a memory hole between SYS RAM and GXF RAM. Easy to glue them using MMU and make A5 CPU believing there's no hole. But DMA ... doesn't mind MMU. 

0 Kudos
Reply
3,222 Views
adamszalkowski
Contributor II

Hello Naoum,

I'm using the tower board TWR-VF65GS10 (processor is PVF61GS151CMK50).

Regards,

Adam

0 Kudos
Reply
3,222 Views
naoumgitnik
Senior Contributor V

Dear Adam,

I only needed the part number to verify how the L2 cache is "fused" on your part, and it looks like it has it enabled.

Regards, Naoum Gitnik.

0 Kudos
Reply
3,222 Views
naoumgitnik
Senior Contributor V

Dear Adam,

  • If the cache is not disabled by a fuse, enabling and disabling it is possible by software; if the fuse disables it, software cannot do anything.
  • What is the exact Vybrid part number you are using, please?

Regards, Naoum Gitnik.

0 Kudos
Reply
3,222 Views
billpringlemeir
Contributor V

The L2-cache controller is an l2c310_r3p2.  The data sheet can be downloaded from the ARM web sight.  From the documentation, the base physical address is 0x40006000.  The controller is trustzone aware.  To access everything, you must be in the secure supervisor modes.  The Vybrid configuration has no data banking, no lock down by line/master and no parity.  It is 64KB way size with 8 ways.  The address 40006100 bit 0 will turn the L2 cache on and off.  However, you might need to do some flushing and/or invalidation before doing this.

Edit: Also the MQX version of the cortex-A5 BSP/PSP has some code for manipulating the L2.  There is also Linux source and header to handle several ARM L2 designs.  The key is the Vybrid L2 register base is 0x40006000; it is in the memory map of the Vybrid software reference manual.