Changeset 568 for trunk/softs/tsar_boot/src/boot_ioc.c
- Timestamp:
- Oct 30, 2013, 11:19:23 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/softs/tsar_boot/src/boot_ioc.c
r554 r568 145 145 // SOCLIB version of the boot_ioc_read function 146 146 147 void boot_buf_invalidate ( 148 const void * buffer, 149 unsigned int line_size, 150 unsigned int size); 151 152 void boot_mcc_invalidate ( 153 const void * buffer, 154 unsigned int size); 155 147 156 int boot_ioc_read(unsigned int lba, void* buffer, unsigned int count) 148 157 { … … 179 188 _boot_ioc_completed(); 180 189 181 #if (CACHE_COHERENCE == 0) 182 boot_dbuf_invalidate(buffer, CACHE_LINE_SIZE, count * 512); 190 #if (CACHE_COHERENCE == 0) || (USE_IOB == 1) 191 boot_buf_invalidate(buffer, CACHE_LINE_SIZE, count * 512); 192 #endif 193 194 #if (USE_IOB == 1) 195 boot_mcc_invalidate(buffer, count * 512); 183 196 #endif 184 197 … … 252 265 * buffer (identified by an address and a size). 253 266 */ 254 #if (CACHE_COHERENCE == 0) 255 void boot_ dbuf_invalidate (267 #if (CACHE_COHERENCE == 0) || (USE_IOB == 1) 268 void boot_buf_invalidate ( 256 269 const void * buffer, 257 270 unsigned int line_size, … … 271 284 #endif 272 285 286 /** 287 * boot_mcc_inval() 288 * 289 * Invalidate all data cache lines corresponding to a memory 290 * buffer (identified by an address and a size). 291 */ 292 #if (USE_IOB == 1) 293 void boot_mcc_invalidate ( 294 const void * buffer, 295 unsigned int size) 296 { 297 unsigned int * mcc_address = (unsigned int *)MCC_BASE; 298 299 // get the hard lock assuring exclusive access to MEMC 300 while (ioread32(&mcc_address[MCC_LOCK])); 301 302 // write invalidate paremeters on the memory cache 303 // this preloader use only the cluster 0 and then the HI bits are not used 304 305 iowrite32(&mcc_address[MCC_ADDR_LO], (unsigned int) buffer); 306 iowrite32(&mcc_address[MCC_ADDR_HI], (unsigned int) 0); 307 iowrite32(&mcc_address[MCC_LENGTH] , (unsigned int) size); 308 iowrite32(&mcc_address[MCC_CMD] , (unsigned int) MCC_CMD_INVAL); 309 310 // release the lock protecting MEMC 311 iowrite32(&mcc_address[MCC_LOCK], (unsigned int) 0); 312 } 313 #endif 314 273 315 /* 274 316 * vim: tabstop=4 : shiftwidth=4 : expandtab
Note: See TracChangeset
for help on using the changeset viewer.