Issue in Enabling L2 Cache of PXA320



Hi,
I am working on windows CE 6.0 BSP porting based on the PXA320 zylonite BSP.
I am facing a crucial problem with enabling the L2 cache. Windows CE cache
flushing operations has been done through the void OEMCacheRangeFlush(LPVOID
pAddr, DWORD dwLength, DWORD dwFlags) function. Based on the data size
(dwLength parameter) the selection of the operation will be decided. If the
dwLength is greater than equal to the cache, the entire cache will be flushed
otherwise only few cache lines will be flushed.
During the write back and invalidate operation (case CACHE_SYNC_DISCARD),
flushing of the entire 256K L2 cache is perfectly working. This case will be
used when the data size is greater than or equal to 256K. For lesser data,
line flushing operation is implemented. During this case address (pAddr) is
used to find the corresponding cache lines. L2 cache is accessed using the
physical address. Using the page table this MVA is converted to physical
address. During this operation sometimes page fault is occurred. Because of
this data abort is occurred. I have done a change in the code to fix the
issue. Instead of using the line flushing, I am flushing the entire L2 cache.
Now it is working fine. But this is not a good practice. Instead of flushing
few lines I am flushing the entire cache. In this case I can’t achieve the
full performance.
The same operation is implemented in L1 cache also. There is no such problem
in accessing the L1 cache. I have seen the xscale L2 cache implementation
application note. I didn’t find any mistakes in the implementation in
zylonite BSP.
I want to know the reason of the issue. Is it the windows CE 6.0 issue or
BSP issue? Please advise me.
Advanced thanks,
R.Vinoth (MCTS wince)




.



Relevant Pages

  • Re: USB mass storage and ARM cache coherency
    ... You could argue that performance improvement ... Performance is always worth it provided we don't sacrifice correctness. ... D flushing issue. ... was present in the cache. ...
    (Linux-Kernel)
  • Re: USB mass storage and ARM cache coherency
    ... at which point things like flushing for the PIO ... the ARM approach was basically taken from Sparc64. ... - a virtual indexed aliasing cache ... wouldn't do since they call flush_dcache_page) on a compact flash card ...
    (Linux-Kernel)
  • Re: USB mass storage and ARM cache coherency
    ... at which point things like flushing for the PIO ... the ARM approach was basically taken from Sparc64. ... - a virtual indexed aliasing cache ... A simple test is to use an ext2/3 filesystem (cramfs, ...
    (Linux-Kernel)
  • Re: Sysinstall automatic filesystem size generation.
    ... do on our FreeBSD boxes. ... > the cache, before any filesystem data hits the platters). ... > sequence points where one could insert such flushing. ... > intervals, in order to keep the ordering, which then would amount ...
    (freebsd-stable)
  • Re: [PATCH 0/2] pdflush fix and enhancement
    ... forthcoming SSD devices and flushing, ... This opens up a whole new world for cache considerations. ... Once these thresholds are reached, ... we want flushing to reach the minimum dirty threshold as ...
    (Linux-Kernel)