Changeset 28425 in vbox for trunk/include
- Timestamp:
- Apr 16, 2010 6:06:35 PM (15 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmapi.h
r27254 r28425 36 36 37 37 #include <VBox/types.h> 38 #include <VBox/sup.h> 38 39 39 40 RT_C_DECLS_BEGIN … … 57 58 VMMDECL(bool) PDMVMMDevHeapIsEnabled(PVM pVM); 58 59 59 #ifdef IN_RING3 60 60 61 /** @defgroup grp_pdm_r3 The PDM Host Context Ring-3 API 61 62 * @ingroup grp_pdm … … 129 130 VMMR3DECL(void) PDMR3ReleaseOwnedLocks(PVM pVM); 130 131 /** @} */ 131 #endif132 132 133 133 134 #ifdef IN_RC 135 /** @defgroup grp_pdm_ gc The PDM GuestContext API134 135 /** @defgroup grp_pdm_rc The PDM Raw-Mode Context API 136 136 * @ingroup grp_pdm 137 137 * @{ 138 138 */ 139 139 /** @} */ 140 #endif 140 141 142 143 /** @defgroup grp_pdm_r0 The PDM Ring-0 Context API 144 * @ingroup grp_pdm 145 * @{ 146 */ 147 148 /** 149 * Request buffer for PDMR0DriverCallReqHandler / VMMR0_DO_PDM_DRIVER_CALL_REQ_HANDLER. 150 * @see PDMR0DriverCallReqHandler. 151 */ 152 typedef struct PDMDRIVERCALLREQHANDLERREQ 153 { 154 /** The header. */ 155 SUPVMMR0REQHDR Hdr; 156 /** The driver instance. */ 157 PPDMDRVINSR0 pDrvInsR0; 158 /** The operation. */ 159 uint32_t uOperation; 160 /** Explicit alignment padding. */ 161 uint32_t u32Alignment; 162 /** Optional 64-bit integer argument. */ 163 uint64_t u64Arg; 164 } PDMDRIVERCALLREQHANDLERREQ; 165 /** Pointer to a PDMR0DriverCallReqHandler / VMMR0_DO_PDM_DRIVER_CALL_REQ_HANDLER 166 * request buffer. */ 167 typedef PDMDRIVERCALLREQHANDLERREQ *PPDMDRIVERCALLREQHANDLERREQ; 168 169 VMMR0_INT_DECL(int) PDMR0DriverCallReqHandler(PVM pVM, PPDMDRIVERCALLREQHANDLERREQ pReq); 170 171 /** @} */ 141 172 142 173 RT_C_DECLS_END -
trunk/include/VBox/pdmcommon.h
r26001 r28425 136 136 typedef FNPDMDRVASYNCNOTIFY *PFNPDMDRVASYNCNOTIFY; 137 137 138 /** 139 * The ring-0 driver request handle. 140 * 141 * @returns VBox status code. PDMDrvHlpCallR0 will return this. 142 * @param pDrvIns The driver instance (the ring-0 mapping). 143 * @param uOperation The operation. 144 * @param u64Arg Optional integer argument for the operation. 145 */ 146 typedef DECLCALLBACK(int) FNPDMDRVREQHANDLERR0(PPDMDRVINS pDrvIns, uint32_t uOperation, uint64_t u64Arg); 147 /** Ring-0 pointer to a FNPDMDRVREQHANDLERR0. */ 148 typedef R0PTRTYPE(FNPDMDRVREQHANDLERR0 *) PFNPDMDRVREQHANDLERR0; 149 138 150 /** @} */ 139 151 -
trunk/include/VBox/pdmdrv.h
r28329 r28425 403 403 404 404 /** Converts a pointer to the PDMDRVINS::IBase to a pointer to PDMDRVINS. */ 405 #define PDMIBASE_2_PDMDRV(pInterface) ( (PPDMDRVINS)((char *)(pInterface) - RT_OFFSETOF(PDMDRVINS, IBase)) ) 405 #define PDMIBASE_2_PDMDRV(pInterface) ( (PPDMDRVINS)((char *)(pInterface) - RT_OFFSETOF(PDMDRVINS, IBase)) ) 406 407 /** @def PDMDRVINS_2_RCPTR 408 * Converts a PDM Driver instance pointer a RC PDM Driver instance pointer. 409 */ 410 #define PDMDRVINS_2_RCPTR(pDrvIns) ( (RCPTRTYPE(PPDMDRVINS))((RTGCUINTPTR)(pDrvIns)->pvInstanceDataRC - RT_OFFSETOF(PDMDRVINS, achInstanceData)) ) 411 412 /** @def PDMDRVINS_2_R3PTR 413 * Converts a PDM Driver instance pointer a R3 PDM Driver instance pointer. 414 */ 415 #define PDMDRVINS_2_R3PTR(pDrvIns) ( (R3PTRTYPE(PPDMDRVINS))((RTHCUINTPTR)(pDrvIns)->pvInstanceDataR3 - RT_OFFSETOF(PDMDRVINS, achInstanceData)) ) 416 417 /** @def PDMDRVINS_2_R0PTR 418 * Converts a PDM Driver instance pointer a R0 PDM Driver instance pointer. 419 */ 420 #define PDMDRVINS_2_R0PTR(pDrvIns) ( (R0PTRTYPE(PPDMDRVINS))((RTR0UINTPTR)(pDrvIns)->pvInstanceDataR0 - RT_OFFSETOF(PDMDRVINS, achInstanceData)) ) 421 422 406 423 407 424 /** … … 1160 1177 DECLR3CALLBACKMEMBER(int, pfnCritSectInit,(PPDMDRVINS pDrvIns, PPDMCRITSECT pCritSect, 1161 1178 RT_SRC_POS_DECL, const char *pszName)); 1179 1180 /** 1181 * Call the ring-0 request handler routine of the driver. 1182 * 1183 * For this to work, the driver must be ring-0 enabled and export a request 1184 * handler function. The name of the function must be the driver name in the 1185 * PDMDRVREG struct prefixed with 'drvR0' and suffixed with 'ReqHandler'. It 1186 * shall take the exact same arguments as this function and be declared using 1187 * PDMBOTHCBDECL. See FNPDMDRVREQHANDLERR0. 1188 * 1189 * @returns VBox status code. 1190 * @retval VERR_SYMBOL_NOT_FOUND if the driver doesn't export the required 1191 * handler function. 1192 * @retval VERR_ACCESS_DENIED if the driver isn't ring-0 capable. 1193 * 1194 * @param pDevIns The device instance. 1195 * @param uOperation The operation to perform. 1196 * @param u64Arg 64-bit integer argument. 1197 * @thread Any 1198 */ 1199 DECLR3CALLBACKMEMBER(int, pfnCallR0,(PPDMDRVINS pDrvIns, uint32_t uOperation, uint64_t u64Arg)); 1200 1162 1201 /** Just a safety precaution. */ 1163 1202 uint32_t u32TheEnd; … … 1526 1565 } 1527 1566 1567 /** 1568 * @copydoc PDMDRVHLP::pfnCallR0 1569 */ 1570 DECLINLINE(int) PDMDrvHlpCallR0(PPDMDRVINS pDrvIns, uint32_t uOperation, uint64_t u64Arg) 1571 { 1572 return pDrvIns->pHlpR3->pfnCallR0(pDrvIns, uOperation, u64Arg); 1573 } 1574 1528 1575 1529 1576 /** Pointer to callbacks provided to the VBoxDriverRegister() call. */ -
trunk/include/VBox/vmm.h
r28422 r28425 300 300 /** Call GMMR0FreeLargePage(). */ 301 301 VMMR0_DO_GMM_FREE_LARGE_PAGE, 302 /** Call GMMR0QueryVMMMemoryStatsReq */302 /** Call GMMR0QueryVMMMemoryStatsReq(). */ 303 303 VMMR0_DO_GMM_QUERY_VMM_MEM_STATS, 304 304 /** Call GMMR0BalloonedPages(). */ … … 319 319 /** Query a GVMM or GMM configuration value. */ 320 320 VMMR0_DO_GCFGM_QUERY_VALUE, 321 322 /** Call PDMR0DriverCallReqHandler. */ 323 VMMR0_DO_PDM_DRIVER_CALL_REQ_HANDLER, 321 324 322 325 /** The start of the R0 service operations. */
Note:
See TracChangeset
for help on using the changeset viewer.