⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cache.c

📁 使用广泛的日本著名的开源嵌入式实时操作系统T-Kernel的源码
💻 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 (MB87Q1100) *	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, c5, 0		\n"	"  0:	mrc	p15, 0, r15, cr7, c14, 3	\n"	"	bne	0b				"		:: "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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -