Changeset 87700 in vbox for trunk/include/VBox
- Timestamp:
- Feb 10, 2021 8:21:04 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r87542 r87700 606 606 extern DECLEXPORT(PSUPGLOBALINFOPAGE) g_pSUPGlobalInfoPage; 607 607 608 #elif !defined(IN_RING0) || defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS) 608 #elif !defined(IN_RING0) || defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS) || defined(VBOX_WITH_KMOD_WRAPPED_R0_MODS) 609 609 extern DECLIMPORT(PSUPGLOBALINFOPAGE) g_pSUPGlobalInfoPage; 610 610 … … 2006 2006 typedef FNSUPDRVDESTRUCTOR *PFNSUPDRVDESTRUCTOR; 2007 2007 2008 /** 2009 * Service request callback function. 2010 * 2011 * @returns VBox status code. 2012 * @param pSession The caller's session. 2013 * @param uOperation The operation identifier. 2014 * @param u64Arg 64-bit integer argument. 2015 * @param pReqHdr The request header. Input / Output. Optional. 2016 */ 2017 typedef DECLCALLBACKTYPE(int, FNSUPR0SERVICEREQHANDLER,(PSUPDRVSESSION pSession, uint32_t uOperation, 2018 uint64_t u64Arg, PSUPR0SERVICEREQHDR pReqHdr)); 2019 /** Pointer to a FNR0SERVICEREQHANDLER(). */ 2020 typedef R0PTRTYPE(FNSUPR0SERVICEREQHANDLER *) PFNSUPR0SERVICEREQHANDLER; 2021 2022 /** 2023 * Symbol entry for a wrapped module (SUPLDRWRAPPEDMODULE). 2024 */ 2025 typedef struct SUPLDRWRAPMODSYMBOL 2026 { 2027 /** The symbol namel. */ 2028 const char *pszSymbol; 2029 /** The symbol address/value. */ 2030 PFNRT pfnValue; 2031 } SUPLDRWRAPMODSYMBOL; 2032 /** Pointer to a symbol entry for a wrapped module. */ 2033 typedef SUPLDRWRAPMODSYMBOL const *PCSUPLDRWRAPMODSYMBOL; 2034 2035 /** 2036 * Registration structure for SUPR0LdrRegisterWrapperModule. 2037 * 2038 * This is used to register a .r0 module when loaded manually as a native kernel 2039 * module/extension/driver/whatever. 2040 */ 2041 typedef struct SUPLDRWRAPPEDMODULE 2042 { 2043 /** Magic value (SUPLDRWRAPPEDMODULE_MAGIC). */ 2044 uint32_t uMagic; 2045 /** The structure version. */ 2046 uint16_t uVersion; 2047 /** SUPLDRWRAPPEDMODULE_F_XXX. */ 2048 uint16_t fFlags; 2049 2050 /** As close as possible to the start of the image. */ 2051 void *pvImageStart; 2052 /** As close as possible to the end of the image. */ 2053 void *pvImageEnd; 2054 2055 /** @name Standar entry points 2056 * @{ */ 2057 /** Pointer to the module initialization function (optional). */ 2058 DECLCALLBACKMEMBER(int, pfnModuleInit,(void *hMod)); 2059 /** Pointer to the module termination function (optional). */ 2060 DECLCALLBACKMEMBER(void, pfnModuleTerm,(void *hMod)); 2061 /** The VMMR0EntryFast entry point for VMMR0. */ 2062 PFNRT pfnVMMR0EntryFast; 2063 /** The VMMR0EntryEx entry point for VMMR0. */ 2064 PFNRT pfnVMMR0EntryEx; 2065 /** The service request handler entry point. */ 2066 PFNSUPR0SERVICEREQHANDLER pfnServiceReqHandler; 2067 /** @} */ 2068 2069 /** The symbol table. */ 2070 PCSUPLDRWRAPMODSYMBOL paSymbols; 2071 /** Number of symbols. */ 2072 uint32_t cSymbols; 2073 2074 /** The normal VBox module name. */ 2075 char szName[32]; 2076 /** Repeating the magic value here (SUPLDRWRAPPEDMODULE_MAGIC). */ 2077 uint32_t uEndMagic; 2078 } SUPLDRWRAPPEDMODULE; 2079 /** Pointer to the wrapped module registration structure. */ 2080 typedef SUPLDRWRAPPEDMODULE const *PCSUPLDRWRAPPEDMODULE; 2081 2082 /** Magic value for the wrapped module structure (Doris lessing). */ 2083 #define SUPLDRWRAPPEDMODULE_MAGIC UINT32_C(0x19191117) 2084 /** Current SUPLDRWRAPPEDMODULE structure version. */ 2085 #define SUPLDRWRAPPEDMODULE_VERSION UINT16_C(0x0001) 2086 2087 /** Set if this is the VMMR0 module. */ 2088 #define SUPLDRWRAPPEDMODULE_F_VMMR0 UINT16_C(0x0001) 2089 2090 2008 2091 SUPR0DECL(void *) SUPR0ObjRegister(PSUPDRVSESSION pSession, SUPDRVOBJTYPE enmType, PFNSUPDRVDESTRUCTOR pfnDestructor, void *pvUser1, void *pvUser2); 2009 2092 SUPR0DECL(int) SUPR0ObjAddRef(void *pvObj, PSUPDRVSESSION pSession); … … 2036 2119 SUPR0DECL(int) SUPR0LdrModRetain(PSUPDRVSESSION pSession, void *hMod); 2037 2120 SUPR0DECL(int) SUPR0LdrModRelease(PSUPDRVSESSION pSession, void *hMod); 2121 #ifdef RT_OS_LINUX 2122 SUPR0DECL(int) SUPDrvLinuxLdrRegisterWrappedModule(PCSUPLDRWRAPPEDMODULE pWrappedModInfo, void *pvLnxModule, void **phMod); 2123 SUPR0DECL(int) SUPDrvLinuxLdrDeregisterWrappedModule(PCSUPLDRWRAPPEDMODULE pWrappedModInfo, void **phMod); 2124 #endif 2038 2125 SUPR0DECL(int) SUPR0GetVTSupport(uint32_t *pfCaps); 2039 2126 SUPR0DECL(int) SUPR0GetHwvirtMsrs(PSUPHWVIRTMSRS pMsrs, uint32_t fCaps, bool fForce); … … 2458 2545 2459 2546 2460 /**2461 * Service request callback function.2462 *2463 * @returns VBox status code.2464 * @param pSession The caller's session.2465 * @param uOperation The operation identifier.2466 * @param u64Arg 64-bit integer argument.2467 * @param pReqHdr The request header. Input / Output. Optional.2468 */2469 typedef DECLCALLBACKTYPE(int, FNSUPR0SERVICEREQHANDLER,(PSUPDRVSESSION pSession, uint32_t uOperation,2470 uint64_t u64Arg, PSUPR0SERVICEREQHDR pReqHdr));2471 /** Pointer to a FNR0SERVICEREQHANDLER(). */2472 typedef R0PTRTYPE(FNSUPR0SERVICEREQHANDLER *) PFNSUPR0SERVICEREQHANDLER;2473 2474 2475 2547 /** @defgroup grp_sup_r0_idc The IDC Interface 2476 2548 * @{
Note:
See TracChangeset
for help on using the changeset viewer.