Changeset 437 for soft/giet_vm/giet_drivers/mmc_driver.c
- Timestamp:
- Nov 3, 2014, 10:53:00 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/mmc_driver.c
r426 r437 5 5 // Copyright (c) UPMC-LIP6 6 6 /////////////////////////////////////////////////////////////////////////////////// 7 // The mmc_driver.c and mmc_driver.h files are part ot the GIET-VM nano-kernel.8 // This driver supports the vci_mem_cache component used in the TSAR architecture.9 //10 // This component is replicated in all clusters, and can be accessed through11 // a configuration interface as a set of uncached, memory mapped registers.12 //13 // The (virtual) base address of the associated segment is:14 // SEG_MMC_BASE + cluster_id * PERI_CLUSTER_INCREMENT15 //16 // SEG_MMC_BASE and PERI_CLUSTER_INCREMENT must be defined in hard_config.h.17 ////////////////////////////////////////////////////////////////////////////////18 7 19 8 #include <giet_config.h> … … 82 71 } 83 72 84 /////////////////////////////////////////////////////////////////////////////////// 85 // This function invalidates all cache lines covering a memory buffer defined 86 // by the physical base address, and the length. 87 // The buffer address MSB are used to compute the cluster index. 88 /////////////////////////////////////////////////////////////////////////////////// 73 ///////////////////////////////////////// 89 74 void _mmc_inval( paddr_t buf_paddr, 90 75 unsigned int buf_length ) … … 98 83 if ( (x >= X_SIZE) || (y >= Y_SIZE) ) 99 84 { 100 _printf("\n[GIET ERROR] in _memc_inval() : illegal cluster_xy for paddr %l\n", 101 buf_paddr ); 85 _puts("\n[GIET ERROR] in _memc_inval() : illegal cluster coordinates\n"); 102 86 _exit(); 103 87 } … … 115 99 _mmc_set_register(cluster_xy, 0, MEMC_LOCK, 0); 116 100 } 117 /////////////////////////////////////////////////////////////////////////////////// 118 // This function copies to external RAM all cache lines covering a memory buffer 119 // defined by the physical base address, and the length, if they are dirty. 120 // The buffer address MSB are used to compute the cluster index. 121 /////////////////////////////////////////////////////////////////////////////////// 101 102 /////////////////////////////////////// 122 103 void _mmc_sync( paddr_t buf_paddr, 123 104 unsigned int buf_length ) … … 131 112 if ( (x >= X_SIZE) || (y >= Y_SIZE) ) 132 113 { 133 _printf( "\n[GIET ERROR] in _memc_sync() : illegal cluster_xy for paddr %l\n", 134 buf_paddr ); 114 _puts( "\n[GIET ERROR] in _memc_sync() : illegal cluster coordinates"); 135 115 _exit(); 136 116 } … … 149 129 } 150 130 151 ////////////////////////////////////////////////////////////////////////////////// 152 // This ISR access the vci_mem_cache component to get the faulty physical 153 // address and the associated SRCID. It must also acknowledge the IRQ. 154 // 155 // TODO implement... 156 ////////////////////////////////////////////////////////////////////////////////// 131 /////////////////////////////////////////////////////// 157 132 void _mmc_isr( unsigned int irq_type, // should be HWI 158 133 unsigned int irq_id, // index returned by ICU … … 163 138 unsigned int x = cluster_xy >> Y_WIDTH; 164 139 unsigned int y = cluster_xy & ((1<<Y_WIDTH)-1); 165 unsigned int lpid= gpid & ((1<<P_WIDTH)-1);140 unsigned int p = gpid & ((1<<P_WIDTH)-1); 166 141 167 _printf("[GIET ERROR] MMC IRQ received by processor[%d,%d,%d]" 168 " but _mmc_isr() not implemented...\n", x, y, lpid ); 142 _puts("[GIET ERROR] MMC IRQ received by processor["); 143 _putd( x ); 144 _puts(","); 145 _putd( y ); 146 _puts(","); 147 _putd( p ); 148 _puts("] but _mmc_isr() not implemented\n"); 169 149 } 170 150
Note: See TracChangeset
for help on using the changeset viewer.