ReactOS 0.4.15-dev-8100-g1887773
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/* PSEH for SEH Support */
36#include <pseh/pseh2.h>
37
38#define TAG_VIDEO_PORT 'PDIV'
39#define TAG_VIDEO_PORT_BUFFER '\0mpV'
40#define TAG_REQUEST_PACKET 'qRpV'
41
42#define GUID_STRING_LENGTH (38 * sizeof(WCHAR))
43
45{
53
55
57{
62
64{
69
71{
76
78{
81
83{
115
117{
119
123
125
128
130
133
134#define VIDEO_PORT_GET_CHILD_EXTENSION(MiniportExtension) \
135 CONTAINING_RECORD( \
136 MiniportExtension, \
137 VIDEO_PORT_CHILD_EXTENSION, \
138 ChildDeviceExtension)
139
140#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension) \
141 CONTAINING_RECORD( \
142 MiniportExtension, \
143 VIDEO_PORT_DEVICE_EXTENSION, \
144 MiniPortDeviceExtension)
145
146typedef struct _VIDEO_PORT_EVENT
147{
150
151/* agp.c */
152
159
162 IN PVOID HwDeviceExtension,
164
165/* child.c */
166
170 IN PIRP Irp);
171
172/* dispatch.c */
173
178
182 IN PIRP Irp);
183
187 IN PIRP Irp);
188
192 IN PIRP Irp);
193
197 IN PIRP Irp);
198
202 IN PIRP Irp);
203
207 IN PIRP Irp);
208
212 IN PIRP Irp);
213
216
217/* timer.c */
218
223
224/* interrupt.c */
225
230 IN PVIDEO_PORT_CONFIG_INFO ConfigInfo);
231
232/* resource.c */
233
237 IN PIO_STACK_LOCATION IrpStack,
238 IN PIRP Irp);
239
240VOID
242 _In_ PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension);
243
248 IN ULONG SizeInBytes,
251
252/* videoprt.c */
253
254extern PKPROCESS CsrProcess;
260
263
266
272 _In_ USHORT AdapterNumber,
273 _In_ USHORT DisplayNumber,
275
281
284 IN PVOID HwDeviceExtension,
286
290 IN PIRP Irp);
291
292/* int10.c */
293
295NTAPI
297
301 OUT PUSHORT Seg,
302 OUT PUSHORT Off,
304
308 IN USHORT Seg,
309 IN USHORT Off);
310
314 IN USHORT Seg,
315 IN USHORT Off,
317 IN ULONG Length);
318
322 IN USHORT Seg,
323 IN USHORT Off,
325 IN ULONG Length);
326
330 IN OUT PINT10_BIOS_ARGUMENTS BiosArguments);
331
332/* registry.c */
333
335NTAPI
337 _In_ HANDLE SourceKeyHandle,
338 _In_ HANDLE DestKeyHandle);
339
341NTAPI
343 HANDLE SourceKeyHandle,
344 HANDLE DestKeyHandle,
346
348NTAPI
350 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension);
351
353NTAPI
355 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension);
356
358NTAPI
362 OUT PUNICODE_STRING DeviceRegistryPath);
363
364
365#endif /* VIDEOPRT_H */
unsigned char BOOLEAN
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:1279
LONG NTSTATUS
Definition: precomp.h:26
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1157
Definition: bufpool.h:45
_In_ PCHAR _In_ ULONG DeviceNumber
Definition: classpnp.h:1230
_In_ PIRP Irp
Definition: csq.h:116
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
enum _INTERFACE_TYPE INTERFACE_TYPE
UNICODE_STRING DriverRegistryPath
Definition: inport.c:17
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
#define _Out_opt_
Definition: ms_sal.h:346
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
unsigned int UINT
Definition: ndis.h:50
#define FASTCALL
Definition: nt_native.h:50
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1765
PPCI_DRIVER_EXTENSION DriverExtension
Definition: pci.c:31
unsigned short USHORT
Definition: pedump.c:61
LONG VP_STATUS
Definition: video.h:153
enum _VIDEO_CHILD_TYPE VIDEO_CHILD_TYPE
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: ketypes.h:699
Definition: typedefs.h:120
PHYSICAL_ADDRESS IoAddress
Definition: videoprt.h:49
PHYSICAL_ADDRESS PhysicalAddress
Definition: videoprt.h:60
PVIDEO_PORT_AGP_MAPPING AgpMapping
Definition: videoprt.h:65
PDEVICE_OBJECT PhysicalDeviceObject
Definition: videoprt.h:127
VIDEO_CHILD_TYPE ChildType
Definition: videoprt.h:121
PDRIVER_OBJECT DriverObject
Definition: videoprt.h:126
VIDEO_PORT_COMMON_EXTENSION Common
Definition: videoprt.h:118
PDEVICE_OBJECT PhysicalDeviceObject
Definition: videoprt.h:87
PCM_RESOURCE_LIST AllocatedResources
Definition: videoprt.h:94
PDEVICE_OBJECT NextDeviceObject
Definition: videoprt.h:89
VIDEO_PORT_DRIVER_EXTENSION * DriverExtension
Definition: videoprt.h:103
INTERFACE_TYPE AdapterInterfaceType
Definition: videoprt.h:98
CHAR POINTER_ALIGNMENT MiniPortDeviceExtension[1]
Definition: videoprt.h:113
UNICODE_STRING RegistryPath
Definition: videoprt.h:90
LIST_ENTRY AddressMappingListHead
Definition: videoprt.h:101
VIDEO_PORT_COMMON_EXTENSION Common
Definition: videoprt.h:84
PDRIVER_OBJECT DriverObject
Definition: videoprt.h:86
AGP_BUS_INTERFACE_STANDARD AgpInterface
Definition: videoprt.h:105
UNICODE_STRING NewRegistryPath
Definition: videoprt.h:91
PDEVICE_OBJECT FunctionalDeviceObject
Definition: videoprt.h:88
UNICODE_STRING RegistryPath
Definition: videoprt.h:74
VIDEO_HW_INITIALIZATION_DATA InitializationData
Definition: videoprt.h:72
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
uint16_t * PUSHORT
Definition: typedefs.h:56
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
struct _VIDEO_PORT_AGP_MAPPING * PVIDEO_PORT_AGP_MAPPING
NTSTATUS NTAPI IntVideoPortDispatchClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:436
VP_STATUS NTAPI IntInt10ReadMemory(IN PVOID Context, IN USHORT Seg, IN USHORT Off, OUT PVOID Buffer, IN ULONG Length)
Definition: int10.c:306
PKPROCESS CsrProcess
Definition: videoprt.c:39
VOID FASTCALL IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:588
VP_STATUS NTAPI IntInt10WriteMemory(IN PVOID Context, IN USHORT Seg, IN USHORT Off, IN PVOID Buffer, IN ULONG Length)
Definition: int10.c:344
NTSTATUS NTAPI IntVideoPortMapPhysicalMemory(IN HANDLE Process, IN PHYSICAL_ADDRESS PhysicalAddress, IN ULONG SizeInBytes, IN ULONG Protect, IN OUT PVOID *VirtualAddress OPTIONAL)
Definition: resource.c:219
BOOLEAN VideoPortUseNewKey
Definition: videoprt.c:41
NTSTATUS NTAPI IntVideoPortDispatchCleanup(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:1123
VOID NTAPI IntVideoPortUnload(PDRIVER_OBJECT DriverObject)
Definition: dispatch.c:1197
VOID FASTCALL IntAttachToCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:575
struct _VIDEO_PORT_EVENT VIDEO_PORT_EVENT
LIST_ENTRY HwResetAdaptersList
BOOLEAN NTAPI IntVideoPortSetupTimer(IN PDEVICE_OBJECT DeviceObject, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension)
Definition: timer.c:43
struct _VIDEO_PORT_AGP_VIRTUAL_MAPPING * PVIDEO_PORT_AGP_VIRTUAL_MAPPING
NTSTATUS NTAPI IntCreateRegistryPath(IN PCUNICODE_STRING DriverRegistryPath, IN ULONG DeviceNumber, OUT PUNICODE_STRING DeviceRegistryPath)
Definition: registry.c:601
PVOID NTAPI IntVideoPortGetProcAddress(IN PVOID HwDeviceExtension, IN PUCHAR FunctionName)
Definition: funclist.c:100
struct _VIDEO_PORT_COMMON_EXTENSION VIDEO_PORT_COMMON_EXTENSION
NTSTATUS NTAPI IntVideoPortDispatchOpen(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:369
NTSTATUS NTAPI IntVideoPortDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:723
NTSTATUS IopInitiatePnpIrp(PDEVICE_OBJECT DeviceObject, PIO_STATUS_BLOCK IoStatusBlock, UCHAR MinorFunction, PIO_STACK_LOCATION Stack OPTIONAL)
Definition: agp.c:30
struct _VIDEO_PORT_AGP_MAPPING VIDEO_PORT_AGP_MAPPING
NTSTATUS NTAPI IntVideoPortDispatchSystemControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:1175
struct _VIDEO_PORT_EVENT * PVIDEO_PORT_EVENT
NTSTATUS NTAPI IntCopyRegistryValue(HANDLE SourceKeyHandle, HANDLE DestKeyHandle, PWSTR ValueName)
Definition: registry.c:230
NTSTATUS NTAPI IntVideoPortCreateAdapterDeviceObject(_In_ PDRIVER_OBJECT DriverObject, _In_ PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, _In_opt_ PDEVICE_OBJECT PhysicalDeviceObject, _In_ USHORT AdapterNumber, _In_ USHORT DisplayNumber, _Out_opt_ PDEVICE_OBJECT *DeviceObject)
Definition: videoprt.c:159
struct _VIDEO_PORT_COMMON_EXTENSION * PVIDEO_PORT_COMMON_EXTENSION
NTSTATUS NTAPI IntVideoPortFindAdapter(IN PDRIVER_OBJECT DriverObject, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PDEVICE_OBJECT DeviceObject)
Definition: videoprt.c:414
VP_STATUS NTAPI IntInt10FreeBuffer(IN PVOID Context, IN USHORT Seg, IN USHORT Off)
Definition: int10.c:273
struct _VIDEO_PORT_DRIVER_EXTENSION VIDEO_PORT_DRIVER_EXTENSION
struct _VIDEO_PORT_DRIVER_EXTENSION * PVIDEO_PORT_DRIVER_EXTENSION
NTSTATUS NTAPI IntCreateNewRegistryPath(PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension)
Definition: registry.c:407
NTSTATUS NTAPI IntVideoPortDispatchPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:1109
NTSTATUS NTAPI IntVideoPortDispatchPdoPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: child.c:386
struct _VIDEO_PORT_DEVICE_EXTENSTION * PVIDEO_PORT_DEVICE_EXTENSION
BOOLEAN NTAPI IntVideoPortSetupInterrupt(IN PDEVICE_OBJECT DeviceObject, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PVIDEO_PORT_CONFIG_INFO ConfigInfo)
Definition: interrupt.c:45
NTSTATUS NTAPI IntVideoPortFilterResourceRequirements(IN PDEVICE_OBJECT DeviceObject, IN PIO_STACK_LOCATION IrpStack, IN PIRP Irp)
Definition: resource.c:77
ULONG VideoPortDeviceNumber
VP_STATUS NTAPI IntInt10AllocateBuffer(IN PVOID Context, OUT PUSHORT Seg, OUT PUSHORT Off, IN OUT PULONG Length)
Definition: int10.c:210
struct _VIDEO_PORT_AGP_VIRTUAL_MAPPING VIDEO_PORT_AGP_VIRTUAL_MAPPING
VP_STATUS NTAPI IntInt10CallBios(IN PVOID Context, IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)
Definition: int10.c:380
KMUTEX VideoPortInt10Mutex
Definition: videoprt.c:42
NTSTATUS NTAPI IntSetupDeviceSettingsKey(PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension)
Definition: registry.c:297
struct _VIDEO_PORT_ADDRESS_MAPPING VIDEO_PORT_ADDRESS_MAPPING
struct _VIDEO_PORT_CHILD_EXTENSION * PVIDEO_PORT_CHILD_EXTENSION
VOID IntVideoPortReleaseResources(_In_ PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension)
Definition: resource.c:194
NTSTATUS NTAPI IntInitializeVideoAddressSpace(VOID)
Definition: int10.c:200
NTSTATUS NTAPI IntVideoPortAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject)
Definition: dispatch.c:334
NTSTATUS NTAPI IntAgpGetInterface(IN PVOID HwDeviceExtension, IN OUT PINTERFACE Interface)
Definition: agp.c:496
struct _VIDEO_PORT_DEVICE_EXTENSTION VIDEO_PORT_DEVICE_EXTENSION
struct _VIDEO_PORT_ADDRESS_MAPPING * PVIDEO_PORT_ADDRESS_MAPPING
KSPIN_LOCK HwResetAdaptersLock
Definition: videoprt.c:43
NTSTATUS NTAPI IntCopyRegistryKey(_In_ HANDLE SourceKeyHandle, _In_ HANDLE DestKeyHandle)
Definition: registry.c:31
NTSTATUS NTAPI IntVideoPortEnumerateChildren(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: videoprt.c:1280
NTSTATUS NTAPI IntVideoPortDispatchPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:1141
struct _VIDEO_PORT_CHILD_EXTENSION VIDEO_PORT_CHILD_EXTENSION
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ UCHAR _In_ UCHAR MinorFunction
Definition: wdfdevice.h:1699
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
Definition: wdfrequest.h:639
#define POINTER_ALIGNMENT
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1098
* PKAPC_STATE
Definition: ketypes.h:1409
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175
_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:221