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: 
Observer masrut
Observer
8,079 Views
Registered: ‎07-30-2015

disable L2 cache in linux

Jump to solution

I need to run a system with a bare metal app in CPU1, and Linux on CPU0.

XAPP1078 says that L2 cache must be disabled in the CPU1 app, but I need that the app works as fast as possible, so I need it to have the L2 cache enabled. A possible solution is to disable the L2 cache on linux CPU0 side.

Is there any option in the kernel configuration to do this ?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer masrut
Observer
15,466 Views
Registered: ‎07-30-2015

Re: disable L2 cache in linux

Jump to solution

This is a very good idea... thanks !

 

If I want Linux on CPU0 just for giving USB host support to a bare metal app running on CPU1, what else can I remove from the devicetree ?  I would like to remove as much as possible, in order not to interfere with the bare metal app...

Can I remove the interrupt controller also, so that I have no limitations in my bare metal app ?

Sorry.. I am not expert of Linux and maybe my questions might seem strange...

 

Thanks in advance... 

 

0 Kudos
2 Replies
Voyager
Voyager
8,059 Views
Registered: ‎06-24-2013

Re: disable L2 cache in linux

Jump to solution

The Linux Kernel has a number of config options which affect cache usage including the L2 cache, but most of them are forced to be "on" for zynq/arm, but a simple trick to keep the kernel from initializing the cache controller and thus enabling the L2 cache (which usually stays disabled by the bootloader) is to comment out the cache controller (pl310) from the devicetree.

 

Hope that helps,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Highlighted
Observer masrut
Observer
15,467 Views
Registered: ‎07-30-2015

Re: disable L2 cache in linux

Jump to solution

This is a very good idea... thanks !

 

If I want Linux on CPU0 just for giving USB host support to a bare metal app running on CPU1, what else can I remove from the devicetree ?  I would like to remove as much as possible, in order not to interfere with the bare metal app...

Can I remove the interrupt controller also, so that I have no limitations in my bare metal app ?

Sorry.. I am not expert of Linux and maybe my questions might seem strange...

 

Thanks in advance... 

 

0 Kudos