/////////////////////////////////////////////////////////////////////////////////// // File : pic_driver.h // Date : 05/03/2014 // Author : alain greiner // Copyright (c) UPMC-LIP6 /////////////////////////////////////////////////////////////////////////////////// // The pic_driver.c and pic_drivers.h files are part ot the GIET-VM kernel. // This driver supports the SocLib vci_iopic component. // // The SEG_PIC_BASE address must be defined in hard_config.h file. /////////////////////////////////////////////////////////////////////////////////// #ifndef _GIET_PIC_DRIVERS_H_ #define _GIET_PIC_DRIVERS_H_ /////////////////////////////////////////////////////////////////////////////////// // registers offsets /////////////////////////////////////////////////////////////////////////////////// enum PIC_registers { IOPIC_ADDRESS = 0, IOPIC_EXTEND = 1, IOPIC_STATUS = 2, IOPIC_MASK = 3, /**/ IOPIC_SPAN = 4, }; ////////////////////////////////////////////////////////////////////////////////// // access functions ////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // This function initializes the XICU target physical address (vaddr + extend) // corresponding to a given HWI channel. ///////////////////////////////////////////////////////////////////////////////// extern void _pic_init( unsigned int channel, // source PIC HWI channel unsigned int vaddr, // dest XCU WTI address unsigned int extend ); // dest XCU cluster_xy ///////////////////////////////////////////////////////////////////////////////// // This function returns the status of a given HWI channel. ///////////////////////////////////////////////////////////////////////////////// extern unsigned int _pic_get_status( unsigned int channel ); /////////////////////////////////////////////////////////////////////////////////// // low-level access functions /////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // This low level function returns the value of register (channel / index) ///////////////////////////////////////////////////////////////////////////////// extern unsigned int _pic_get_register( unsigned int channel, unsigned int index ); ///////////////////////////////////////////////////////////////////////////////// // This low level function set a new value in register (channel / index) ///////////////////////////////////////////////////////////////////////////////// extern void _pic_set_register( unsigned int channel, unsigned int index, unsigned int value ); #endif // Local Variables: // tab-width: 4 // c-basic-offset: 4 // c-file-offsets:((innamespace . 0)(inline-open . 0)) // indent-tabs-mode: nil // End: // vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4