cache.c
来自「T-Engine源代码 基于ARM9平台」· C语言 代码 · 共 41 行
C
41 行
/* *---------------------------------------------------------------------- * T-Kernel * * Copyright (C) 2004-2008 by Ken Sakamura. All rights reserved. * T-Kernel is distributed under the T-License. *---------------------------------------------------------------------- * * Version: 1.02.04 * Released by T-Engine Forum(http://www.t-engine.org) at 2008/02/29. * *---------------------------------------------------------------------- *//* * cache.c (S1C38K) * Cache Operation */#include <basic.h>#include <tk/tkernel.h>/* * Flush the whole memory cache * Need to flush cache every time mapping of the logical address and * the physical address changes because this cache is identified by the * logical address(Cache coherency is not guaranteed on hardware). */EXPORT void FlushCache( VP laddr, INT len ){ Asm("mcr p15, 0, %0, cr7, c7, 0":: "r"(0));}EXPORT void FlushCacheM( VP laddr, INT len, UINT mode ){ /* Ignore 'mode', because of unified cache, which stores both instructions and data */ FlushCache(laddr, len);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?