diff options
| author | kontais <[email protected]> | 2016-06-15 08:09:56 -0700 |
|---|---|---|
| committer | kontais <[email protected]> | 2016-06-15 08:09:56 -0700 |
| commit | b96f07e47712606b59b6165d3923406aef0f9db3 (patch) | |
| tree | 00609907eee522e94d56cf6e4f7929910297a320 /libcpu/mips | |
| parent | 99481cd0ac55c52d4023c50175766a18cefa7064 (diff) | |
flush cache after exception code install
Diffstat (limited to 'libcpu/mips')
| -rw-r--r-- | libcpu/mips/loongson_1b/cache.c | 4 | ||||
| -rw-r--r-- | libcpu/mips/loongson_1c/cache.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libcpu/mips/loongson_1b/cache.c b/libcpu/mips/loongson_1b/cache.c index 9b3dfde44d..842f392cb7 100644 --- a/libcpu/mips/loongson_1b/cache.c +++ b/libcpu/mips/loongson_1b/cache.c @@ -13,6 +13,7 @@ * 2011-08-08 lgnq modified for LS1B */ +#include <rtthread.h> #include "../common/mipsregs.h" #define K0BASE 0x80000000 @@ -23,6 +24,7 @@ extern void Invalidate_Icache_Ls1b(unsigned int); extern void Invalidate_Dcache_ClearTag_Ls1b(unsigned int); extern void Invalidate_Dcache_Fill_Ls1b(unsigned int); extern void Writeback_Invalidate_Dcache(unsigned int); +extern void enable_cpu_cache(void); typedef struct cacheinfo_t { @@ -151,7 +153,7 @@ void invalidate_dcache_all(void) unsigned int end = (start + pcacheinfo->dcache_size); while (start <end) { - Invalidate_Dcache_Fill_Gc3210I(start); + Invalidate_Dcache_Fill_Ls1b(start); start += pcacheinfo->icacheline_size; } } diff --git a/libcpu/mips/loongson_1c/cache.c b/libcpu/mips/loongson_1c/cache.c index 79ab5308d2..bf97db9b4e 100644 --- a/libcpu/mips/loongson_1c/cache.c +++ b/libcpu/mips/loongson_1c/cache.c @@ -14,6 +14,7 @@ * 2015-07-08 chinesebear modified for loongson 1c */ +#include <rtthread.h> #include "../common/mipsregs.h" #define K0BASE 0x80000000 @@ -24,6 +25,7 @@ extern void Invalidate_Icache_Ls1c(unsigned int); extern void Invalidate_Dcache_ClearTag_Ls1c(unsigned int); extern void Invalidate_Dcache_Fill_Ls1c(unsigned int); extern void Writeback_Invalidate_Dcache(unsigned int); +extern void enable_cpu_cache(void); typedef struct cacheinfo_t { @@ -152,7 +154,7 @@ void invalidate_dcache_all(void) unsigned int end = (start + pcacheinfo->dcache_size); while (start <end) { - Invalidate_Dcache_Fill_Gc3210I(start); + Invalidate_Dcache_Fill_Ls1c(start); start += pcacheinfo->icacheline_size; } } |
