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>
42 #define TAG_VIDEO_PORT 'PDIV'
43 #define TAG_VIDEO_PORT_BUFFER '\0mpV'
45 typedef struct _VIDEO_PORT_ADDRESS_MAPPING
50 PHYSICAL_ADDRESS IoAddress
;
51 ULONG SystemIoBusNumber
;
53 } VIDEO_PORT_ADDRESS_MAPPING
, *PVIDEO_PORT_ADDRESS_MAPPING
;
55 struct _VIDEO_PORT_AGP_VIRTUAL_MAPPING
;
57 typedef struct _VIDEO_PORT_AGP_MAPPING
61 PHYSICAL_ADDRESS PhysicalAddress
;
62 } VIDEO_PORT_AGP_MAPPING
, *PVIDEO_PORT_AGP_MAPPING
;
64 typedef struct _VIDEO_PORT_AGP_VIRTUAL_MAPPING
66 PVIDEO_PORT_AGP_MAPPING AgpMapping
;
69 } VIDEO_PORT_AGP_VIRTUAL_MAPPING
, *PVIDEO_PORT_AGP_VIRTUAL_MAPPING
;
71 typedef struct _VIDEO_PORT_DRIVER_EXTENSION
73 VIDEO_HW_INITIALIZATION_DATA InitializationData
;
75 UNICODE_STRING RegistryPath
;
76 } VIDEO_PORT_DRIVER_EXTENSION
, *PVIDEO_PORT_DRIVER_EXTENSION
;
78 typedef struct _VIDEO_PORT_DEVICE_EXTENSTION
81 PDRIVER_OBJECT DriverObject
;
82 PDEVICE_OBJECT PhysicalDeviceObject
;
83 PDEVICE_OBJECT FunctionalDeviceObject
;
84 PDEVICE_OBJECT NextDeviceObject
;
85 UNICODE_STRING RegistryPath
;
86 PKINTERRUPT InterruptObject
;
87 KSPIN_LOCK InterruptSpinLock
;
88 PCM_RESOURCE_LIST AllocatedResources
;
89 ULONG InterruptVector
;
91 BOOLEAN InterruptShared
;
92 INTERFACE_TYPE AdapterInterfaceType
;
93 ULONG SystemIoBusNumber
;
94 ULONG SystemIoSlotNumber
;
95 LIST_ENTRY AddressMappingListHead
;
97 VIDEO_PORT_DRIVER_EXTENSION
*DriverExtension
;
99 AGP_BUS_INTERFACE_STANDARD AgpInterface
;
101 LIST_ENTRY DmaAdapterList
;
102 CHAR MiniPortDeviceExtension
[1];
103 } VIDEO_PORT_DEVICE_EXTENSION
, *PVIDEO_PORT_DEVICE_EXTENSION
;
105 #define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension) \
108 VIDEO_PORT_DEVICE_EXTENSION, \
109 MiniPortDeviceExtension)
111 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 */