📄 cache.c
字号:
/* *---------------------------------------------------------------------- * T-Kernel * * Copyright (C) 2004-2006 by Ken Sakamura. All rights reserved. * T-Kernel is distributed under the T-License. *---------------------------------------------------------------------- * * Version: 1.02.02 * Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/9. * *---------------------------------------------------------------------- *//* * cache.c (M32104) * Cache Operation */#include <basic.h>#include <tk/tkernel.h>#include <tk/sysdef.h>/* * Cache flush * Flush cache between 'laddr' and 'len' bytes areas. * Writeback and disable cache */EXPORT void FlushCacheM( VP laddr, INT len, UINT mode ){ UINT imask; UW mccr = 0; if ( (mode & TCM_ICACHE) != 0 ) { mccr |= CC_IIV; } if ( (mode & TCM_DCACHE) != 0 ) { mccr |= CC_DCB|CC_DIV; } DI(imask); /* Instruction and data cache are controlled at the same time. */ *(_UW*)CC_MCCR |= mccr; EI(imask);}EXPORT void FlushCache( VP laddr, INT len ){ FlushCacheM(laddr, len, TCM_ICACHE|TCM_DCACHE);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -