Changeset 205 for trunk/kernel/devices
- Timestamp:
- Jul 17, 2017, 11:41:25 AM (7 years ago)
- Location:
- trunk/kernel/devices
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_pic.c
r204 r205 78 78 79 79 // get pointer on extend_init function 80 pic_init_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.extend_init ) );80 extend_init_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.extend_init ) ); 81 81 82 82 // call relevant driver function … … 93 93 94 94 // get pointer on bind_irq function 95 pic_bind_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.bind_irq ) );95 bind_irq_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.bind_irq ) ); 96 96 97 97 // call relevant driver function … … 99 99 } 100 100 101 ///////////////////////////////////// //102 void dev_pic_enable_irq( lid_t 103 chdev_t * src_chdev)101 ///////////////////////////////////// 102 void dev_pic_enable_irq( lid_t lid, 103 xptr_t src_chdev_xp ) 104 104 { 105 105 // get pointer on PIC chdev … … 108 108 109 109 // get pointer on enable_irq function 110 pic_enable_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.enable_irq ) );110 enable_irq_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.enable_irq ) ); 111 111 112 112 // call relevant driver function 113 f( lid , src_chdev );113 f( lid , src_chdev_xp ); 114 114 } 115 115 116 ////////////////////////////////////// //117 void dev_pic_disable_irq( lid_t 118 chdev_t * src_chdev)116 ////////////////////////////////////// 117 void dev_pic_disable_irq( lid_t lid, 118 xptr_t src_chdev_xp ) 119 119 { 120 120 // get pointer on PIC chdev … … 123 123 124 124 // get pointer on disable_irq function 125 pic_disable_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.disable_irq ) );125 disable_irq_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.disable_irq ) ); 126 126 127 127 // call relevant driver function 128 f( lid , src_chdev );128 f( lid , src_chdev_xp ); 129 129 } 130 130 … … 137 137 138 138 // get pointer on enable_timer function 139 pic_timer_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.enable_timer ) );139 enable_timer_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.enable_timer ) ); 140 140 141 141 // call relevant driver function … … 152 152 153 153 // get pointer on send_ipi function 154 pic_ipi_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.send_ipi ) );154 send_ipi_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.send_ipi ) ); 155 155 156 156 // call relevant driver function -
trunk/kernel/devices/dev_pic.h
r201 r205 83 83 ****************************************************************************************/ 84 84 85 typedef void ( pic_bind_t)( lid_t lid , struct chdev_s * src_chdev );86 typedef void ( pic_enable_t) ( lid_t lid , struct chdev_s * src_chdev);87 typedef void ( pic_disable_t) ( lid_t lid , struct chdev_s * src_chdev);88 typedef void ( pic_timer_t)( uint32_t period );89 typedef void ( pic_ipi_t) ( cxy_t cxy , lid_t lid );90 typedef void ( pic_init_t)( uint32_t * lapic_base );85 typedef void (bind_irq_t) ( lid_t lid , struct chdev_s * src_chdev ); 86 typedef void (enable_irq_t) ( lid_t lid , xptr_t src_chdev_xp ); 87 typedef void (disable_irq_t) ( lid_t lid , xptr_t src_chdev_xp ); 88 typedef void (enable_timer_t) ( uint32_t period ); 89 typedef void (send_ipi_t) ( cxy_t cxy , lid_t lid ); 90 typedef void (extend_init_t) ( uint32_t * lapic_base ); 91 91 92 92 typedef struct pic_extend_s 93 93 { 94 pic_bind_t * bind_irq; /*! pointer on the driver "bind_irq" function*/95 pic_enable_t * enable_irq; /*! pointer on the driver "enable_irq" function*/96 pic_disable_t * disable_irq; /*! pointer on the driver "disable_irq" function*/97 pic_timer_t * enable_timer; /*! pointer on the driver "enable_timer" function*/98 pic_ipi_t * send_ipi; /*! pointer on the driver "send_ipi" function*/99 pic_init_t * extend_init; /*! pointer on the driver "init_extend" function*/94 bind_irq_t * bind_irq; /*! pointer on the driver "bind_irq" function */ 95 enable_irq_t * enable_irq; /*! pointer on the driver "enable_irq" function */ 96 disable_irq_t * disable_irq; /*! pointer on the driver "disable_irq" function */ 97 enable_timer_t * enable_timer; /*! pointer on the driver "enable_timer" function */ 98 send_ipi_t * send_ipi; /*! pointer on the driver "send_ipi" function */ 99 extend_init_t * extend_init; /*! pointer on the driver "init_extend" function */ 100 100 } 101 101 pic_extend_t; 102 102 103 /***************************************************************************************** *103 /***************************************************************************************** 104 104 * This structure defines the input IRQS for the external IOPIC controller, that is used 105 105 * by external peripherals (IOC, NIC, TXT, etc.) to signal completion of an I/O operation. … … 186 186 187 187 /***************************************************************************************** 188 * This function disables the IRQ generated by a local chdev, defined by the <src_chdev> 189 * argument. It can be used for both internal & external IRQs. 190 ***************************************************************************************** 191 * @ lid : target core local index. 192 * @ src_chdev : local pointer on source chdev descriptor. 193 ****************************************************************************************/ 194 void dev_pic_disable_irq( lid_t lid, 195 struct chdev_s * src_chdev ); 196 197 /***************************************************************************************** 198 * This function enables the IRQ generated by a local chdev, defined by the <src_chdev> 199 * argument. It can be used for both internal & external IRQs. 200 ***************************************************************************************** 201 * @ lid : target core local index. 202 * @ src_chdev : local pointer on source chdev descriptor. 203 ****************************************************************************************/ 204 void dev_pic_enable_irq( lid_t lid, 205 struct chdev_s * src_chdev ); 188 * This function enables remote IRQ generated by a remote chdev, defined by the 189 * <src_chdev_xp> argument. It can be called by any thread running in any cluster, 190 * and can be used for both internal & external IRQs. 191 ***************************************************************************************** 192 * @ lid : target core local index (in cluster containing the source chdev). 193 * @ src_chdev_xp : extended pointer on source chdev descriptor. 194 ****************************************************************************************/ 195 void dev_pic_enable_irq( lid_t lid, 196 xptr_t src_chdev_xp ); 197 198 /***************************************************************************************** 199 * This function disables remote IRQ generated by a remote chdev, defined by the 200 * <src_chdev_xp> argument. It can be called by any thread running in any cluster, 201 * and can be used for both internal & external IRQs. 202 ***************************************************************************************** 203 * @ lid : target core local index (in cluster containing the source chdev). 204 * @ src_chdev_xp : extended pointer on sour chdev descriptor. 205 ****************************************************************************************/ 206 void dev_pic_disable_irq( lid_t lid, 207 xptr_t src_chdev_xp ); 206 208 207 209 /*****************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.