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
32 #include <ndk/ntndk.h>
38 #define TAG_VIDEO_PORT 'PDIV'
39 #define TAG_VIDEO_PORT_BUFFER '\0mpV'
41 typedef struct _VIDEO_PORT_ADDRESS_MAPPING
46 PHYSICAL_ADDRESS IoAddress
;
47 ULONG SystemIoBusNumber
;
49 } VIDEO_PORT_ADDRESS_MAPPING
, *PVIDEO_PORT_ADDRESS_MAPPING
;
51 struct _VIDEO_PORT_AGP_VIRTUAL_MAPPING
;
53 typedef struct _VIDEO_PORT_AGP_MAPPING
57 PHYSICAL_ADDRESS PhysicalAddress
;
58 } VIDEO_PORT_AGP_MAPPING
, *PVIDEO_PORT_AGP_MAPPING
;
60 typedef struct _VIDEO_PORT_AGP_VIRTUAL_MAPPING
62 PVIDEO_PORT_AGP_MAPPING AgpMapping
;
65 } VIDEO_PORT_AGP_VIRTUAL_MAPPING
, *PVIDEO_PORT_AGP_VIRTUAL_MAPPING
;
67 typedef struct _VIDEO_PORT_DRIVER_EXTENSION
69 VIDEO_HW_INITIALIZATION_DATA InitializationData
;
71 UNICODE_STRING RegistryPath
;
72 } VIDEO_PORT_DRIVER_EXTENSION
, *PVIDEO_PORT_DRIVER_EXTENSION
;
74 typedef struct _VIDEO_PORT_DEVICE_EXTENSTION
77 PDRIVER_OBJECT DriverObject
;
78 PDEVICE_OBJECT PhysicalDeviceObject
;
79 PDEVICE_OBJECT FunctionalDeviceObject
;
80 PDEVICE_OBJECT NextDeviceObject
;
81 UNICODE_STRING RegistryPath
;
82 PKINTERRUPT InterruptObject
;
83 KSPIN_LOCK InterruptSpinLock
;
84 PCM_RESOURCE_LIST AllocatedResources
;
85 ULONG InterruptVector
;
87 BOOLEAN InterruptShared
;
88 INTERFACE_TYPE AdapterInterfaceType
;
89 ULONG SystemIoBusNumber
;
90 ULONG SystemIoSlotNumber
;
91 LIST_ENTRY AddressMappingListHead
;
93 VIDEO_PORT_DRIVER_EXTENSION
*DriverExtension
;
95 AGP_BUS_INTERFACE_STANDARD AgpInterface
;
97 CHAR MiniPortDeviceExtension
[1];
98 } VIDEO_PORT_DEVICE_EXTENSION
, *PVIDEO_PORT_DEVICE_EXTENSION
;
100 #define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension) \
103 VIDEO_PORT_DEVICE_EXTENSION, \
104 MiniPortDeviceExtension)
106 typedef struct _VIDEO_PORT_EVENT
113 } VIDEO_PORT_EVENT
, *PVIDEO_PORT_EVENT
;
119 PDEVICE_OBJECT DeviceObject
,
120 PIO_STATUS_BLOCK IoStatusBlock
,
122 PIO_STACK_LOCATION Stack OPTIONAL
);
126 IN PVOID HwDeviceExtension
,
127 IN OUT PINTERFACE Interface
);
132 IntVideoPortAddDevice(
133 IN PDRIVER_OBJECT DriverObject
,
134 IN PDEVICE_OBJECT PhysicalDeviceObject
);
137 IntVideoPortDispatchOpen(
138 IN PDEVICE_OBJECT DeviceObject
,
142 IntVideoPortDispatchClose(
143 IN PDEVICE_OBJECT DeviceObject
,
147 IntVideoPortDispatchCleanup(
148 IN PDEVICE_OBJECT DeviceObject
,
152 IntVideoPortDispatchDeviceControl(
153 IN PDEVICE_OBJECT DeviceObject
,
157 IntVideoPortDispatchPnp(
158 IN PDEVICE_OBJECT DeviceObject
,
162 IntVideoPortDispatchPower(
163 IN PDEVICE_OBJECT DeviceObject
,
167 IntVideoPortDispatchSystemControl(
168 IN PDEVICE_OBJECT DeviceObject
,
172 IntVideoPortDispatchWrite(
173 IN PDEVICE_OBJECT DeviceObject
,
177 IntVideoPortUnload(PDRIVER_OBJECT DriverObject
);
182 IntVideoPortSetupTimer(
183 IN PDEVICE_OBJECT DeviceObject
,
184 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
);
189 IntVideoPortSetupInterrupt(
190 IN PDEVICE_OBJECT DeviceObject
,
191 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
,
192 IN PVIDEO_PORT_CONFIG_INFO ConfigInfo
);
197 IntVideoPortMapPhysicalMemory(
199 IN PHYSICAL_ADDRESS PhysicalAddress
,
200 IN ULONG SizeInBytes
,
202 IN OUT PVOID
*VirtualAddress OPTIONAL
);
206 extern ULONG CsrssInitialized
;
207 extern PKPROCESS Csrss
;
208 extern ULONG VideoPortDeviceNumber
;
211 IntAttachToCSRSS(PKPROCESS
*CallingProcess
, PKAPC_STATE ApcState
);
214 IntDetachFromCSRSS(PKPROCESS
*CallingProcess
, PKAPC_STATE ApcState
);
217 IntVideoPortCreateAdapterDeviceObject(
218 IN PDRIVER_OBJECT DriverObject
,
219 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
,
220 IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL
,
221 OUT PDEVICE_OBJECT
*DeviceObject OPTIONAL
);
224 IntVideoPortFindAdapter(
225 IN PDRIVER_OBJECT DriverObject
,
226 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
,
227 IN PDEVICE_OBJECT DeviceObject
);
230 IntVideoPortGetProcAddress(
231 IN PVOID HwDeviceExtension
,
232 IN PUCHAR FunctionName
);
237 IntInt10AllocateBuffer(
241 IN OUT PULONG Length
);
268 IN OUT PINT10_BIOS_ARGUMENTS BiosArguments
);
270 #endif /* VIDEOPRT_H */