Changeset 196 for trunk/hal/x86_64/drivers/soclib_pic.h
- Timestamp:
- Jul 13, 2017, 12:35:48 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.