VirtualBox

Changeset 21260 in vbox for trunk/include


Ignore:
Timestamp:
Jul 6, 2009 3:28:14 PM (16 years ago)
Author:
vboxsync
Message:

VBGL: Renamed the internal HGCM functions and added a kernel/user mode indicator to HGCM the calls. The code is not yet using the indicator for anything.

File:
1 edited

Legend:

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

    r21227 r21260  
    8787 */
    8888#if defined(IN_RING0) && !defined(IN_RING0_AGNOSTIC)
    89 # define DECLVBGL(type) type VBOXCALL
     89/** @def DECLR0VBGL
     90 * Declare a VBGL ring-0 API with the right calling convention and visibilitiy.
     91 * @param type      Return type.  */
     92# define DECLR0VBGL(type) type VBOXCALL
     93# define DECLVBGL(type) DECLR0VBGL(type)
    9094
    9195typedef uint32_t VBGLIOPORT; /**< @todo r=bird: We have RTIOPORT (uint16_t) for this. */
     
    184188 */
    185189
    186 DECLVBGL(int) VbglHGCMConnect (VBoxGuestHGCMConnectInfo *pConnectInfo,
    187                                VBGLHGCMCALLBACK *pAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
     190DECLR0VBGL(int) VbglR0HGCMInternalConnect (VBoxGuestHGCMConnectInfo *pConnectInfo,
     191                                           VBGLHGCMCALLBACK *pAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
    188192
    189193
     
    204208 */
    205209
    206 DECLVBGL(int) VbglHGCMDisconnect (VBoxGuestHGCMDisconnectInfo *pDisconnectInfo,
    207                                   VBGLHGCMCALLBACK *pAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
     210DECLR0VBGL(int) VbglR0HGCMInternalDisconnect (VBoxGuestHGCMDisconnectInfo *pDisconnectInfo,
     211                                              VBGLHGCMCALLBACK *pAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
    208212
    209213/** Call a HGCM service.
     
    212216 *
    213217 * @param pCallInfo       The request data.
     218 * @param fFlags          Flags, see VBGLR0_HGCMCALL_F_XXX.
    214219 * @param pAsyncCallback  Required pointer to function that is called when
    215220 *                        host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
     
    220225 * @return VBox status code.
    221226 */
    222 DECLVBGL(int) VbglHGCMCall (VBoxGuestHGCMCallInfo *pCallInfo,
    223                             VBGLHGCMCALLBACK *pAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
     227DECLR0VBGL(int) VbglR0HGCMInternalCall (VBoxGuestHGCMCallInfo *pCallInfo, uint32_t fFlags,
     228                                        VBGLHGCMCALLBACK *pAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
    224229
    225230/** Call a HGCM service. (32 bits packet structure in a 64 bits guest)
     
    228233 *
    229234 * @param pCallInfo       The request data.
     235 * @param fFlags          Flags, see VBGLR0_HGCMCALL_F_XXX.
    230236 * @param pAsyncCallback  Required pointer to function that is called when
    231237 *                        host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
     
    236242 * @return VBox status code.
    237243 */
    238 DECLVBGL(int) VbglHGCMCall32 (VBoxGuestHGCMCallInfo *pCallInfo,
    239                               VBGLHGCMCALLBACK *pAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
     244DECLR0VBGL(int) VbglR0HGCMInternalCall32 (VBoxGuestHGCMCallInfo *pCallInfo, uint32_t fFlags,
     245                                          VBGLHGCMCALLBACK *pAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
     246
     247/** @name VbglR0HGCMInternalCall flags
     248 * @{ */
     249/** User mode request.
     250 * Indicates that only user mode addresses are permitted as parameters. */
     251#define VBGLR0_HGCMCALL_F_USER          UINT32_C(0)
     252/** Kernel mode request.
     253 * Indicates that kernel mode addresses are permitted as parameters. Whether or
     254 * not user mode addresses are permitted is, unfortunately, OS specific. The
     255 * following OSes allows user mode addresses: Windows, TODO.
     256 */
     257#define VBGLR0_HGCMCALL_F_KERNEL        UINT32_C(1)
     258/** Mode mask. */
     259#define VBGLR0_HGCMCALL_F_MODE_MASK     UINT32_C(1)
     260/** @} */
    240261
    241262#  else  /* !VBGL_VBOXGUEST */
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