- Timestamp:
- Oct 30, 2013, 11:19:23 AM (11 years ago)
- Location:
- trunk/softs/tsar_boot
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/softs/tsar_boot/README.txt
r554 r568 15 15 This file is mandatory. This file defines the 16 16 NB_PROCS per cluster, the NB_CLUSTERS and the base address of 17 the TTY, IOC and XICUdevices.17 the TTY, IOC, XICU and MEMC (config) devices. 18 18 It defines also: 19 20 -> USE_IOB 21 This constant is used by the boot_ioc_read function to know 22 if the buffer used to store the blocks from the 23 block_device must be invalidated in the memory cache after 24 the transfert has finished. 19 25 20 26 -> CACHE_COHERENCE … … 25 31 26 32 -> CACHE_LINE_SIZE 27 This constant is mandatory if CACHE_COHERENCE=0 33 This constant is mandatory if CACHE_COHERENCE=0 or USE_IOB=1 28 34 This constant defines the size in bytes of a cache line. 29 35 … … 55 61 seg_stack_base: Base address of the stack used by processor 0 56 62 during the boot process. read-write data and bss will also 57 63 be there. 58 64 59 65 seg_boot_base: Base address of the code and read-only data 60 66 defined for this loader 61 67 62 68 Makefile Makefile for compile the boot loader. -
trunk/softs/tsar_boot/conf/platform_fpga_de2-115/defs_platform.h
r425 r568 4 4 #define IRQ_PER_PROC 1 5 5 6 #define USE_IOB 0 6 7 #define CACHE_COHERENCE 1 7 8 #define CACHE_LINE_SIZE 64//bytes … … 13 14 #define TTY_BASE 0xFC000000 14 15 #define ICU_BASE 0xFD000000 16 #define MCC_BASE 0xFFFFFFFF // not used 15 17 16 18 /* Mandatory argument only for FPGA platforms */ -
trunk/softs/tsar_boot/conf/platform_tsarv4_mono_mmu_ioc/defs_platform.h
r416 r568 4 4 #define IRQ_PER_PROC 1 5 5 6 #define USE_IOB 0 6 7 #define CACHE_COHERENCE 1 7 8 #define CACHE_LINE_SIZE 64 // bytes (ie 16 x 32-bit word) … … 13 14 #define ICU_BASE 0x30000000 14 15 #define IOC_BASE 0x40000000 16 #define MCC_BASE 0xFFFFFFFF // not used -
trunk/softs/tsar_boot/conf/platform_vgsb_xicu_mmu/defs_platform.h
r425 r568 4 4 #define IRQ_PER_PROC 1 5 5 6 #define USE_IOB 0 6 7 #define CACHE_COHERENCE 0 7 8 #define CACHE_LINE_SIZE 16//bytes … … 13 14 #define IOC_BASE 0x00F10000 14 15 #define TTY_BASE 0x00F20000 16 #define MCC_BASE 0xFFFFFFFF //not used -
trunk/softs/tsar_boot/include/boot_ioc.h
r412 r568 7 7 #else 8 8 #include <block_device.h> 9 #include <mcc.h> 9 10 #endif 10 11 -
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.