Changeset 406 for trunk/hal/tsar_mips32/drivers
- Timestamp:
- Aug 29, 2017, 12:03:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_pic.c
r380 r406 116 116 chdev_t * src_chdev; // pointer on source chdev descriptor 117 117 uint32_t index; // WTI / HWI / PTI index 118 uint32_t ack; // XCU acknowledge requires a read... 119 120 core_t * core = CURRENT_THREAD->core; 118 119 uint32_t * xcu_base = soclib_pic_xcu_base(); 120 121 core_t * core = CURRENT_THREAD->core; 121 122 122 123 // get XCU status … … 126 127 &pti_status ); 127 128 128 irq_dmsg("\n[ INFO] %s : enter for core[%x,%d] / WTI = %x / HWI = %x / WTI = %x\n",129 irq_dmsg("\n[DMSG] %s : enter for core[%x,%d] / WTI = %x / HWI = %x / WTI = %x\n", 129 130 __FUNCTION__ , local_cxy , core->lid , wti_status , hwi_status , pti_status ); 130 131 … … 139 140 assert( (index == core->lid) , __FUNCTION__ , "illegal IPI index" ); 140 141 141 // read mailbox content to acknowledge WTI, 142 uint32_t * base = soclib_pic_xcu_base(); 143 ack = base[(XCU_WTI_REG << 5) | core->lid]; 142 irq_dmsg("\n[DMSG] %s : core[%x,%d] received an IPI / cycle %d\n", 143 __FUNCTION__ , local_cxy , core->lid , hal_time_stamp() ); 144 145 // acknowledge WTI (this require an XCU read) 146 uint32_t ack = xcu_base[(XCU_WTI_REG << 5) | core->lid]; 144 147 145 148 // check RPC FIFO, and activate or create a RPC thread … … 165 168 else // call relevant ISR 166 169 { 167 irq_dmsg("\n[INFO] %s received WTI : index = %d for core %d in cluster%d\n",168 __FUNCTION__ , index , core->lid , local_cxy);170 irq_dmsg("\n[DMSG] %s : core[%x,%d] received external WTI %d / cycle %d\n", 171 __FUNCTION__ , local_cxy , core->lid , index , hal_time_stamp() ); 169 172 170 173 // call ISR … … 189 192 190 193 // disable HWI in local XCU controller 191 uint32_t * base = soclib_pic_xcu_base(); 192 base[(XCU_MSK_HWI_DISABLE << 5) | core->lid] = 1 << core->lid; 194 xcu_base[(XCU_MSK_HWI_DISABLE << 5) | core->lid] = 1 << core->lid; 193 195 } 194 196 else // call relevant ISR 195 197 { 196 irq_dmsg("\n[INFO] %s received HWI : index = %d for core %d in cluster%d\n",197 __FUNCTION__ , index , core->lid , local_cxy);198 irq_dmsg("\n[DMSG] %s : core[%x,%d] received HWI %d / cycle %d\n", 199 __FUNCTION__ , local_cxy , core->lid , index , hal_time_stamp() ); 198 200 199 201 // call ISR … … 206 208 index = pti_status - 1; 207 209 208 irq_dmsg("\n[INFO] %s received PTI : index = %d for cpu %d in cluster%d\n",209 __FUNCTION__ , index , core->lid , local_cxy);210 irq_dmsg("\n[DMSG] %s : core[%x,%d] received PTI %d / cycle %d\n", 211 __FUNCTION__ , core->lid , local_cxy , index , hal_time_stamp() ); 210 212 211 213 assert( (index == core->lid) , __FUNCTION__ , "unconsistent PTI index\n"); 212 214 213 // acknowledge PTI 214 uint32_t * base = soclib_pic_xcu_base(); 215 ack = base[(XCU_PTI_ACK << 5) | core->lid]; 215 // acknowledge PTI (this require a read access to XCU) 216 uint32_t ack = xcu_base[(XCU_PTI_ACK << 5) | core->lid]; 216 217 217 218 // execute all actions related to TICK event 218 core_clock( core ); 219 // condition is always true, but we must use the ack value 220 if( ack + 1 ) core_clock( core ); 219 221 } 220 222 } // end soclib_pic_irq_handler()
Note: See TracChangeset
for help on using the changeset viewer.