VirtualBox

儲存庫 vbox 的更動 68573


忽略:
時間撮記:
2017-8-31 下午12:10:48 (7 年 以前)
作者:
vboxsync
訊息:

merging vbglioc r117745: Working on making VBoxGuest.h usable by openwatcom in 16-bit mode.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/include/VBox/VBoxGuest.h

    r68570 r68573  
    11/** @file
    22 * VBoxGuest - VirtualBox Guest Additions Driver Interface. (ADD,DEV)
     3 *
     4 * @note    This file is used by 16-bit compilers too (OpenWatcom).
    35 *
    46 * @remarks This is in the process of being split up and usage cleaned up.
     
    9395 * @internal */
    9496#define VBGL_IOCTL_FLAG_32BIT                       UINT32_C(0)
     97/** 16-bit specific I/O control flag. */
     98#define VBGL_IOCTL_FLAG_16BIT                       UINT32_C(64)
    9599/** Check if the I/O control is a 64-bit one.   */
    96100#define VBGL_IOCTL_IS_64BIT(a_uIOCtl)               RT_BOOL((a_uIOCtl) & VBGL_IOCTL_FLAG_64BIT)
     
    103107#elif ARCH_BITS == 32
    104108# define VBGL_IOCTL_FLAG_CC                         VBGL_IOCTL_FLAG_32BIT
     109#elif ARCH_BITS == 16
     110# define VBGL_IOCTL_FLAG_CC                         VBGL_IOCTL_FLAG_16BIT
    105111#else
    106112# error "dunno which arch this is!"
     
    220226AssertCompileSize(VBGLREQHDR, 24);
    221227/** Pointer to a IOC header. */
    222 typedef VBGLREQHDR *PVBGLREQHDR;
     228typedef VBGLREQHDR RT_FAR *PVBGLREQHDR;
    223229
    224230/** Version of VMMDevRequestHeader structure. */
     
    317323        } Out;
    318324    } u;
    319 } VBGLIOCDRIVERVERSIONINFO, *PVBGLIOCDRIVERVERSIONINFO;
     325} VBGLIOCDRIVERVERSIONINFO, RT_FAR *PVBGLIOCDRIVERVERSIONINFO;
    320326AssertCompileSize(VBGLIOCDRIVERVERSIONINFO, 24 + 20);
    321327#ifndef RT_OS_OS2 /* figure this one out... */
     
    343349        {
    344350            /** The MMIO mapping.  NULL if no MMIO region. */
    345             struct VMMDevMemory volatile   *pvVmmDevMapping;
     351            struct VMMDevMemory volatile RT_FAR *pvVmmDevMapping;
    346352            /** The I/O port address. */
    347353            RTIOPORT                        IoPort;
    348354            /** Padding, ignore. */
    349             RTIOPORT                        auPadding[HC_ARCH_BITS == 32 ? 1 : 3];
     355            RTIOPORT                        auPadding[HC_ARCH_BITS == 64 ? 3 : 1];
    350356        } Out;
    351357    } u;
    352 } VBGLIOCGETVMMDEVIOINFO, *PVBGLIOCGETVMMDEVIOINFO;
    353 AssertCompileSize(VBGLIOCGETVMMDEVIOINFO, 24 + (HC_ARCH_BITS == 32 ? 8 : 16));
     358} VBGLIOCGETVMMDEVIOINFO, RT_FAR *PVBGLIOCGETVMMDEVIOINFO;
     359AssertCompileSize(VBGLIOCGETVMMDEVIOINFO, 24 + (HC_ARCH_BITS == 64 ? 16 : 8));
    354360/** @} */
    355361
     
    394400        } Out;
    395401    } u;
    396 } VBGLIOCHGCMCONNECT, *PVBGLIOCHGCMCONNECT;
     402} VBGLIOCHGCMCONNECT, RT_FAR *PVBGLIOCHGCMCONNECT;
    397403AssertCompileSize(VBGLIOCHGCMCONNECT, 24 + 132);
    398404#ifndef RT_OS_OS2 /* figure this one out... */
     
    421427        } In;
    422428    } u;
    423 } VBGLIOCHGCMDISCONNECT, *PVBGLIOCHGCMDISCONNECT;
     429} VBGLIOCHGCMDISCONNECT, RT_FAR *PVBGLIOCHGCMDISCONNECT;
    424430AssertCompileSize(VBGLIOCHGCMDISCONNECT, 24 + 4);
    425431/** @} */
     
    470476    uint16_t    cParms;
    471477    /* Parameters follow in form HGCMFunctionParameter aParms[cParms] */
    472 } VBGLIOCHGCMCALL, *PVBGLIOCHGCMCALL;
     478} VBGLIOCHGCMCALL, RT_FAR *PVBGLIOCHGCMCALL;
    473479AssertCompileSize(VBGLIOCHGCMCALL, 24 + 16);
    474 typedef VBGLIOCHGCMCALL const *PCVBGLIOCHGCMCALL;
     480typedef VBGLIOCHGCMCALL const RT_FAR *PCVBGLIOCHGCMCALL;
    475481
    476482/**
     
    567573        } In;
    568574    } u;
    569 } VBGLIOCLOG, *PVBGLIOCLOG;
     575} VBGLIOCLOG, RT_FAR *PVBGLIOCLOG;
    570576/** @} */
    571577
     
    598604        } Out;
    599605    } u;
    600 } VBGLIOCWAITFOREVENTS, *PVBGLIOCWAITFOREVENTS;
     606} VBGLIOCWAITFOREVENTS, RT_FAR *PVBGLIOCWAITFOREVENTS;
    601607AssertCompileSize(VBGLIOCWAITFOREVENTS, 24 + 8);
    602608/** @} */
     
    643649        } In;
    644650    } u;
    645 } VBGLIOCCHANGEFILTERMASK, *PVBGLIOCCHANGEFILTERMASK;
     651} VBGLIOCCHANGEFILTERMASK, RT_FAR *PVBGLIOCCHANGEFILTERMASK;
    646652AssertCompileSize(VBGLIOCCHANGEFILTERMASK, 24 + 8);
    647653/** @} */
     
    698704        } In;
    699705    } u;
    700 } VBGLIOCACQUIREGUESTCAPS, *PVBGLIOCACQUIREGUESTCAPS;
     706} VBGLIOCACQUIREGUESTCAPS, RT_FAR *PVBGLIOCACQUIREGUESTCAPS;
    701707AssertCompileSize(VBGLIOCACQUIREGUESTCAPS, 24 + 12);
    702708/** @} */
     
    731737        } Out;
    732738    } u;
    733 } VBGLIOCSETGUESTCAPS, *PVBGLIOCSETGUESTCAPS;
     739} VBGLIOCSETGUESTCAPS, RT_FAR *PVBGLIOCSETGUESTCAPS;
    734740AssertCompileSize(VBGLIOCSETGUESTCAPS, 24 + 8);
    735741typedef VBGLIOCSETGUESTCAPS VBoxGuestSetCapabilitiesInfo;
     
    756762        } In;
    757763    } u;
    758 } VBGLIOCSETMOUSESTATUS, *PVBGLIOCSETMOUSESTATUS;
     764} VBGLIOCSETMOUSESTATUS, RT_FAR *PVBGLIOCSETMOUSESTATUS;
    759765/** @} */
    760766
     
    790796            PFNVBOXGUESTMOUSENOTIFY     pfnNotify;
    791797            /** The callback argument. */
    792             void                      *pvUser;
    793         } In;
    794     } u;
    795 } VBGLIOCSETMOUSENOTIFYCALLBACK, *PVBGLIOCSETMOUSENOTIFYCALLBACK;
     798            void                RT_FAR *pvUser;
     799        } In;
     800    } u;
     801} VBGLIOCSETMOUSENOTIFYCALLBACK, RT_FAR *PVBGLIOCSETMOUSENOTIFYCALLBACK;
    796802/** @} */
    797803
     
    825831        } Out;
    826832    } u;
    827 } VBGLIOCCHECKBALLOON, *PVBGLIOCCHECKBALLOON;
     833} VBGLIOCCHECKBALLOON, RT_FAR *PVBGLIOCCHECKBALLOON;
    828834AssertCompileSize(VBGLIOCCHECKBALLOON, 24 + 8);
    829835typedef VBGLIOCCHECKBALLOON VBoxGuestCheckBalloonInfo;
     
    854860            RTR3PTR     pvChunk;
    855861            /** Explicit alignment padding, MBZ. */
    856             uint8_t     abPadding[ARCH_BITS == 32 ? 4 + 7 : 0 + 7];
     862            uint8_t     abPadding[ARCH_BITS == 64 ? 0 + 7 : 4 + 7];
    857863            /** true = inflate, false = deflate. */
    858864            bool        fInflate;
    859865        } In;
    860866    } u;
    861 } VBGLIOCCHANGEBALLOON, *PVBGLIOCCHANGEBALLOON;
     867} VBGLIOCCHANGEBALLOON, RT_FAR *PVBGLIOCCHANGEBALLOON;
    862868AssertCompileSize(VBGLIOCCHANGEBALLOON, 24+16);
    863869/** @} */
     
    883889        } In;
    884890    } u;
    885 } VBGLIOCWRITECOREDUMP, *PVBGLIOCWRITECOREDUMP;
     891} VBGLIOCWRITECOREDUMP, RT_FAR *PVBGLIOCWRITECOREDUMP;
    886892AssertCompileSize(VBGLIOCWRITECOREDUMP, 24 + 4);
    887893typedef VBGLIOCWRITECOREDUMP VBoxGuestWriteCoreDump;
     
    929935     * @param   cbReq               The size of the data buffer.
    930936     */
     937# if ARCH_BITS == 32 || defined(DOXYGEN_RUNNING)
    931938    DECLCALLBACKMEMBER(int, pfnServiceEP)(uint32_t u32Session, unsigned iFunction, PVBGLREQHDR pReqHdr, size_t cbReq);
     939# else
     940    uint32_t pfnServiceEP;
     941#endif
    932942
    933943    /** The 16-bit service entry point for C code (cdecl).
     
    942952     * @endcode
    943953     */
     954# if ARCH_BITS == 16 || defined(DOXYGEN_RUNNING)
     955    DECLCALLBACKMEMBER(int, fpfnServiceEP)(uint32_t u32Session, uint16_t iFunction, PVBGLREQHDR fpvData, uint16_t cbData);
     956# else
    944957    RTFAR16 fpfnServiceEP;
     958# endif
    945959
    946960    /** The 16-bit service entry point for Assembly code (register).
     
    959973} VBOXGUESTOS2IDCCONNECT;
    960974/** Pointer to VBOXGUESTOS2IDCCONNECT buffer. */
    961 typedef VBOXGUESTOS2IDCCONNECT *PVBOXGUESTOS2IDCCONNECT;
     975typedef VBOXGUESTOS2IDCCONNECT RT_FAR *PVBOXGUESTOS2IDCCONNECT;
    962976#endif /* RT_OS_OS2 */
    963977
     
    9961010        {
    9971011            /** The session handle (opaque). */
    998             void          *pvSession;
     1012            void    RT_FAR *pvSession;
    9991013            /** The version of the I/O control interface for this session
    10001014             * (typically VBGL_IOC_VERSION). */
     
    10081022            uint32_t        uReserved1;
    10091023            /** Reserved \#2 (will be returned as NULL until defined). */
    1010             void          *pvReserved2;
     1024            void    RT_FAR *pvReserved2;
    10111025        } Out;
    10121026    } u;
    1013 } VBGLIOCIDCCONNECT, *PVBGLIOCIDCCONNECT;
    1014 AssertCompileSize(VBGLIOCIDCCONNECT, 24 + 16 + ARCH_BITS / 8 * 2);
     1027} VBGLIOCIDCCONNECT, RT_FAR *PVBGLIOCIDCCONNECT;
     1028AssertCompileSize(VBGLIOCIDCCONNECT, 24 + 16 + (ARCH_BITS == 64 ? 8 : 4) * 2);
    10151029#ifndef RT_OS_OS2 /* figure this one out... */
    10161030AssertCompile(VBGL_IOCTL_IDC_CONNECT_SIZE_IN == 24 + 16);
     
    10401054        {
    10411055            /** The session handle for platforms where this is needed. */
    1042             void       *pvSession;
    1043         } In;
    1044     } u;
    1045 } VBGLIOCIDCDISCONNECT, *PVBGLIOCIDCDISCONNECT;
    1046 AssertCompileSize(VBGLIOCIDCDISCONNECT, 24 + ARCH_BITS / 8);
     1056            void RT_FAR *pvSession;
     1057        } In;
     1058    } u;
     1059} VBGLIOCIDCDISCONNECT, RT_FAR *PVBGLIOCIDCDISCONNECT;
     1060AssertCompileSize(VBGLIOCIDCDISCONNECT, 24 + (ARCH_BITS == 64 ? 8 : 4));
    10471061/** @} */
    10481062
     
    10591073 * @param   cbReq       The request size.
    10601074 */
    1061 int VBOXCALL VBoxGuestIDC(void *pvSession, uintptr_t uReq, PVBGLREQHDR pReqHdr, size_t cbReq);
     1075int VBOXCALL VBoxGuestIDC(void RT_FAR *pvSession, uintptr_t uReq, PVBGLREQHDR pReqHdr, size_t cbReq);
    10621076RT_C_DECLS_END
    10631077#endif
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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