tkernel_2/kernel/sysdepend/device/tef_em1d/cache_info.h | bare source | permlink (0.02 seconds) |
1: /* 2: *---------------------------------------------------------------------- 3: * T-Kernel 2.0 Software Package 4: * 5: * Copyright 2011 by Ken Sakamura. 6: * This software is distributed under the latest version of T-License 2.x. 7: *---------------------------------------------------------------------- 8: * 9: * Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17. 10: * Modified by TRON Forum(http://www.tron.org/) at 2015/06/01. 11: * 12: *---------------------------------------------------------------------- 13: */ 14: 15: /* 16: * cache_info.h (EM1-D512) 17: * Cache Information 18: */ 19: 20: #ifndef _CACHE_INFO_ 21: #define _CACHE_INFO_ 22: 23: /* 24: * Set non-cache area memory 25: * When using the control table for non-cache area memory 26: * by memory manager routines, define the address of non-cache area. 27: * 28: * When not using, specify 0 for UseNoCacheMemoryTable. 29: */ 30: #define USE_NOCACHE_MEMTBL (0) /* Do not use */ 31: 32: #define NoCacheMemoryTop (0) /* Top address of non-cache area */ 33: #define NoCacheMemoryEnd (0) /* End address of non-cache area */ 34: 35: /* 36: * Conversion between page number and address 37: * When switching ON/Off of cache by an address, 38: * define the conversion formula for the following Macro: 39: */ 40: #define CachingAddr(p) (p) /* Do not convert */ 41: #define NoCachingAddr(p) (p) 42: 43: /* 44: * Conversion between physical address and logical address of 45: * real memory area (physical space) 46: */ 47: #define toLogicalAddress(paddr) (void*)(paddr) 48: #define toPhysicalAddress(laddr) (void*)(laddr) 49: 50: /* 51: * Convert logical address into logical address of the cache off area 52: */ 53: #define toNoCacheLogicalAddress(laddr) (void*)(laddr) 54: 55: #endif /* _CACHE_INFO_ */