Sfoglia il codice sorgente

!366 修复D1无效dcache的bug
Merge pull request !366 from 胡自成/smart-d1

bernard 4 anni fa
parent
commit
42c9601a97
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      libcpu/risc-v/t-head/c906/cache.c

+ 4 - 4
libcpu/risc-v/t-head/c906/cache.c

@@ -124,14 +124,14 @@ void rt_hw_cpu_dcache_ops(int ops,void *addr,int size)
 
 void rt_hw_cpu_dcache_clean_all(void)
 {
-    /* asm volatile("dcache.ciall\n":::"memory"); */
-    asm volatile(".long 0x0030000b\n":::"memory");
+    /* asm volatile("dcache.call\n":::"memory"); */
+    asm volatile(".long 0x0010000b\n":::"memory");
 }
 
 void rt_hw_cpu_dcache_invalidate_all(void)
 {
-    /* asm volatile("dcache.iall\n":::"memory"); */
-    asm volatile(".long 0x0020000b\n":::"memory");
+    /* asm volatile("dcache.ciall\n":::"memory"); */
+    asm volatile(".long 0x0030000b\n":::"memory");
 }
 
 void rt_hw_cpu_icache_invalidate_all(void)