VirtualBox

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

Last change on this file since 26063 was 23255, checked in by vboxsync, 15 years ago

Windows guest video driver: NT fixes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.8 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 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef ___VBoxHGSMI_h_
24#define ___VBoxHGSMI_h_
25typedef void* HVBOXVIDEOHGSMI;
26
27/* Complete host commands addressed to the display */
28typedef DECLCALLBACK(void) FNVBOXVIDEOHGSMICOMPLETION(HVBOXVIDEOHGSMI hHGSMI, struct _VBVAHOSTCMD * pCmd);
29typedef FNVBOXVIDEOHGSMICOMPLETION *PFNVBOXVIDEOHGSMICOMPLETION;
30
31/* request the host commands addressed to the display */
32typedef DECLCALLBACK(int) FNVBOXVIDEOHGSMICOMMANDS(HVBOXVIDEOHGSMI hHGSMI, uint8_t u8Channel, struct _VBVAHOSTCMD ** ppCmd);
33typedef FNVBOXVIDEOHGSMICOMMANDS *PFNVBOXVIDEOHGSMICOMMANDS;
34
35/* post guest command (offset) to the host */
36typedef DECLCALLBACK(void) FNVBOXVIDEOHGSMIPOSTCOMMAND(HVBOXVIDEOHGSMI hHGSMI, HGSMIOFFSET offCmd);
37typedef FNVBOXVIDEOHGSMIPOSTCOMMAND *PFNVBOXVIDEOHGSMIPOSTCOMMAND;
38
39/* Video Port API dynamically picked up at runtime for binary backwards compatibility with older NT versions */
40#if 0
41typedef VP_STATUS (*PFNWAITFORSINGLEOBJECT) (IN PVOID HwDeviceExtension, IN PVOID Object, IN PLARGE_INTEGER Timeout OPTIONAL);
42
43typedef LONG (*PFNSETEVENT) (IN PVOID HwDeviceExtension, IN PEVENT pEvent);
44typedef VOID (*PFNCLEAREVENT) (IN PVOID HwDeviceExtension, IN PEVENT pEvent);
45typedef VP_STATUS (*PFNCREATEEVENT) (IN PVOID HwDeviceExtension, IN ULONG EventFlag, IN PVOID Unused, OUT PEVENT *ppEvent);
46typedef VP_STATUS (*PFNDELETEEVENT) (IN PVOID HwDeviceExtension, IN PEVENT pEvent);
47
48typedef VP_STATUS (*PFNCREATESPINLOCK) (IN PVOID HwDeviceExtension, OUT PSPIN_LOCK *SpinLock);
49typedef VP_STATUS (*PFNDELETESPINLOCK) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock);
50
51typedef VOID (*PFNACQUIRESPINLOCK) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, OUT PUCHAR OldIrql);
52typedef VOID (*PFNRELEASESPINLOCK) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, IN UCHAR NewIrql);
53typedef VOID (*PFNACQUIRESPINLOCKATDPCLEVEL) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock);
54typedef VOID (*PFNRELEASESPINLOCKFROMDPCLEVEL) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock);
55#endif
56
57typedef long VBOXVP_STATUS;
58typedef struct _VIDEO_PORT_EVENT *VBOXPEVENT;
59typedef struct _VIDEO_PORT_SPIN_LOCK *VBOXPSPIN_LOCK;
60typedef union _LARGE_INTEGER *VBOXPLARGE_INTEGER;
61
62typedef enum VBOXVP_POOL_TYPE
63{
64 VBoxVpNonPagedPool,
65 VBoxVpPagedPool,
66 VBoxVpNonPagedPoolCacheAligned = 4,
67 VBoxVpPagedPoolCacheAligned
68} VBOXVP_POOL_TYPE;
69
70#define VBOXNOTIFICATION_EVENT 0x00000001UL
71
72#define VBOXNO_ERROR 0x00000000UL
73
74typedef VBOXVP_STATUS (*PFNWAITFORSINGLEOBJECT) (void* HwDeviceExtension, void* Object, VBOXPLARGE_INTEGER Timeout);
75
76typedef long (*PFNSETEVENT) (void* HwDeviceExtension, VBOXPEVENT pEvent);
77typedef void (*PFNCLEAREVENT) (void* HwDeviceExtension, VBOXPEVENT pEvent);
78typedef VBOXVP_STATUS (*PFNCREATEEVENT) (void* HwDeviceExtension, unsigned long EventFlag, void* Unused, VBOXPEVENT *ppEvent);
79typedef VBOXVP_STATUS (*PFNDELETEEVENT) (void* HwDeviceExtension, VBOXPEVENT pEvent);
80
81typedef VBOXVP_STATUS (*PFNCREATESPINLOCK) (void* HwDeviceExtension, VBOXPSPIN_LOCK *SpinLock);
82typedef VBOXVP_STATUS (*PFNDELETESPINLOCK) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock);
83
84typedef void (*PFNACQUIRESPINLOCK) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock, unsigned char * OldIrql);
85typedef void (*PFNRELEASESPINLOCK) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock, unsigned char NewIrql);
86typedef void (*PFNACQUIRESPINLOCKATDPCLEVEL) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock);
87typedef void (*PFNRELEASESPINLOCKFROMDPCLEVEL) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock);
88
89typedef void* (*PFNALLOCATEPOOL) (void* HwDeviceExtension, VBOXVP_POOL_TYPE PoolType, size_t NumberOfBytes, unsigned long Tag);
90typedef void (*PFNFREEPOOL) (void* HwDeviceExtension, void* Ptr);
91
92typedef unsigned char (*PFNQUEUEDPC) (void* HwDeviceExtension, void (*CallbackRoutine)(void* HwDeviceExtension, void *Context), void *Context);
93
94/* pfn*SpinLock* functions are available */
95#define VBOXVIDEOPORTPROCS_SPINLOCK 0x00000001
96/* pfn*Event and pfnWaitForSingleObject functions are available */
97#define VBOXVIDEOPORTPROCS_EVENT 0x00000002
98/* pfn*Pool functions are available */
99#define VBOXVIDEOPORTPROCS_POOL 0x00000004
100/* pfnQueueDpc function is available */
101#define VBOXVIDEOPORTPROCS_DPC 0x00000008
102
103typedef struct VBOXVIDEOPORTPROCS
104{
105 /* ored VBOXVIDEOPORTPROCS_xxx constants describing the supported functyionality */
106 uint32_t fSupportedTypes;
107
108 PFNWAITFORSINGLEOBJECT pfnWaitForSingleObject;
109
110 PFNSETEVENT pfnSetEvent;
111 PFNCLEAREVENT pfnClearEvent;
112 PFNCREATEEVENT pfnCreateEvent;
113 PFNDELETEEVENT pfnDeleteEvent;
114
115 PFNCREATESPINLOCK pfnCreateSpinLock;
116 PFNDELETESPINLOCK pfnDeleteSpinLock;
117 PFNACQUIRESPINLOCK pfnAcquireSpinLock;
118 PFNRELEASESPINLOCK pfnReleaseSpinLock;
119 PFNACQUIRESPINLOCKATDPCLEVEL pfnAcquireSpinLockAtDpcLevel;
120 PFNRELEASESPINLOCKFROMDPCLEVEL pfnReleaseSpinLockFromDpcLevel;
121
122 PFNALLOCATEPOOL pfnAllocatePool;
123 PFNFREEPOOL pfnFreePool;
124
125 PFNQUEUEDPC pfnQueueDpc;
126} VBOXVIDEOPORTPROCS;
127
128#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