Files
@ d0a14f973771
Branch filter:
Location: vmkdrivers/BLD/build/HEADERS/vmkapi-current-all-public/vmkernel64/release/device/vmkapi_vector.h
d0a14f973771
7.1 KiB
text/x-chdr
ESXi-5.0-U1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | /* **********************************************************
* Copyright 2008 - 2009 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Please consult with the VMKernel hardware and core teams before making any
* binary incompatible changes to this file!
*/
/*
* @VMKAPIMOD_LICENSE@
*/
/*
***********************************************************************
* Vector */ /**
* \addtogroup Device
* @{
* \defgroup Vector Interrupt Vector Interfaces
* @{
***********************************************************************
*/
#ifndef _VMKAPI_VECTOR_H_
#define _VMKAPI_VECTOR_H_
/** \cond never */
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
#error This vmkapi file should never be included directly but only via vmkapi.h
#endif
/** \endcond never */
/**
* \brief Options for adding the handler
*/
typedef struct vmk_VectorAddHandlerOptions {
/** \brief Vector is shared */
vmk_Bool sharedVector;
/** \brief Vector is an entroy source */
vmk_Bool entropySource;
} vmk_VectorAddHandlerOptions;
/*
***********************************************************************
* vmk_AddInterruptHandler -- */ /**
*
* \ingroup Vector
* \brief Add interrupt handler for vector
*
* \param[in] vector Vector to add the handler for
* \param[in] deviceName Name the driver wants use with the request
* \param[in] handler Interrupt handler
* \param[in] callbackArg Callback argument passed to the handler
* for shared interrupt, callbackArg shall be
* non-NULL and is used identify the callers
* sharing the vector.
* \param[in] options Specifies how the vector should be used
* (shared vector, entropy source etc.)
*
* \retval VMK_BAD_PARAM If vector is not a valid device vector
* \retval VMK_BAD_PARAM Null callbackArg is specified for
* shared vectors.
* \retval VMK_BUSY If request to add as non-shared and the vector
* is already shared
*
***********************************************************************
*/
VMK_ReturnStatus vmk_AddInterruptHandler(vmk_uint32 vector,
const char *deviceName,
vmk_InterruptHandler handler,
void *callbackArg,
vmk_VectorAddHandlerOptions *options);
/*
***********************************************************************
* vmk_RemoveInterruptHandler -- */ /**
*
* \ingroup Vector
* \brief Remove a previously established interrupt handler for vector
*
* \param[in] vector Vector for which to remove the handler.
* \param[in] callbackArg Callback argument that was passed
* while adding the handler.
*
* \retval VMK_BAD_PARAM If callbackArg is NULL and the vector is shared.
* \retval VMK_BAD_PARAM If vector is not a valid device vector
*
***********************************************************************
*/
VMK_ReturnStatus vmk_RemoveInterruptHandler(vmk_uint32 vector,
void *callbackArg);
/*
***********************************************************************
* vmk_VectorEnable -- */ /**
*
* \ingroup Vector
* \brief Sets up the vector for delivery of interrupts and unmasks the
* vector.
*
* \param[in] vector Vector to enable.
* Depending on the interrupt type, vector may
* always be enabled. (It is not possible
* to enable/disable VMK_INTERRUPT_TYPE_PCI_MSI
* vectors if the device does not support
* per vector masking.)
*
***********************************************************************
*/
VMK_ReturnStatus vmk_VectorEnable(vmk_uint32 vector);
/*
***********************************************************************
* vmk_VectorDisable -- */ /**
*
* \ingroup Vector
* \brief Masks the vector and disables interrupt delivery.
*
* \warning This API should not be used for indefinite periods for
* shared interrupts as this will block interrupts for other
* devices that may share the same interrupt line.
*
* \param[in] vector Vector to disable.
* Depending on the interrupt type, vector will
* always be enabled. (It is not possible
* to enable/disable VMK_INTERRUPT_TYPE_PCI_MSI
* vectors if the device does not support
* per vector masking.)
*
***********************************************************************
*/
VMK_ReturnStatus vmk_VectorDisable(vmk_uint32 vector);
/*
***********************************************************************
* vmk_VectorSync -- */ /**
*
* \ingroup Vector
* \brief Blocks, waiting till vector is inactive on all CPUs.
*
* \param[in] vector Vector to synchronize.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_VectorSync(vmk_uint32 vector);
/*
***********************************************************************
* vmk_VectorChipsetDisable -- */ /**
*
* \ingroup Vector
* \brief Masks given vector at the Chipset level.
*
* \warning This API should not be used for indefinite periods for shared
* interrupts as this will block interrupts for other devices that
* may share the same interrupt line. Specifically, if there is a
* device specific method for masking/unmasking interrupts, that
* should be preferred over this API. This API is currently
* provided for masking exclusive interrupts (such as MSI) in a
* device independent manner.
*
* \note This vector should already have been setup using
* vmk_VectorEnable.
*
* \param[in] vector Vector to mask
*
***********************************************************************
*/
void vmk_VectorChipsetDisable (vmk_uint32 vector);
/*
***********************************************************************
* vmk_VectorChipsetEnable -- */ /**
*
* \ingroup Vector
* \brief Unmasks the given vector at the Chipset level.
*
* \warning If there is a device specific method for masking/unmasking
* interrupts, that should be preferred over this API. This API
* is currently provided for masking/unmasking exclusive
* interrupts(such as MSI) in a device independent manner.
*
* \note This vector should already have been setup using vmk_VectorEnable.
*
* \param[in] vector Vector to unmask
*
***********************************************************************
*/
void vmk_VectorChipsetEnable (vmk_uint32 vector);
#endif /* _VMKAPI_VECTOR_H_ */
/** @} */
/** @} */
|