Changeset 196
- Timestamp:
- Jul 13, 2017, 12:35:48 PM (7 years ago)
- Location:
- trunk/hal
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_drivers.c
r190 r196 27 27 #include <soclib_tty.h> 28 28 #include <soclib_xcu.h> 29 #include <soclib_pic.h> 29 30 30 31 void hal_drivers_txt_init(chdev_t *dev) … … 57 58 { 58 59 /* update the PIC chdev extension */ 59 pic->ext.pic.enable_timer = &soclib_pic_enable_timer;60 pic->ext.pic.enable_irq = &soclib_pic_enable_irq;61 pic->ext.pic.disable_irq = &soclib_pic_disable_irq;62 pic->ext.pic.bind_irq = &soclib_pic_bind_irq;63 pic->ext.pic.send_ipi = &soclib_pic_send_ipi;64 pic->ext.pic.extend_init = &soclib_pic_extend_init;60 dev->ext.pic.enable_timer = &soclib_pic_enable_timer; 61 dev->ext.pic.enable_irq = &soclib_pic_enable_irq; 62 dev->ext.pic.disable_irq = &soclib_pic_disable_irq; 63 dev->ext.pic.bind_irq = &soclib_pic_bind_irq; 64 dev->ext.pic.send_ipi = &soclib_pic_send_ipi; 65 dev->ext.pic.extend_init = &soclib_pic_extend_init; 65 66 } -
trunk/hal/x86_64/core/hal_drivers.c
r190 r196 27 27 #include <soclib_tty.h> 28 28 #include <soclib_xcu.h> 29 #include <soclib_pic.h> 29 30 30 31 void hal_drivers_txt_init(chdev_t *dev) … … 57 58 { 58 59 /* update the PIC chdev extension */ 59 /* TODO 60 pic->ext.pic.enable_timer = &soclib_pic_enable_timer; 61 pic->ext.pic.enable_irq = &soclib_pic_enable_irq; 62 pic->ext.pic.disable_irq = &soclib_pic_disable_irq; 63 pic->ext.pic.bind_irq = &soclib_pic_bind_irq; 64 pic->ext.pic.send_ipi = &soclib_pic_send_ipi; 65 pic->ext.pic.extend_init = &soclib_pic_extend_init; 66 */ 60 dev->ext.pic.enable_timer = &soclib_pic_enable_timer; 61 dev->ext.pic.enable_irq = &soclib_pic_enable_irq; 62 dev->ext.pic.disable_irq = &soclib_pic_disable_irq; 63 dev->ext.pic.bind_irq = &soclib_pic_bind_irq; 64 dev->ext.pic.send_ipi = &soclib_pic_send_ipi; 65 dev->ext.pic.extend_init = &soclib_pic_extend_init; 67 66 } 68 67 -
trunk/hal/x86_64/drivers/soclib_pic.c
r76 r196 30 30 #include <vfs.h> 31 31 32 void soclib_pic_init( chdev_t * chdev)32 void soclib_pic_init( chdev_t * pic ) 33 33 { 34 34 x86_panic((char *)__func__); 35 35 } 36 36 37 void soclib_pic_bind_irq( xptr_t dev_xp, 38 uint32_t irq_id, 39 xptr_t xp_wti ) 37 void soclib_pic_extend_init( uint32_t * xcu_base ) 40 38 { 41 39 x86_panic((char *)__func__); 42 40 } 43 41 44 void soclib_pic_ unbind_irq( xptr_t dev_xp,45 uint32_t irq_id)42 void soclib_pic_bind_irq( lid_t lid, 43 chdev_t * src_chdev ) 46 44 { 47 45 x86_panic((char *)__func__); 48 46 } 49 47 50 void soclib_pic_get_status( xptr_t dev_xp, 51 uint32_t irq_id, 52 uint32_t * status) 48 void soclib_pic_enable_irq( lid_t lid, 49 chdev_t * src_chdev ) 53 50 { 54 51 x86_panic((char *)__func__); 55 52 } 56 53 54 void soclib_pic_disable_irq( lid_t lid, 55 chdev_t * src_chdev ) 56 { 57 x86_panic((char *)__func__); 58 } 59 60 void soclib_pic_enable_timer( uint32_t period ) 61 { 62 x86_panic((char *)__func__); 63 } 64 65 void soclib_pic_send_ipi( cxy_t cxy, 66 lid_t lid ) 67 { 68 x86_panic((char *)__func__); 69 } -
trunk/hal/x86_64/drivers/soclib_pic.h
r75 r196 27 27 #include <hal_types.h> 28 28 29 /****************************************************************************************** 30 * PIC register offsets (per input IRQ) 31 *****************************************************************************************/ 29 void soclib_pic_init( chdev_t * pic ); 30 void soclib_pic_extend_init( uint32_t * xcu_base ); 31 void soclib_pic_bind_irq( lid_t lid, 32 chdev_t * src_chdev ); 33 void soclib_pic_enable_irq( lid_t lid, 34 chdev_t * src_chdev ); 35 void soclib_pic_disable_irq( lid_t lid, 36 chdev_t * src_chdev ); 37 void soclib_pic_enable_timer( uint32_t period ); 32 38 33 #define IOPIC_ADDRESS 0 34 #define IOPIC_EXTEND 1 35 #define IOPIC_STATUS 2 36 #define IOPIC_MASK 3 37 #define IOPIC_SPAN 4 38 39 /****************************************************************************************** 40 * This blocking function desactivates all input IRQs in PIC controler. 41 * It must be called by a local thread. 42 ****************************************************************************************** 43 * @ chdev : pointer on PIC chdev descriptor. 44 *****************************************************************************************/ 45 void soclib_pic_init( chdev_t * chdev ); 46 47 /****************************************************************************************** 48 * This blocking function returns the status for a given input IRQ in the remote 49 * PIC controler. It can be called by any thread running on any cluster. 50 ****************************************************************************************** 51 * @ dev_xp : extended pointer on the PIC device descriptor. 52 * @ irq_id : input IRQ index. 53 * @ status : pointer on local buffer for returned status. 54 *****************************************************************************************/ 55 void soclib_pic_get_status( xptr_t dev_xp, 56 uint32_t irq_id, 57 uint32_t * status ); 58 59 /****************************************************************************************** 60 * This blocking function unmask an input IRQ in a remote PIC controler, and bind it 61 * with a WTI mailbox, by registering the WTI mailbox extended pointer. 62 * It can be called by any thread running on any cluster. 63 ****************************************************************************************** 64 * @ dev_xp : extended pointer on the PIC device descriptor. 65 * @ irq_id : input IRQ index. 66 * @ xp_wti : extended pointer on the WTI mailbox. 67 *****************************************************************************************/ 68 void soclib_pic_bind_irq( xptr_t dev_xp, 69 uint32_t irq_id, 70 xptr_t wti_xp ); 71 72 /****************************************************************************************** 73 * This blocking function mask an input IRQ in a remote PIC controler. 74 * It can be called by any thread running on any cluster. 75 ****************************************************************************************** 76 * @ dev_xp : extended pointer on the PIC device descriptor. 77 * @ irq_id : input IRQ index. 78 *****************************************************************************************/ 79 void soclib_pic_unbind_irq( xptr_t dev_xp, 80 uint32_t irq_id ); 81 39 void soclib_pic_send_ipi( cxy_t cxy, 40 lid_t lid ); 82 41 83 42 #endif /* _SOCLIB_IOPIC_H_ */
Note: See TracChangeset
for help on using the changeset viewer.