Search code examples
raspberry-piarmraspberry-pi2raspberry-pi3cpu-cache

Raspberry Pi3 is exclusive or inclusive cache?


The Raspberry Pi 3 Model B features a quad-core 64-bit ARM Cortex A53 clocked at 1.2 GHz with 32kB Level 1 and 512kB Level 2 cache memory.

My question is what type is the cache, is it exclusive or inclusive? Where can I find these information?


Solution

  • Answer found in NXP site (arm site):

    For data accesses, the Cortex-A53 uses "tends towards exclusive" cache allocation policy:
      "Data is allocated to the L2 cache only when evicted from the L1 memory system, not when first fetched from the system. The only exceptions to this rule are for memory marked with the inner transient hint, or for non-temporal loads, see Non-temporal loads, that are only ever allocated to the L2 cache. The L1 cache can prefetch data from the system, without data being evicted from the L2 cache."
    
    For instruction fetches, the Cortex-A53 uses "tends towards inclusive" cache allocation policy:
       "Instructions are allocated to the L2 cache when fetched from the system and can be invalidated during maintenance operations."
    
    It is impossible to modify the this cache policy, this is non-configurable.