VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxHGSMI.h@ 31687

Last change on this file since 31687 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.6 KB
Line 
1/** @file
2 *
3 * VirtualBox Video miniport driver for NT/2k/XP
4 * HGSMI related functions.
5 */
6
7/*
8 * Copyright (C) 2006-2009 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#ifndef ___VBoxHGSMI_h_
20#define ___VBoxHGSMI_h_
21typedef void* HVBOXVIDEOHGSMI;
22
23/* Complete host commands addressed to the display */
24typedef DECLCALLBACK(void) FNVBOXVIDEOHGSMICOMPLETION(HVBOXVIDEOHGSMI hHGSMI, struct _VBVAHOSTCMD * pCmd);
25typedef FNVBOXVIDEOHGSMICOMPLETION *PFNVBOXVIDEOHGSMICOMPLETION;
26
27/* request the host commands addressed to the display */
28typedef DECLCALLBACK(int) FNVBOXVIDEOHGSMICOMMANDS(HVBOXVIDEOHGSMI hHGSMI, uint8_t u8Channel, struct _VBVAHOSTCMD ** ppCmd);
29typedef FNVBOXVIDEOHGSMICOMMANDS *PFNVBOXVIDEOHGSMICOMMANDS;
30
31/* post guest command (offset) to the host */
32typedef DECLCALLBACK(void) FNVBOXVIDEOHGSMIPOSTCOMMAND(HVBOXVIDEOHGSMI hHGSMI, HGSMIOFFSET offCmd);
33typedef FNVBOXVIDEOHGSMIPOSTCOMMAND *PFNVBOXVIDEOHGSMIPOSTCOMMAND;
34
35/* Video Port API dynamically picked up at runtime for binary backwards compatibility with older NT versions */
36#if 0
37typedef VP_STATUS (*PFNWAITFORSINGLEOBJECT) (IN PVOID HwDeviceExtension, IN PVOID Object, IN PLARGE_INTEGER Timeout OPTIONAL);
38
39typedef LONG (*PFNSETEVENT) (IN PVOID HwDeviceExtension, IN PEVENT pEvent);
40typedef VOID (*PFNCLEAREVENT) (IN PVOID HwDeviceExtension, IN PEVENT pEvent);
41typedef VP_STATUS (*PFNCREATEEVENT) (IN PVOID HwDeviceExtension, IN ULONG EventFlag, IN PVOID Unused, OUT PEVENT *ppEvent);
42typedef VP_STATUS (*PFNDELETEEVENT) (IN PVOID HwDeviceExtension, IN PEVENT pEvent);
43
44typedef VP_STATUS (*PFNCREATESPINLOCK) (IN PVOID HwDeviceExtension, OUT PSPIN_LOCK *SpinLock);
45typedef VP_STATUS (*PFNDELETESPINLOCK) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock);
46
47typedef VOID (*PFNACQUIRESPINLOCK) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, OUT PUCHAR OldIrql);
48typedef VOID (*PFNRELEASESPINLOCK) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, IN UCHAR NewIrql);
49typedef VOID (*PFNACQUIRESPINLOCKATDPCLEVEL) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock);
50typedef VOID (*PFNRELEASESPINLOCKFROMDPCLEVEL) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock);
51#endif
52
53typedef long VBOXVP_STATUS;
54typedef struct _VIDEO_PORT_EVENT *VBOXPEVENT;
55typedef struct _VIDEO_PORT_SPIN_LOCK *VBOXPSPIN_LOCK;
56typedef union _LARGE_INTEGER *VBOXPLARGE_INTEGER;
57
58typedef enum VBOXVP_POOL_TYPE
59{
60 VBoxVpNonPagedPool,
61 VBoxVpPagedPool,
62 VBoxVpNonPagedPoolCacheAligned = 4,
63 VBoxVpPagedPoolCacheAligned
64} VBOXVP_POOL_TYPE;
65
66#define VBOXNOTIFICATION_EVENT 0x00000001UL
67
68#define VBOXNO_ERROR 0x00000000UL
69
70typedef VBOXVP_STATUS (*PFNWAITFORSINGLEOBJECT) (void* HwDeviceExtension, void* Object, VBOXPLARGE_INTEGER Timeout);
71
72typedef long (*PFNSETEVENT) (void* HwDeviceExtension, VBOXPEVENT pEvent);
73typedef void (*PFNCLEAREVENT) (void* HwDeviceExtension, VBOXPEVENT pEvent);
74typedef VBOXVP_STATUS (*PFNCREATEEVENT) (void* HwDeviceExtension, unsigned long EventFlag, void* Unused, VBOXPEVENT *ppEvent);
75typedef VBOXVP_STATUS (*PFNDELETEEVENT) (void* HwDeviceExtension, VBOXPEVENT pEvent);
76
77typedef VBOXVP_STATUS (*PFNCREATESPINLOCK) (void* HwDeviceExtension, VBOXPSPIN_LOCK *SpinLock);
78typedef VBOXVP_STATUS (*PFNDELETESPINLOCK) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock);
79
80typedef void (*PFNACQUIRESPINLOCK) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock, unsigned char * OldIrql);
81typedef void (*PFNRELEASESPINLOCK) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock, unsigned char NewIrql);
82typedef void (*PFNACQUIRESPINLOCKATDPCLEVEL) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock);
83typedef void (*PFNRELEASESPINLOCKFROMDPCLEVEL) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock);
84
85typedef void* (*PFNALLOCATEPOOL) (void* HwDeviceExtension, VBOXVP_POOL_TYPE PoolType, size_t NumberOfBytes, unsigned long Tag);
86typedef void (*PFNFREEPOOL) (void* HwDeviceExtension, void* Ptr);
87
88typedef unsigned char (*PFNQUEUEDPC) (void* HwDeviceExtension, void (*CallbackRoutine)(void* HwDeviceExtension, void *Context), void *Context);
89
90/* pfn*SpinLock* functions are available */
91#define VBOXVIDEOPORTPROCS_SPINLOCK 0x00000001
92/* pfn*Event and pfnWaitForSingleObject functions are available */
93#define VBOXVIDEOPORTPROCS_EVENT 0x00000002
94/* pfn*Pool functions are available */
95#define VBOXVIDEOPORTPROCS_POOL 0x00000004
96/* pfnQueueDpc function is available */
97#define VBOXVIDEOPORTPROCS_DPC 0x00000008
98
99typedef struct VBOXVIDEOPORTPROCS
100{
101 /* ored VBOXVIDEOPORTPROCS_xxx constants describing the supported functyionality */
102 uint32_t fSupportedTypes;
103
104 PFNWAITFORSINGLEOBJECT pfnWaitForSingleObject;
105
106 PFNSETEVENT pfnSetEvent;
107 PFNCLEAREVENT pfnClearEvent;
108 PFNCREATEEVENT pfnCreateEvent;
109 PFNDELETEEVENT pfnDeleteEvent;
110
111 PFNCREATESPINLOCK pfnCreateSpinLock;
112 PFNDELETESPINLOCK pfnDeleteSpinLock;
113 PFNACQUIRESPINLOCK pfnAcquireSpinLock;
114 PFNRELEASESPINLOCK pfnReleaseSpinLock;
115 PFNACQUIRESPINLOCKATDPCLEVEL pfnAcquireSpinLockAtDpcLevel;
116 PFNRELEASESPINLOCKFROMDPCLEVEL pfnReleaseSpinLockFromDpcLevel;
117
118 PFNALLOCATEPOOL pfnAllocatePool;
119 PFNFREEPOOL pfnFreePool;
120
121 PFNQUEUEDPC pfnQueueDpc;
122} VBOXVIDEOPORTPROCS;
123
124#endif /* #ifndef ___VBoxHGSMI_h_ */
Note: See TracBrowser for help on using the repository browser.

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