ReactOS  0.4.14-dev-337-gf981a68
videoprt.h
Go to the documentation of this file.
1 /*
2  * VideoPort driver
3  *
4  * Copyright (C) 2002, 2003, 2004 ReactOS Team
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  */
21 
22 #ifndef VIDEOPRT_H
23 #define VIDEOPRT_H
24 
25 #include <ntifs.h>
26 
27 #define __BROKEN__
28 #include <miniport.h>
29 #include <video.h>
30 #include <ntagp.h>
31 #include <dderror.h>
32 #include <windef.h>
33 #include <wdmguid.h>
34 
35 #define TAG_VIDEO_PORT 'PDIV'
36 #define TAG_VIDEO_PORT_BUFFER '\0mpV'
37 #define TAG_REQUEST_PACKET 'qRpV'
38 
39 #define GUID_STRING_LENGTH 38 * sizeof(WCHAR)
40 
42 {
50 
52 
54 {
59 
61 {
66 
68 {
73 
75 {
78 
80 {
108 
110 {
112 
116 
118 
121 
123 
126 
127 #define VIDEO_PORT_GET_CHILD_EXTENSION(MiniportExtension) \
128  CONTAINING_RECORD( \
129  MiniportExtension, \
130  VIDEO_PORT_CHILD_EXTENSION, \
131  ChildDeviceExtension)
132 
133 #define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension) \
134  CONTAINING_RECORD( \
135  MiniportExtension, \
136  VIDEO_PORT_DEVICE_EXTENSION, \
137  MiniPortDeviceExtension)
138 
139 typedef struct _VIDEO_PORT_EVENT
140 {
143 
144 /* agp.c */
145 
146 NTSTATUS
152 
155  IN PVOID HwDeviceExtension,
157 
158 /* child.c */
159 
163  IN PIRP Irp);
164 
165 /* dispatch.c */
166 
171 
175  IN PIRP Irp);
176 
180  IN PIRP Irp);
181 
185  IN PIRP Irp);
186 
190  IN PIRP Irp);
191 
195  IN PIRP Irp);
196 
200  IN PIRP Irp);
201 
205  IN PIRP Irp);
206 
210  IN PIRP Irp);
211 
212 VOID NTAPI
214 
215 /* timer.c */
216 
221 
222 /* interrupt.c */
223 
228  IN PVIDEO_PORT_CONFIG_INFO ConfigInfo);
229 
230 /* resource.c */
231 
235  IN PIRP Irp);
236 
239  IN HANDLE Process,
241  IN ULONG SizeInBytes,
242  IN ULONG Protect,
244 
245 /* videoprt.c */
246 
247 extern ULONG CsrssInitialized;
248 extern PKPROCESS Csrss;
251 
254 
257 
264 
270 
271 PVOID NTAPI
273  IN PVOID HwDeviceExtension,
275 
276 /* int10.c */
277 
278 NTSTATUS
279 NTAPI
281 
284  IN PVOID Context,
285  OUT PUSHORT Seg,
286  OUT PUSHORT Off,
287  IN OUT PULONG Length);
288 
291  IN PVOID Context,
292  IN USHORT Seg,
293  IN USHORT Off);
294 
297  IN PVOID Context,
298  IN USHORT Seg,
299  IN USHORT Off,
300  OUT PVOID Buffer,
301  IN ULONG Length);
302 
305  IN PVOID Context,
306  IN USHORT Seg,
307  IN USHORT Off,
308  IN PVOID Buffer,
309  IN ULONG Length);
310 
313  IN PVOID Context,
314  IN OUT PINT10_BIOS_ARGUMENTS BiosArguments);
315 
316 /* registry.c */
317 
318 NTSTATUS
319 NTAPI
321  _In_ HANDLE SourceKeyHandle,
322  _In_ HANDLE DestKeyHandle);
323 
324 NTSTATUS
325 NTAPI
327  HANDLE SourceKeyHandle,
328  HANDLE DestKeyHandle,
329  PWSTR ValueName);
330 
331 NTSTATUS
332 NTAPI
334  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension);
335 
336 NTSTATUS
337 NTAPI
339  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension);
340 
341 NTSTATUS
342 NTAPI
345  OUT PUNICODE_STRING DeviceRegistryPath);
346 
347 
348 #endif /* VIDEOPRT_H */
NTSTATUS NTAPI IntCopyRegistryKey(_In_ HANDLE SourceKeyHandle, _In_ HANDLE DestKeyHandle)
Definition: registry.c:31
VP_STATUS NTAPI IntInt10AllocateBuffer(IN PVOID Context, OUT PUSHORT Seg, OUT PUSHORT Off, IN OUT PULONG Length)
Definition: int10.c:156
struct _VIDEO_PORT_CHILD_EXTENSION * PVIDEO_PORT_CHILD_EXTENSION
#define IN
Definition: typedefs.h:38
UNICODE_STRING NewRegistryPath
Definition: videoprt.h:88
PDEVICE_OBJECT FunctionalDeviceObject
Definition: videoprt.h:85
VIDEO_CHILD_TYPE ChildType
Definition: videoprt.h:114
enum _INTERFACE_TYPE INTERFACE_TYPE
struct _VIDEO_PORT_ADDRESS_MAPPING * PVIDEO_PORT_ADDRESS_MAPPING
struct _VIDEO_PORT_EVENT VIDEO_PORT_EVENT
NTSTATUS NTAPI IntVideoPortFilterResourceRequirements(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: resource.c:77
VIDEO_PORT_DRIVER_EXTENSION * DriverExtension
Definition: videoprt.h:100
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T _In_ SECTION_INHERIT _In_ ULONG _In_ ULONG Protect
Definition: zwfuncs.h:214
_In_ PIRP Irp
Definition: csq.h:116
uint16_t * PWSTR
Definition: typedefs.h:54
NTSTATUS NTAPI IntVideoPortMapPhysicalMemory(IN HANDLE Process, IN PHYSICAL_ADDRESS PhysicalAddress, IN ULONG SizeInBytes, IN ULONG Protect, IN OUT PVOID *VirtualAddress OPTIONAL)
Definition: resource.c:192
NTSTATUS NTAPI IntVideoPortDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:456
VIDEO_HW_INITIALIZATION_DATA InitializationData
Definition: videoprt.h:69
unsigned char * PUCHAR
Definition: retypes.h:3
NTSTATUS NTAPI IntSetupDeviceSettingsKey(PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension)
Definition: registry.c:297
char CHAR
Definition: xmlstorage.h:175
PHYSICAL_ADDRESS IoAddress
Definition: videoprt.h:46
LONG NTSTATUS
Definition: precomp.h:26
struct _VIDEO_PORT_DEVICE_EXTENSTION * PVIDEO_PORT_DEVICE_EXTENSION
NTSTATUS NTAPI IntVideoPortDispatchPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:836
PCM_RESOURCE_LIST AllocatedResources
Definition: videoprt.h:91
LIST_ENTRY AddressMappingListHead
Definition: videoprt.h:98
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1122
AGP_BUS_INTERFACE_STANDARD AgpInterface
Definition: videoprt.h:102
#define FASTCALL
Definition: nt_native.h:50
struct _VIDEO_PORT_EVENT * PVIDEO_PORT_EVENT
ULONG CsrssInitialized
Definition: videoprt.c:33
VOID FASTCALL IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:438
struct _VIDEO_PORT_COMMON_EXTENSION * PVIDEO_PORT_COMMON_EXTENSION
struct _VIDEO_PORT_AGP_VIRTUAL_MAPPING VIDEO_PORT_AGP_VIRTUAL_MAPPING
struct _VIDEO_PORT_AGP_MAPPING * PVIDEO_PORT_AGP_MAPPING
_In_ PUNICODE_STRING ValueName
Definition: cmfuncs.h:264
VOID FASTCALL IntAttachToCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:425
ULONG VideoPortDeviceNumber
Definition: videoprt.c:35
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
struct _VIDEO_PORT_DRIVER_EXTENSION * PVIDEO_PORT_DRIVER_EXTENSION
NTSTATUS NTAPI IntVideoPortCreateAdapterDeviceObject(IN PDRIVER_OBJECT DriverObject, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, OUT PDEVICE_OBJECT *DeviceObject OPTIONAL)
Definition: videoprt.c:87
PHYSICAL_ADDRESS PhysicalAddress
Definition: videoprt.h:57
PDEVICE_OBJECT PhysicalDeviceObject
Definition: videoprt.h:84
NTSTATUS NTAPI IntVideoPortDispatchClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:160
BOOLEAN NTAPI IntVideoPortSetupInterrupt(IN PDEVICE_OBJECT DeviceObject, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PVIDEO_PORT_CONFIG_INFO ConfigInfo)
Definition: interrupt.c:45
VIDEO_PORT_COMMON_EXTENSION Common
Definition: videoprt.h:111
NTSTATUS NTAPI IntCreateRegistryPath(IN PCUNICODE_STRING DriverRegistryPath, OUT PUNICODE_STRING DeviceRegistryPath)
Definition: registry.c:533
unsigned char BOOLEAN
VOID NTAPI IntVideoPortUnload(PDRIVER_OBJECT DriverObject)
Definition: dispatch.c:892
NTSTATUS NTAPI IntVideoPortFindAdapter(IN PDRIVER_OBJECT DriverObject, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PDEVICE_OBJECT DeviceObject)
Definition: videoprt.c:247
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
struct _VIDEO_PORT_ADDRESS_MAPPING VIDEO_PORT_ADDRESS_MAPPING
Definition: bufpool.h:45
NTSTATUS NTAPI IntVideoPortAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject)
Definition: dispatch.c:68
PDRIVER_OBJECT DriverObject
Definition: videoprt.h:119
NTSTATUS NTAPI IntInitializeVideoAddressSpace(VOID)
Definition: int10.c:146
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:359
VP_STATUS NTAPI IntInt10CallBios(IN PVOID Context, IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)
Definition: int10.c:315
NTSTATUS NTAPI IntVideoPortDispatchPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:804
enum _VIDEO_CHILD_TYPE VIDEO_CHILD_TYPE
VP_STATUS NTAPI IntInt10ReadMemory(IN PVOID Context, IN USHORT Seg, IN USHORT Off, OUT PVOID Buffer, IN ULONG Length)
Definition: int10.c:251
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
NTSTATUS NTAPI IntCopyRegistryValue(HANDLE SourceKeyHandle, HANDLE DestKeyHandle, PWSTR ValueName)
Definition: registry.c:230
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1061
unsigned char UCHAR
Definition: xmlstorage.h:181
Definition: ketypes.h:687
struct _VIDEO_PORT_DRIVER_EXTENSION VIDEO_PORT_DRIVER_EXTENSION
PDEVICE_OBJECT NextDeviceObject
Definition: videoprt.h:86
struct _VIDEO_PORT_CHILD_EXTENSION VIDEO_PORT_CHILD_EXTENSION
Definition: typedefs.h:117
_In_ ULONG _In_ BOOLEAN _Must_inspect_result_ PVOID * VirtualAddress
Definition: ndis.h:3791
PVOID NTAPI IntVideoPortGetProcAddress(IN PVOID HwDeviceExtension, IN PUCHAR FunctionName)
Definition: funclist.c:100
_In_ UCHAR MinorFunction
Definition: pofuncs.h:42
PPCI_DRIVER_EXTENSION DriverExtension
Definition: pci.c:41
PVIDEO_PORT_AGP_MAPPING AgpMapping
Definition: videoprt.h:62
NTSTATUS NTAPI IntAgpGetInterface(IN PVOID HwDeviceExtension, IN OUT PINTERFACE Interface)
Definition: agp.c:496
NTSTATUS IopInitiatePnpIrp(PDEVICE_OBJECT DeviceObject, PIO_STATUS_BLOCK IoStatusBlock, UCHAR MinorFunction, PIO_STACK_LOCATION Stack OPTIONAL)
Definition: agp.c:30
PDRIVER_OBJECT DriverObject
Definition: videoprt.h:83
NTSTATUS NTAPI IntVideoPortDispatchPdoPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: child.c:319
struct _VIDEO_PORT_DEVICE_EXTENSTION VIDEO_PORT_DEVICE_EXTENSION
#define _In_
Definition: no_sal2.h:204
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
struct _VIDEO_PORT_AGP_VIRTUAL_MAPPING * PVIDEO_PORT_AGP_VIRTUAL_MAPPING
unsigned short USHORT
Definition: pedump.c:61
NTSTATUS NTAPI IntVideoPortDispatchCleanup(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:818
UNICODE_STRING RegistryPath
Definition: videoprt.h:71
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1492
NTSTATUS NTAPI IntVideoPortDispatchOpen(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:100
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
unsigned int * PULONG
Definition: retypes.h:1
NTSTATUS NTAPI IntVideoPortDispatchWrite(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:523
unsigned int UINT
Definition: ndis.h:50
VP_STATUS NTAPI IntInt10FreeBuffer(IN PVOID Context, IN USHORT Seg, IN USHORT Off)
Definition: int10.c:218
VIDEO_PORT_COMMON_EXTENSION Common
Definition: videoprt.h:81
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char * FunctionName
Definition: acpixf.h:1264
PKPROCESS Csrss
Definition: videoprt.c:34
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
BOOLEAN NTAPI IntVideoPortSetupTimer(IN PDEVICE_OBJECT DeviceObject, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension)
Definition: timer.c:43
#define OUT
Definition: typedefs.h:39
NTSTATUS NTAPI IntCreateNewRegistryPath(PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension)
Definition: registry.c:358
PDEVICE_OBJECT PhysicalDeviceObject
Definition: videoprt.h:120
unsigned int ULONG
Definition: retypes.h:1
LONG VP_STATUS
Definition: video.h:153
UNICODE_STRING RegistryPath
Definition: videoprt.h:87
VP_STATUS NTAPI IntInt10WriteMemory(IN PVOID Context, IN USHORT Seg, IN USHORT Off, IN PVOID Buffer, IN ULONG Length)
Definition: int10.c:283
INTERFACE_TYPE AdapterInterfaceType
Definition: videoprt.h:95
NTSTATUS NTAPI IntVideoPortDispatchSystemControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:870
struct _VIDEO_PORT_COMMON_EXTENSION VIDEO_PORT_COMMON_EXTENSION
unsigned short * PUSHORT
Definition: retypes.h:2
UNICODE_STRING DriverRegistryPath
Definition: ramdisk.c:124
KMUTEX VideoPortInt10Mutex
Definition: videoprt.c:36
* PKAPC_STATE
Definition: ketypes.h:1273
struct _VIDEO_PORT_AGP_MAPPING VIDEO_PORT_AGP_MAPPING
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68