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 Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 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 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; see the file COPYING.LIB.
18 * If not, write to the Free Software Foundation,
19 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 #include <ddk/miniport.h>
28 #include <ddk/video.h>
29 #include <ddk/ntddvdeo.h>
30 #include <ddk/ntapi.h>
34 int swprintf(wchar_t *buf
, const wchar_t *fmt
, ...);
35 int vsprintf(char *buf
, const char *fmt
, va_list args
);
38 HalDisableSystemInterrupt(ULONG Vector
,
42 HalEnableSystemInterrupt(ULONG Vector
,
44 KINTERRUPT_MODE InterruptMode
);
46 PIMAGE_NT_HEADERS STDCALL
RtlImageNtHeader(IN PVOID BaseAddress
);
48 #define TAG_VIDEO_PORT TAG('V', 'I', 'D', 'P')
50 typedef struct _VIDEO_PORT_ADDRESS_MAPPING
54 PVOID MappedUserAddress
;
56 PHYSICAL_ADDRESS IoAddress
;
57 ULONG SystemIoBusNumber
;
59 UINT UserMappingCount
;
60 } VIDEO_PORT_ADDRESS_MAPPING
, *PVIDEO_PORT_ADDRESS_MAPPING
;
62 typedef struct _VIDEO_PORT_DRIVER_EXTENSION
64 VIDEO_HW_INITIALIZATION_DATA InitializationData
;
66 UNICODE_STRING RegistryPath
;
67 } VIDEO_PORT_DRIVER_EXTENSION
, *PVIDEO_PORT_DRIVER_EXTENSION
;
69 typedef struct _VIDEO_PORT_DEVICE_EXTENSTION
71 PDEVICE_OBJECT PhysicalDeviceObject
;
72 PDEVICE_OBJECT FunctionalDeviceObject
;
73 PDEVICE_OBJECT NextDeviceObject
;
74 UNICODE_STRING RegistryPath
;
75 PKINTERRUPT InterruptObject
;
76 KSPIN_LOCK InterruptSpinLock
;
77 ULONG InterruptVector
;
79 ULONG AdapterInterfaceType
;
80 ULONG SystemIoBusNumber
;
81 ULONG SystemIoSlotNumber
;
82 LIST_ENTRY AddressMappingListHead
;
84 VIDEO_PORT_DRIVER_EXTENSION
*DriverExtension
;
86 CHAR MiniPortDeviceExtension
[1];
87 } VIDEO_PORT_DEVICE_EXTENSION
, *PVIDEO_PORT_DEVICE_EXTENSION
;
89 #define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension) \
92 VIDEO_PORT_DEVICE_EXTENSION, \
93 MiniPortDeviceExtension)
98 IntVideoPortAddDevice(
99 IN PDRIVER_OBJECT DriverObject
,
100 IN PDEVICE_OBJECT PhysicalDeviceObject
);
103 IntVideoPortDispatchOpen(
104 IN PDEVICE_OBJECT DeviceObject
,
108 IntVideoPortDispatchClose(
109 IN PDEVICE_OBJECT DeviceObject
,
113 IntVideoPortDispatchCleanup(
114 IN PDEVICE_OBJECT DeviceObject
,
118 IntVideoPortDispatchDeviceControl(
119 IN PDEVICE_OBJECT DeviceObject
,
123 IntVideoPortDispatchPnp(
124 IN PDEVICE_OBJECT DeviceObject
,
128 IntVideoPortDispatchPower(
129 IN PDEVICE_OBJECT DeviceObject
,
133 IntVideoPortUnload(PDRIVER_OBJECT DriverObject
);
138 IntVideoPortSetupTimer(
139 IN PDEVICE_OBJECT DeviceObject
,
140 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
);
145 IntVideoPortSetupInterrupt(
146 IN PDEVICE_OBJECT DeviceObject
,
147 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
,
148 IN PVIDEO_PORT_CONFIG_INFO ConfigInfo
);
152 extern ULONG CsrssInitialized
;
153 extern PEPROCESS Csrss
;
156 VideoPortGetProcAddress(
157 IN PVOID HwDeviceExtension
,
158 IN PUCHAR FunctionName
);
161 IntAttachToCSRSS(PEPROCESS
*CallingProcess
, PEPROCESS
*PrevAttachedProcess
);
164 IntDetachFromCSRSS(PEPROCESS
*CallingProcess
, PEPROCESS
*PrevAttachedProcess
);
167 IntVideoPortFindAdapter(
168 IN PDRIVER_OBJECT DriverObject
,
169 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
,
170 IN PDEVICE_OBJECT PhysicalDeviceObject
);
175 IntInt10AllocateBuffer(
179 IN OUT PULONG Length
);
206 IN OUT PINT10_BIOS_ARGUMENTS BiosArguments
);
210 IN PVOID HwDeviceExtension
,
211 IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments
);
213 #endif /* VIDEOPRT_H */