VirtualBox

Changeset 14332 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Nov 18, 2008 10:11:06 PM (16 years ago)
Author:
vboxsync
Message:

SUPDrv,SUPLib: generic ring-0 service interface.

Location:
trunk/include/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r13703 r14332  
    11331133/** The component factories do not support the requested interface. */
    11341134#define VERR_SUPDRV_INTERFACE_NOT_SUPPORTED         (-3701)
     1135/** The service module was not found. */
     1136#define VERR_SUPDRV_SERVICE_NOT_FOUND               (-3702)
    11351137/** @} */
    11361138
  • trunk/include/VBox/sup.h

    r13858 r14332  
    275275typedef SUPVMMR0REQHDR *PSUPVMMR0REQHDR;
    276276/** the SUPVMMR0REQHDR::u32Magic value (Ethan Iverson - The Bad Plus). */
    277 #define SUPVMMR0REQHDR_MAGIC    UINT32_C(0x19730211)
     277#define SUPVMMR0REQHDR_MAGIC        UINT32_C(0x19730211)
    278278
    279279
     
    288288#define SUP_VMMR0_DO_NOP        2
    289289/** @} */
     290
     291
     292/**
     293 * Request for generic FNSUPR0SERVICEREQHANDLER calls.
     294 */
     295typedef struct SUPR0SERVICEREQHDR
     296{
     297    /** The magic. (SUPR0SERVICEREQHDR_MAGIC) */
     298    uint32_t    u32Magic;
     299    /** The size of the request. */
     300    uint32_t    cbReq;
     301} SUPR0SERVICEREQHDR;
     302/** Pointer to a ring-0 service request header. */
     303typedef SUPR0SERVICEREQHDR *PSUPR0SERVICEREQHDR;
     304/** the SUPVMMR0REQHDR::u32Magic value (Esbjoern Svensson - E.S.P.).  */
     305#define SUPR0SERVICEREQHDR_MAGIC    UINT32_C(0x19640416)
    290306
    291307
     
    463479
    464480/**
     481 * Calls a ring-0 service.
     482 *
     483 * The operation and the request packet is specific to the service.
     484 *
     485 * @returns error code specific to uFunction.
     486 * @param   pszService  The service name.
     487 * @param   cchService  The length of the service name.
     488 * @param   uReq        The request number.
     489 * @param   u64Arg      Constant argument.
     490 * @param   pReqHdr     Pointer to a request header. Optional.
     491 *                      This will be copied in and out of kernel space. There currently is a size
     492 *                      limit on this, just below 4KB.
     493 */
     494SUPR3DECL(int) SUPR3CallR0Service(const char *pszService, size_t cchService, uint32_t uOperation, uint64_t u64Arg, PSUPR0SERVICEREQHDR pReqHdr);
     495
     496/**
    465497 * Queries the paging mode of the host OS.
    466498 *
     
    626658 * @param   pszFilename     The path to the image file.
    627659 * @param   pszModule       The module name. Max 32 bytes.
     660 * @param   ppvImageBase        Where to store the image address.
    628661 */
    629662SUPR3DECL(int) SUPLoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase);
     663
     664/**
     665 * Load a module into R0 HC.
     666 *
     667 * This will verify the file integrity in a similar manner as
     668 * SUPR3HardenedVerifyFile before loading it.
     669 *
     670 * @returns VBox status code.
     671 * @param   pszFilename         The path to the image file.
     672 * @param   pszModule           The module name. Max 32 bytes.
     673 * @param   pszSrvReqHandler    The name of the service request handler entry
     674 *                              point. See FNSUPR0SERVICEREQHANDLER.
     675 * @param   ppvImageBase        Where to store the image address.
     676 */
     677SUPR3DECL(int) SUPR3LoadServiceModule(const char *pszFilename, const char *pszModule,
     678                                      const char *pszSrvReqHandler, void **ppvImageBase);
    630679
    631680/**
     
    820869
    821870
     871/**
     872 * Service request callback function.
     873 *
     874 * @returns VBox status code.
     875 * @param   pSession    The caller's session.
     876 * @param   u64Arg      64-bit integer argument.
     877 * @param   pReqHdr     The request header. Input / Output. Optional.
     878 */
     879typedef DECLCALLBACK(int) FNSUPR0SERVICEREQHANDLER(PSUPDRVSESSION pSession, uint32_t uOperation,
     880                                                   uint64_t u64Arg, PSUPR0SERVICEREQHDR pReqHdr);
     881/** Pointer to a FNR0SERVICEREQHANDLER(). */
     882typedef R0PTRTYPE(FNSUPR0SERVICEREQHANDLER *) PFNSUPR0SERVICEREQHANDLER;
     883
     884
    822885/** @defgroup   grp_sup_r0_idc  The IDC Interface
    823886 * @ingroup grp_sup_r0
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette