4 * Copyright (C) 2002, 2003, 2004 ReactOS Team
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.
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.
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
33 #include <ndk/ntndk.h>
39 #define TAG_VIDEO_PORT 'PDIV'
40 #define TAG_VIDEO_PORT_BUFFER '\0mpV'
42 typedef struct _VIDEO_PORT_ADDRESS_MAPPING
47 PHYSICAL_ADDRESS IoAddress
;
48 ULONG SystemIoBusNumber
;
50 } VIDEO_PORT_ADDRESS_MAPPING
, *PVIDEO_PORT_ADDRESS_MAPPING
;
52 struct _VIDEO_PORT_AGP_VIRTUAL_MAPPING
;
54 typedef struct _VIDEO_PORT_AGP_MAPPING
58 PHYSICAL_ADDRESS PhysicalAddress
;
59 } VIDEO_PORT_AGP_MAPPING
, *PVIDEO_PORT_AGP_MAPPING
;
61 typedef struct _VIDEO_PORT_AGP_VIRTUAL_MAPPING
63 PVIDEO_PORT_AGP_MAPPING AgpMapping
;
66 } VIDEO_PORT_AGP_VIRTUAL_MAPPING
, *PVIDEO_PORT_AGP_VIRTUAL_MAPPING
;
68 typedef struct _VIDEO_PORT_DRIVER_EXTENSION
70 VIDEO_HW_INITIALIZATION_DATA InitializationData
;
72 UNICODE_STRING RegistryPath
;
73 } VIDEO_PORT_DRIVER_EXTENSION
, *PVIDEO_PORT_DRIVER_EXTENSION
;
75 typedef struct _VIDEO_PORT_DEVICE_EXTENSTION
78 PDRIVER_OBJECT DriverObject
;
79 PDEVICE_OBJECT PhysicalDeviceObject
;
80 PDEVICE_OBJECT FunctionalDeviceObject
;
81 PDEVICE_OBJECT NextDeviceObject
;
82 UNICODE_STRING RegistryPath
;
83 PKINTERRUPT InterruptObject
;
84 KSPIN_LOCK InterruptSpinLock
;
85 PCM_RESOURCE_LIST AllocatedResources
;
86 ULONG InterruptVector
;
88 BOOLEAN InterruptShared
;
89 INTERFACE_TYPE AdapterInterfaceType
;
90 ULONG SystemIoBusNumber
;
91 ULONG SystemIoSlotNumber
;
92 LIST_ENTRY AddressMappingListHead
;
94 VIDEO_PORT_DRIVER_EXTENSION
*DriverExtension
;
96 AGP_BUS_INTERFACE_STANDARD AgpInterface
;
98 CHAR MiniPortDeviceExtension
[1];
99 } VIDEO_PORT_DEVICE_EXTENSION
, *PVIDEO_PORT_DEVICE_EXTENSION
;
101 #define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension) \
104 VIDEO_PORT_DEVICE_EXTENSION, \
105 MiniPortDeviceExtension)
107 typedef struct _VIDEO_PORT_EVENT
114 } VIDEO_PORT_EVENT
, *PVIDEO_PORT_EVENT
;
120 PDEVICE_OBJECT DeviceObject
,
121 PIO_STATUS_BLOCK IoStatusBlock
,
123 PIO_STACK_LOCATION Stack OPTIONAL
);
127 IN PVOID HwDeviceExtension
,
128 IN OUT PINTERFACE Interface
);
133 IntVideoPortAddDevice(
134 IN PDRIVER_OBJECT DriverObject
,
135 IN PDEVICE_OBJECT PhysicalDeviceObject
);
138 IntVideoPortDispatchOpen(
139 IN PDEVICE_OBJECT DeviceObject
,
143 IntVideoPortDispatchClose(
144 IN PDEVICE_OBJECT DeviceObject
,
148 IntVideoPortDispatchCleanup(
149 IN PDEVICE_OBJECT DeviceObject
,
153 IntVideoPortDispatchDeviceControl(
154 IN PDEVICE_OBJECT DeviceObject
,
158 IntVideoPortDispatchPnp(
159 IN PDEVICE_OBJECT DeviceObject
,
163 IntVideoPortDispatchPower(
164 IN PDEVICE_OBJECT DeviceObject
,
168 IntVideoPortDispatchSystemControl(
169 IN PDEVICE_OBJECT DeviceObject
,
173 IntVideoPortDispatchWrite(
174 IN PDEVICE_OBJECT DeviceObject
,
178 IntVideoPortUnload(PDRIVER_OBJECT DriverObject
);
183 IntVideoPortSetupTimer(
184 IN PDEVICE_OBJECT DeviceObject
,
185 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
);
190 IntVideoPortSetupInterrupt(
191 IN PDEVICE_OBJECT DeviceObject
,
192 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
,
193 IN PVIDEO_PORT_CONFIG_INFO ConfigInfo
);
198 IntVideoPortMapPhysicalMemory(
200 IN PHYSICAL_ADDRESS PhysicalAddress
,
201 IN ULONG SizeInBytes
,
203 IN OUT PVOID
*VirtualAddress OPTIONAL
);
207 extern ULONG CsrssInitialized
;
208 extern PKPROCESS Csrss
;
209 extern ULONG VideoPortDeviceNumber
;
212 IntAttachToCSRSS(PKPROCESS
*CallingProcess
, PKAPC_STATE ApcState
);
215 IntDetachFromCSRSS(PKPROCESS
*CallingProcess
, PKAPC_STATE ApcState
);
218 IntVideoPortCreateAdapterDeviceObject(
219 IN PDRIVER_OBJECT DriverObject
,
220 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
,
221 IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL
,
222 OUT PDEVICE_OBJECT
*DeviceObject OPTIONAL
);
225 IntVideoPortFindAdapter(
226 IN PDRIVER_OBJECT DriverObject
,
227 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
,
228 IN PDEVICE_OBJECT DeviceObject
);
231 IntVideoPortGetProcAddress(
232 IN PVOID HwDeviceExtension
,
233 IN PUCHAR FunctionName
);
238 IntInt10AllocateBuffer(
242 IN OUT PULONG Length
);
269 IN OUT PINT10_BIOS_ARGUMENTS BiosArguments
);
271 #endif /* VIDEOPRT_H */