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 LIST_ENTRY DmaAdapterList
;
99 CHAR MiniPortDeviceExtension
[1];
100 } VIDEO_PORT_DEVICE_EXTENSION
, *PVIDEO_PORT_DEVICE_EXTENSION
;
102 #define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension) \
105 VIDEO_PORT_DEVICE_EXTENSION, \
106 MiniPortDeviceExtension)
108 typedef struct _VIDEO_PORT_EVENT
111 } VIDEO_PORT_EVENT
, *PVIDEO_PORT_EVENT
;
117 PDEVICE_OBJECT DeviceObject
,
118 PIO_STATUS_BLOCK IoStatusBlock
,
120 PIO_STACK_LOCATION Stack OPTIONAL
);
124 IN PVOID HwDeviceExtension
,
125 IN OUT PINTERFACE Interface
);
130 IntVideoPortAddDevice(
131 IN PDRIVER_OBJECT DriverObject
,
132 IN PDEVICE_OBJECT PhysicalDeviceObject
);
135 IntVideoPortDispatchOpen(
136 IN PDEVICE_OBJECT DeviceObject
,
140 IntVideoPortDispatchClose(
141 IN PDEVICE_OBJECT DeviceObject
,
145 IntVideoPortDispatchCleanup(
146 IN PDEVICE_OBJECT DeviceObject
,
150 IntVideoPortDispatchDeviceControl(
151 IN PDEVICE_OBJECT DeviceObject
,
155 IntVideoPortDispatchPnp(
156 IN PDEVICE_OBJECT DeviceObject
,
160 IntVideoPortDispatchPower(
161 IN PDEVICE_OBJECT DeviceObject
,
165 IntVideoPortDispatchSystemControl(
166 IN PDEVICE_OBJECT DeviceObject
,
170 IntVideoPortDispatchWrite(
171 IN PDEVICE_OBJECT DeviceObject
,
175 IntVideoPortUnload(PDRIVER_OBJECT DriverObject
);
180 IntVideoPortSetupTimer(
181 IN PDEVICE_OBJECT DeviceObject
,
182 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
);
187 IntVideoPortSetupInterrupt(
188 IN PDEVICE_OBJECT DeviceObject
,
189 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
,
190 IN PVIDEO_PORT_CONFIG_INFO ConfigInfo
);
195 IntVideoPortMapPhysicalMemory(
197 IN PHYSICAL_ADDRESS PhysicalAddress
,
198 IN ULONG SizeInBytes
,
200 IN OUT PVOID
*VirtualAddress OPTIONAL
);
204 extern ULONG CsrssInitialized
;
205 extern PKPROCESS Csrss
;
206 extern ULONG VideoPortDeviceNumber
;
209 IntAttachToCSRSS(PKPROCESS
*CallingProcess
, PKAPC_STATE ApcState
);
212 IntDetachFromCSRSS(PKPROCESS
*CallingProcess
, PKAPC_STATE ApcState
);
215 IntVideoPortCreateAdapterDeviceObject(
216 IN PDRIVER_OBJECT DriverObject
,
217 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
,
218 IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL
,
219 OUT PDEVICE_OBJECT
*DeviceObject OPTIONAL
);
222 IntVideoPortFindAdapter(
223 IN PDRIVER_OBJECT DriverObject
,
224 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
,
225 IN PDEVICE_OBJECT DeviceObject
);
228 IntVideoPortGetProcAddress(
229 IN PVOID HwDeviceExtension
,
230 IN PUCHAR FunctionName
);
235 IntInt10AllocateBuffer(
239 IN OUT PULONG Length
);
266 IN OUT PINT10_BIOS_ARGUMENTS BiosArguments
);
268 #endif /* VIDEOPRT_H */