jlaitine opened a new pull request, #15713:
URL: https://github.com/apache/nuttx/pull/15713

   
   ## Summary
   
   We recently found out that it is possible to get memory corruption in 
scratchpad memory area (0x0a000000 ->) by writes to DRAM (0xa0000000). The 
memory corruption looks as if there is an incorrect cache eviction from cache 
way, which is not configured as L2 cache, but as scratchpad memory; even if the 
way is properly locked by the mask register. The corrupted data is always of 
cache line size (64 bytes) and aligned to cache line boundary. Furthermore, the 
content of the corrupted area is 0.
   
   We concluded that if scratchpad is being used, the cache way 0, which is 
automatically enabled at boot, needs to be re-configured as part of scratchpad 
memory. Otherwise there is a possibility of random memory corruption in the 
scratchpad area due to cache eviction from way 0.
   
   By changing the way how cache ways are allocated between L2 cache and 
scratchpad, the random memory corruption stops happening.
   
   ## Impact
   
   Impacts only MPFS platform and corrects some random memory corruption issue 
in l2zerodevice area. Affects only SW, which is using the scratchpad memory 
area (L2 cache ways used as memory instead of cache).
   
   ## Testing
   
   Tested on 3 different custom MPFS250T based HW designs with specifically 
written test SW writing to DRAM area (0xa0000000) and testing memory content in 
scratchpad area (0x0a000000). Also the upstream targets' configurations (icicle 
board and aries som) are updated accordingly.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to