Changeset 166 for soft/giet_vm/sys/common.c
- Timestamp:
- Jul 6, 2012, 10:13:16 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/sys/common.c
r165 r166 112 112 unsigned int line_size; 113 113 114 /* 115 * compute data cache line size based on config register (bits 12:10) 116 */ 114 // compute data cache line size based on config register (bits 12:10) 117 115 asm volatile("mfc0 %0, $16, 1" : "=r"(tmp)); 118 116 tmp = ((tmp>>10) & 0x7); 119 117 line_size = 2 << tmp; 120 118 121 / * iterate on cache lines to invalidate each one of them */119 // iterate on cache lines 122 120 for (i = 0; i < size; i += line_size) 123 121 { … … 160 158 val /= 16; 161 159 } 160 } 161 /////////////////////////////////////////////////////////////////////////////////// 162 // _get_ptpr() 163 // Access CP2 and returns PTPR register. 164 /////////////////////////////////////////////////////////////////////////////////// 165 inline unsigned int _get_ptpr() 166 { 167 unsigned int ret; 168 asm volatile("mfc2 %0, $0" : "=r"(ret)); 169 return ret; 162 170 } 163 171 ///////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.