Files
@ d6b9b2ac5869
Branch filter:
Location: vmkdrivers/BLD/build/HEADERS/vmkapi-current-all-public-bincomp/vmkernel64/release/device/vmkapi_vector.h
d6b9b2ac5869
6.4 KiB
text/x-chdr
ESXi-5.5-U2
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 | /* **********************************************************
* Copyright 2008 - 2012 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 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 Interrupt is an entropy source.
*
* Set this if device interrupts contributes to entropy pool.
*/
#define VMK_INTR_ATTRS_ENTROPY_SOURCE (1 << 0)
/**
* \brief Properties for registering the interrupt.
*/
typedef struct vmk_IntrProps {
/** \brief Device registering the interrupt. */
vmk_Device device;
/** \brief Name of the device registering the interrupt. */
vmk_Name deviceName;
/** \brief Interrupt acknowledging function */
vmk_IntrAcknowledge acknowledgeInterrupt;
/** \brief Interrupt handler function. */
vmk_IntrHandler handler;
/** \brief Interrupt handler client data. */
void *handlerData;
/** \brief Interrupt attributes.
*
* Interrupt attributes can be used to specify special attributes
* for a interrupt.
*/
vmk_uint64 attrs;
} vmk_IntrProps;
/** \brief Function to invoke with interrupts disabled. */
typedef void (*vmk_IntrDisabledFunc)(vmk_AddrCookie data);
/*
***********************************************************************
* vmk_IntrRegister -- */ /**
*
* \ingroup Vector
* \brief Register the interrupt with the system.
*
* \note Interrupt sharing is implicitly allowed for level-triggered
* interrupts.
*
* \param[in] moduleID Module registering the interrupt
* \param[in] intrCookie Interrupt cookie to register
* \param[in] props Properties of the interrupt being registered
*
* \retval VMK_BAD_PARAM props is NULL or mal-formed props
* \retval VMK_BAD_PARAM intrCookie is not valid
* \retval VMK_BAD_PARAM Null props->handlerData is specified for
* shared interrupt.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_IntrRegister(vmk_ModuleID moduleID,
vmk_IntrCookie intrCookie,
vmk_IntrProps *props);
/*
***********************************************************************
* vmk_IntrUnregister -- */ /**
*
* \ingroup Vector
* \brief Unregister a previously registered interrupt.
*
* \param[in] moduleID Module that registered interrupt before
* \param[in] intrCookie Interrupt to unregister
* \param[in] handlerData Interrupt handler data that was used while
* registering the interrupt
*
* \retval VMK_BAD_PARAM moduleID is not valid.
* \retval VMK_BAD_PARAM intrCookie is not valid.
* \retval VMK_BAD_PARAM If handlerData is NULL and the interrupt is
* shared.
* \retval VMK_FAILURE handlerData doesn't match with what's
* provided with vmk_IntrRegister().
*
***********************************************************************
*/
VMK_ReturnStatus vmk_IntrUnregister(vmk_ModuleID moduleID,
vmk_IntrCookie intrCookie,
void *handlerData);
/*
***********************************************************************
* vmk_IntrEnable -- */ /**
*
* \ingroup Vector
* \brief Start interrupt delivery. Kernel starts calling interrupt
* handlers registered for this interrupt.
*
* \note The interrupt is unmasked if needed.
*
* \param[in] intrCookie Interrupt that has to be started.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_IntrEnable(vmk_IntrCookie intrCookie);
/*
***********************************************************************
* vmk_IntrDisable -- */ /**
*
* \ingroup Vector
* \brief Stops interrupt delivery.
*
* \note The interrupt is masked if there are no registered handlers
* for this interrupt.
*
* \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] intrCookie Interrupt that has to be stopped.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_IntrDisable(vmk_IntrCookie intrCookie);
/*
***********************************************************************
* vmk_IntrSync -- */ /**
*
* \ingroup Vector
* \brief Blocks, waiting till interrupt is inactive on all CPUs.
*
* \param[in] intrCookie Interrupt to synchronize.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_IntrSync(vmk_IntrCookie intrCookie);
/*
***********************************************************************
* vmk_IntrWithAllDisabledInvoke -- */ /**
*
* \ingroup Vector
* \brief Invokes a function with all interrupts disabled.
*
* \warning The function invoked is not allowed to take more than 5us.
*
* \param[in] moduleID Module implementing function to invoke.
* \param[in] func Function to invoke
* \param[in] data Data to pass to function
*
* \retval VMK_BAD_PARAM moduleID is invalid
* \retval VMK_BAD_PARAM func is invalid
* \retval VMK_OK func was invoked
*
***********************************************************************
*/
VMK_ReturnStatus vmk_IntrWithAllDisabledInvoke(vmk_ModuleID moduleID,
vmk_IntrDisabledFunc func,
vmk_AddrCookie data);
#endif /* _VMKAPI_VECTOR_H_ */
/** @} */
/** @} */
|