This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 63fd08737 pic32: Change default cache mode to write-through
63fd08737 is described below

commit 63fd08737c07e97123cbce91b81a7f9816643704
Author: Jerzy Kasenberg <jerzy.kasenb...@codecoup.pl>
AuthorDate: Mon Sep 19 23:23:23 2022 +0200

    pic32: Change default cache mode to write-through
    
    Write-back-allocate, while slightly more efficient, makes finding
    some errors very hard to find, when place of crash is connected
    to actual invalid address by cache line only.
    
    Write-back-allocate is not really working correct with LWIP stack
    where frames from ETH PHY are received by DMA no CPU.
    This problem may be addressed later, for now code switches
    to write-through.
---
 kernel/os/src/arch/pic32/stubs/pic32_init_cache.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/os/src/arch/pic32/stubs/pic32_init_cache.S 
b/kernel/os/src/arch/pic32/stubs/pic32_init_cache.S
index a65f5c2a5..19d7049a7 100644
--- a/kernel/os/src/arch/pic32/stubs/pic32_init_cache.S
+++ b/kernel/os/src/arch/pic32/stubs/pic32_init_cache.S
@@ -55,7 +55,7 @@
 #endif
 
 /* Set __PIC32_CACHE_MODE to the desired coherency attribute */
-#define __PIC32_CACHE_MODE _CACHE_WRITEBACK_WRITEALLOCATE
+#define __PIC32_CACHE_MODE _CACHE_WRITETHROUGH_WRITEALLOCATE
 
 /* ==================================== */
 #define Index_Store_Tag_I 0x08

Reply via email to