ReactOS 0.4.16-dev-1255-g6dd0406
vgamp.c
Go to the documentation of this file.
1/*
2 * VGA.C - a generic VGA miniport driver
3 *
4 */
5
6// ------------------------------------------------------- Includes
7
8#include "vgamp.h"
9
10#include <dderror.h>
11#include <devioctl.h>
12
14{
15 { {{0x3b0}}, 0x3bb - 0x3b0 + 1, 1, 0, 0 },
16 { {{0x3c0}}, 0x3df - 0x3c0 + 1, 1, 0, 0 },
17 { {{0xa0000}}, 0x20000, 0, 0, 0 },
18};
19
20// ------------------------------------------------------- Public Interface
21
22// DriverEntry
23//
24// DESCRIPTION:
25// This function initializes the driver.
26//
27// RUN LEVEL:
28// PASSIVE_LEVEL
29//
30// ARGUMENTS:
31// IN PVOID Context1 Context parameter to pass to VidPortInitialize
32// IN PVOID Context2 Context parameter to pass to VidPortInitialize
33// RETURNS:
34// ULONG
35
39{
41
42 VideoPortZeroMemory(&InitData, sizeof InitData);
43
44 InitData.HwInitDataSize = sizeof(InitData);
45 /* FIXME: Fill in InitData members */
46 InitData.StartingDeviceNumber = 0;
47
48 /* Export driver entry points... */
50 InitData.HwInitialize = VGAInitialize;
51 InitData.HwStartIO = VGAStartIO;
52 /* InitData.HwInterrupt = VGAInterrupt; */
53 InitData.HwResetHw = VGAResetHw;
54 /* InitData.HwTimer = VGATimer; */
57
58 InitData.AdapterInterfaceType = Isa;
59 return VideoPortInitialize(Context1, Context2, &InitData, NULL);
60}
61
62// VGAFindAdapter
63//
64// DESCRIPTION:
65// This routine is called by the videoport driver to find and allocate
66// the adapter for a given bus. The miniport driver needs to do the
67// following in this routine:
68// - Determine if the adapter is present
69// - Claim any necessary memory/IO resources for the adapter
70// - Map resources into system memory for the adapter
71// - fill in relevant information in the VIDEO_PORT_CONFIG_INFO buffer
72// - update registry settings for adapter specifics.
73// - Set 'Again' based on whether the function should be called again
74// another adapter on the same bus.
75//
76// RUN LEVEL:
77// PASSIVE_LEVEL
78//
79// ARGUMENTS:
80// PVOID DeviceExtension
81// PVOID Context
82// PWSTR ArgumentString
83// PVIDEO_PORT_CONFIG_INFO ConfigInfo
84// PUCHAR Again
85// RETURNS:
86// VP_STATUS
87
89VGAFindAdapter(PVOID DeviceExtension,
91 PWSTR ArgumentString,
92 PVIDEO_PORT_CONFIG_INFO ConfigInfo,
93 PUCHAR Again)
94{
96
97 /* FIXME: Determine if the adapter is present */
98 *Again = FALSE;
99
100 if (ConfigInfo->Length < sizeof(VIDEO_PORT_CONFIG_INFO))
102
104 if (Status != NO_ERROR)
105 return Status;
106
109 return NO_ERROR;
110
111 /* FIXME: Claim any necessary memory/IO resources for the adapter */
112 /* FIXME: Map resources into system memory for the adapter */
113 /* FIXME: Fill in relevant information in the VIDEO_PORT_CONFIG_INFO buffer */
114 /* FIXME: Update registry settings for adapter specifics. */
115// return NO_ERROR;
116}
117
118// VGAInitialize
119//
120// DESCRIPTION:
121// Perform initialization tasks, but leave the adapter in the same
122// user visible state
123//
124// RUN LEVEL:
125// PASSIVE_LEVEL
126//
127// ARGUMENTS:
128// PVOID DeviceExtension
129// RETURNS:
130// BOOLEAN Success or failure
132VGAInitialize(PVOID DeviceExtension)
133{
134 return TRUE;
135}
136
137// VGAStartIO
138//
139// DESCRIPTION:
140// This function gets called in responce to GDI EngDeviceIoControl
141// calls. Device requests are passed in VRPs.
142// Required VRPs:
143// IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES
144// IOCTL_VIDEO_QUERY_AVAIL_MODES
145// IOCTL_VIDEO_QUERY_CURRENT_MODE
146// IOCTL_VIDEO_SET_CURRENT_MODE
147// IOCTL_VIDEO_RESET_DEVICE
148// IOCTL_VIDEO_MAP_VIDEO_MEMORY
149// IOCTL_VIDEO_UNMAP_VIDEO_MEMORY
150// IOCTL_VIDEO_SHARE_VIDEO_MEMORY
151// IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY
152// Optional VRPs:
153// IOCTL_VIDEO_GET_PUBLIC_ACCESS_RANGES
154// IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES
155// IOCTL_VIDEO_GET_POWER_MANAGEMENT
156// IOCTL_VIDEO_SET_POWER_MANAGEMENT
157// IOCTL_QUERY_COLOR_CAPABILITIES
158// IOCTL_VIDEO_SET_COLOR_REGISTERS (required if the device has a palette)
159// IOCTL_VIDEO_DISABLE_POINTER
160// IOCTL_VIDEO_ENABLE_POINTER
161// IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES
162// IOCTL_VIDEO_QUERY_POINTER_ATTR
163// IOCTL_VIDEO_SET_POINTER_ATTR
164// IOCTL_VIDEO_QUERY_POINTER_POSITION
165// IOCTL_VIDEO_SET_POINTER_POSITION
166// IOCTL_VIDEO_SAVE_HARDWARE_STATE
167// IOCTL_VIDEO_RESTORE_HARDWARE_STATE
168// IOCTL_VIDEO_DISABLE_CURSOR
169// IOCTL_VIDEO_ENABLE_CURSOR
170// IOCTL_VIDEO_QUERY_CURSOR_ATTR
171// IOCTL_VIDEO_SET_CURSOR_ATTR
172// IOCTL_VIDEO_QUERY_CURSOR_POSITION
173// IOCTL_VIDEO_SET_CURSOR_POSITION
174// IOCTL_VIDEO_GET_BANK_SELECT_CODE
175// IOCTL_VIDEO_SET_PALETTE_REGISTERS
176// IOCTL_VIDEO_LOAD_AND_SET_FONT
177//
178// RUN LEVEL:
179// PASSIVE_LEVEL
180//
181// ARGUMENTS:
182// PVOID DeviceExtension
183// PVIDEO_REQUEST_PACKET RequestPacket
184// RETURNS:
185// BOOLEAN This function must return TRUE, and complete the work or
186// set an error status in the VRP.
187
189VGAStartIO(PVOID DeviceExtension,
190 PVIDEO_REQUEST_PACKET RequestPacket)
191{
193
194 RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
195
196 switch (RequestPacket->IoControlCode)
197 {
199 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION) ||
200 RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
201 {
203 return TRUE;
204 }
205 Result = VGAMapVideoMemory(DeviceExtension,
206 (PVIDEO_MEMORY) RequestPacket->InputBuffer,
208 RequestPacket->OutputBuffer,
209 RequestPacket->StatusBlock);
210 break;
211
213 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION))
214 {
216 return TRUE;
217 }
219 RequestPacket->StatusBlock);
220 break;
221
223 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION))
224 {
226 return TRUE;
227 }
229 RequestPacket->StatusBlock);
230 break;
231
233 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_NUM_MODES))
234 {
236 return TRUE;
237 }
239 RequestPacket->StatusBlock);
240 break;
241
243 VGAResetDevice(RequestPacket->StatusBlock);
244 Result = TRUE;
245 break;
246
248 if (RequestPacket->InputBufferLength < sizeof(VIDEO_CLUT) ||
249 RequestPacket->InputBufferLength <
250 (((PVIDEO_CLUT)RequestPacket->InputBuffer)->NumEntries * sizeof(ULONG)) +
251 FIELD_OFFSET(VIDEO_CLUT, LookupTable))
252 {
254 return TRUE;
255 }
257 RequestPacket->StatusBlock);
258 break;
259
261 if (RequestPacket->InputBufferLength < sizeof(VIDEO_MODE))
262 {
264 return TRUE;
265 }
267 RequestPacket->StatusBlock);
268 break;
269
271 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION) ||
272 RequestPacket->InputBufferLength < sizeof(VIDEO_SHARE_MEMORY))
273 {
275 return TRUE;
276 }
279 RequestPacket->StatusBlock);
280 break;
281
283 if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
284 {
286 return TRUE;
287 }
288 Result = VGAUnmapVideoMemory(DeviceExtension,
289 (PVIDEO_MEMORY) RequestPacket->InputBuffer,
290 RequestPacket->StatusBlock);
291 break;
292
294 if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
295 {
297 return TRUE;
298 }
300 RequestPacket->StatusBlock);
301 break;
304 RequestPacket->StatusBlock);
305 break;
306
307#if 0
312
314 VGAFreePublicAccessRanges((PVIDEO_PUBLIC_ACCESS_RANGES)
315 RequestPacket->InputBuffer,
316 RequestPacket->StatusBlock);
317 break;
318
328
330 VGAQueryPublicAccessRanges((PVIDEO_PUBLIC_ACCESS_RANGES)
331 RequestPacket->OutputBuffer,
332 RequestPacket->StatusBlock);
333 break;
334
342
343#endif
344
345 default:
346 RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
347 return FALSE;
348 }
349
350 if (Result)
351 RequestPacket->StatusBlock->Status = NO_ERROR;
352
353 return TRUE;
354}
355
356#if 0
357// VGAInterrupt
358//
359// DESCRIPTION:
360// This function will be called upon receipt of a adapter generated
361// interrupt when enabled.
362//
363// RUN LEVEL:
364// IRQL
365//
366// ARGUMENTS:
367// PVOID DeviceExtension
368// RETURNS:
369// BOOLEAN TRUE if the interrupt was handled by the routine
370
371static BOOLEAN NTAPI
372VGAInterrupt(PVOID DeviceExtension)
373{
374 return(TRUE);
375}
376#endif
377
378// VGAResetHw
379//
380// DESCRIPTION:
381// This function is called to reset the hardware to a known state
382// if calling a BIOS int 10 reset will not achieve this result.
383//
384// RUN LEVEL:
385// PASSIVE_LEVEL
386//
387// ARGUMENTS:
388// PVOID DeviceExtension
389// ULONG Columns Columns and Rows specify the mode parameters
390// ULONG Rows to reset to.
391// RETURNS:
392// BOOLEAN TRUE if no further action is necessary, FALSE if the system
393// needs to still do a BIOS int 10 reset.
394
396VGAResetHw(PVOID DeviceExtension,
398 ULONG Rows)
399{
400 /* We don't anything to the vga that int10 can't cope with. */
401 return(FALSE);
402}
403
404#if 0
405// VGATimer
406//
407// DESCRIPTION:
408// This function will be called once a second when enabled
409//
410// RUN LEVEL:
411// PASSIVE_LEVEL
412//
413// ARGUMENTS:
414// PVOID DeviceExtension
415// RETURNS:
416// VOID
417
418static VOID NTAPI
419VGATimer(PVOID DeviceExtension)
420{
421}
422
423#endif
424
426 IN PVIDEO_MEMORY RequestedAddress,
427 OUT PVIDEO_MEMORY_INFORMATION MapInformation,
428 OUT PSTATUS_BLOCK StatusBlock)
429{
431 PVOID ReturnedAddress;
432 ULONG IoSpace;
433 PHYSICAL_ADDRESS FrameBufferBase;
434 ReturnedAddress = RequestedAddress->RequestedVirtualAddress;
435 ReturnedLength = 256 * 1024;
436 FrameBufferBase.QuadPart = 0xA0000;
438 StatusBlock->Status = VideoPortMapMemory(DeviceExtension,
439 FrameBufferBase,
441 &IoSpace,
442 &ReturnedAddress);
443 if (StatusBlock->Status != 0)
444 {
445 StatusBlock->Information = 0;
446 return TRUE;
447 }
448 MapInformation->VideoRamBase = MapInformation->FrameBufferBase =
449 ReturnedAddress;
450 MapInformation->VideoRamLength = MapInformation->FrameBufferLength =
452 StatusBlock->Information = sizeof(VIDEO_MEMORY_INFORMATION);
453 return TRUE;
454}
455
457 OUT PSTATUS_BLOCK StatusBlock)
458{
459 /* Only one mode exists in VGA (640x480), so use VGAQueryCurrentMode */
460 return VGAQueryCurrentMode(ReturnedModes, StatusBlock);
461}
462
464 OUT PSTATUS_BLOCK StatusBlock)
465{
466 CurrentMode->Length = sizeof(VIDEO_MODE_INFORMATION);
467 CurrentMode->ModeIndex = 2;
468 CurrentMode->VisScreenWidth = 640;
469 CurrentMode->VisScreenHeight = 480;
470 CurrentMode->ScreenStride = 80;
471 CurrentMode->NumberOfPlanes = 4;
472 CurrentMode->BitsPerPlane = 1;
473 CurrentMode->Frequency = 60;
474 CurrentMode->XMillimeter = 320;
475 CurrentMode->YMillimeter = 240;
476 CurrentMode->NumberRedBits =
477 CurrentMode->NumberGreenBits =
478 CurrentMode->NumberBlueBits = 6;
479 CurrentMode->RedMask =
480 CurrentMode->GreenMask =
481 CurrentMode->BlueMask = 0;
482 CurrentMode->VideoMemoryBitmapWidth = 640;
483 CurrentMode->VideoMemoryBitmapHeight = 480;
484 CurrentMode->AttributeFlags = VIDEO_MODE_GRAPHICS | VIDEO_MODE_COLOR |
486 CurrentMode->DriverSpecificAttributeFlags = 0;
487
488 StatusBlock->Information = sizeof(VIDEO_MODE_INFORMATION);
489 return TRUE;
490}
491
493 OUT PSTATUS_BLOCK StatusBlock)
494{
495 NumberOfModes->NumModes = 1;
496 NumberOfModes->ModeInformationLength = sizeof(VIDEO_MODE_INFORMATION);
497 StatusBlock->Information = sizeof(VIDEO_NUM_MODES);
498 return TRUE;
499}
500
502 OUT PSTATUS_BLOCK StatusBlock)
503{
504 ;
505
506/*
507 We don't need the following code because the palette registers are set correctly on VGA initialization.
508 Still, we may include\test this is in the future.
509
510 int i, j = 2;
511 char tmp, v;
512
513 tmp = VideoPortReadPortUchar(0x03da);
514 v = VideoPortReadPortUchar(0x03c0);
515
516 // Set the first 16 palette registers to map to the first 16 palette colors
517 for (i=PaletteRegisters[1]; i<PaletteRegisters[0]; i++)
518 {
519 tmp = VideoPortReadPortUchar(0x03da);
520 VideoPortWritePortUchar(0x03c0, i);
521 VideoPortWritePortUchar(0x03c0, PaletteRegisters[j++]);
522 }
523
524 tmp = VideoPortReadPortUchar(0x03da);
525 VideoPortWritePortUchar(0x03d0, v | 0x20);
526*/
527 return TRUE;
528}
529
531 OUT PSTATUS_BLOCK StatusBlock)
532{
533 int i;
534
535 for (i=ColorLookUpTable->FirstEntry; i<ColorLookUpTable->NumEntries; i++)
536 {
538 VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Red);
539 VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Green);
540 VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Blue);
541 }
542
543 return TRUE;
544}
545
547 OUT PSTATUS_BLOCK StatusBlock)
548{
549 if(RequestedMode->RequestedMode == 2)
550 {
551 InitVGAMode();
552 return TRUE;
553 } else {
554 VideoPortDebugPrint(Warn, "Unrecognised mode for VGASetCurrentMode\n");
555 return FALSE;
556 }
557}
558
560 OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory,
561 OUT PSTATUS_BLOCK StatusBlock)
562{
564
565 StatusBlock->Status = ERROR_INVALID_FUNCTION;
566 return FALSE;
567}
568
570 IN PVIDEO_MEMORY MemoryToUnmap,
571 OUT PSTATUS_BLOCK StatusBlock)
572{
573 if (VideoPortUnmapMemory(DeviceExtension,
574 MemoryToUnmap->RequestedVirtualAddress,
575 0) == NO_ERROR)
576 return TRUE;
577 else
578 return FALSE;
579}
580
582 OUT PSTATUS_BLOCK StatusBlock)
583{
585
586 StatusBlock->Status = ERROR_INVALID_FUNCTION;
587 return FALSE;
588}
unsigned char BOOLEAN
static const COLUMN_LIST Columns[]
Definition: listview.c:19
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:188
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15
#define NO_ERROR
Definition: dderror.h:5
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
DRIVER_INITIALIZE DriverEntry
Definition: condrv.c:21
Status
Definition: gdiplustypes.h:25
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
@ Isa
Definition: hwresource.cpp:138
VOID InitVGAMode(VOID)
Definition: initvga.c:110
VOID VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock)
Definition: initvga.c:117
#define IOCTL_VIDEO_SET_POWER_MANAGEMENT
Definition: ntddvdeo.h:239
#define IOCTL_VIDEO_SHARE_VIDEO_MEMORY
Definition: ntddvdeo.h:242
#define IOCTL_VIDEO_MAP_VIDEO_MEMORY
Definition: ntddvdeo.h:173
#define VIDEO_MODE_GRAPHICS
Definition: ntddvdeo.h:364
#define IOCTL_VIDEO_ENABLE_POINTER
Definition: ntddvdeo.h:155
#define IOCTL_VIDEO_SET_PALETTE_REGISTERS
Definition: ntddvdeo.h:230
#define IOCTL_VIDEO_SET_POINTER_ATTR
Definition: ntddvdeo.h:233
#define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY
Definition: ntddvdeo.h:248
#define VIDEO_MODE_COLOR
Definition: ntddvdeo.h:363
#define IOCTL_VIDEO_QUERY_CURSOR_ATTR
Definition: ntddvdeo.h:185
#define IOCTL_VIDEO_QUERY_CURSOR_POSITION
Definition: ntddvdeo.h:188
#define IOCTL_VIDEO_SET_CURSOR_POSITION
Definition: ntddvdeo.h:227
#define IOCTL_VIDEO_QUERY_CURRENT_MODE
Definition: ntddvdeo.h:182
#define IOCTL_VIDEO_ENABLE_CURSOR
Definition: ntddvdeo.h:152
#define IOCTL_VIDEO_DISABLE_CURSOR
Definition: ntddvdeo.h:146
#define IOCTL_VIDEO_GET_POWER_MANAGEMENT
Definition: ntddvdeo.h:167
#define IOCTL_VIDEO_SET_POINTER_POSITION
Definition: ntddvdeo.h:236
#define IOCTL_VIDEO_SET_CURRENT_MODE
Definition: ntddvdeo.h:221
#define IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES
Definition: ntddvdeo.h:158
#define IOCTL_VIDEO_GET_BANK_SELECT_CODE
Definition: ntddvdeo.h:161
#define IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES
Definition: ntddvdeo.h:197
#define IOCTL_VIDEO_SET_COLOR_REGISTERS
Definition: ntddvdeo.h:218
#define IOCTL_VIDEO_LOAD_AND_SET_FONT
Definition: ntddvdeo.h:170
#define IOCTL_VIDEO_RESET_DEVICE
Definition: ntddvdeo.h:206
#define IOCTL_VIDEO_QUERY_POINTER_POSITION
Definition: ntddvdeo.h:200
#define IOCTL_VIDEO_SET_CURSOR_ATTR
Definition: ntddvdeo.h:224
struct _VIDEO_NUM_MODES VIDEO_NUM_MODES
#define IOCTL_VIDEO_DISABLE_POINTER
Definition: ntddvdeo.h:149
struct _VIDEO_MEMORY_INFORMATION VIDEO_MEMORY_INFORMATION
#define IOCTL_VIDEO_QUERY_POINTER_ATTR
Definition: ntddvdeo.h:194
#define VIDEO_MODE_NO_OFF_SCREEN
Definition: ntddvdeo.h:368
#define IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY
Definition: ntddvdeo.h:251
struct _VIDEO_MODE_INFORMATION VIDEO_MODE_INFORMATION
#define IOCTL_VIDEO_QUERY_AVAIL_MODES
Definition: ntddvdeo.h:176
#define IOCTL_VIDEO_QUERY_COLOR_CAPABILITIES
Definition: ntddvdeo.h:179
#define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES
Definition: ntddvdeo.h:191
#define IOCTL_VIDEO_SAVE_HARDWARE_STATE
Definition: ntddvdeo.h:212
#define IOCTL_VIDEO_RESTORE_HARDWARE_STATE
Definition: ntddvdeo.h:209
#define IOCTL_VIDEO_QUERY_PUBLIC_ACCESS_RANGES
Definition: ntddvdeo.h:203
VPAPI VOID NTAPI VideoPortZeroMemory(IN PVOID Destination, IN ULONG Length)
@ Warn
Definition: video.h:589
VPAPI VP_STATUS NTAPI VideoPortVerifyAccessRanges(_In_ PVOID HwDeviceExtension, _In_opt_ ULONG NumAccessRanges, _In_reads_opt_(NumAccessRanges) PVIDEO_ACCESS_RANGE AccessRanges)
Claims or releases a range of hardware resources and checks for conflicts.
Definition: resource.c:926
VPAPI VP_STATUS NTAPI VideoPortUnmapMemory(IN PVOID HwDeviceExtension, IN OUT PVOID VirtualAddress, IN HANDLE ProcessHandle)
LONG VP_STATUS
Definition: video.h:153
VPAPI ULONG NTAPI VideoPortInitialize(IN PVOID Argument1, IN PVOID Argument2, IN PVIDEO_HW_INITIALIZATION_DATA HwInitializationData, IN PVOID HwContext)
Definition: videoprt.c:740
VPAPI VP_STATUS NTAPI VideoPortMapMemory(IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS PhysicalAddress, IN OUT PULONG Length, IN PULONG InIoSpace, IN OUT PVOID *VirtualAddress)
VPAPI VOID __cdecl VideoPortDebugPrint(IN VIDEO_DEBUG_LEVEL DebugPrintLevel, IN PSTR DebugMessage, IN ...)
#define VIDEO_MEMORY_SPACE_MEMORY
Definition: video.h:132
VPAPI VOID NTAPI VideoPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value)
VP_STATUS Status
Definition: video.h:323
ULONG RangeLength
Definition: video.h:216
PHYSICAL_ADDRESS RangeStart
Definition: video.h:215
PVIDEO_HW_FIND_ADAPTER HwFindAdapter
Definition: video.h:674
PVIDEO_HW_START_IO HwStartIO
Definition: video.h:677
PVIDEO_HW_RESET_HW HwResetHw
Definition: video.h:680
INTERFACE_TYPE AdapterInterfaceType
Definition: video.h:673
PVIDEO_ACCESS_RANGE HwLegacyResourceList
Definition: video.h:688
PVIDEO_HW_INITIALIZE HwInitialize
Definition: video.h:675
PHYSICAL_ADDRESS VdmPhysicalVideoMemoryAddress
Definition: video.h:176
ULONG VdmPhysicalVideoMemoryLength
Definition: video.h:177
ULONG InputBufferLength
Definition: video.h:333
PSTATUS_BLOCK StatusBlock
Definition: video.h:331
ULONG OutputBufferLength
Definition: video.h:335
_In_ PNET_PNP_EVENT _In_ PTDI_PNP_CONTEXT Context1
Definition: tdikrnl.h:1095
_In_ PNET_PNP_EVENT _In_ PTDI_PNP_CONTEXT _In_ PTDI_PNP_CONTEXT Context2
Definition: tdikrnl.h:1096
uint16_t * PWSTR
Definition: typedefs.h:56
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define NTAPI
Definition: typedefs.h:36
uint16_t * PUSHORT
Definition: typedefs.h:56
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
LONGLONG QuadPart
Definition: typedefs.h:114
BOOLEAN VGAUnmapVideoMemory(IN PVOID DeviceExtension, IN PVIDEO_MEMORY MemoryToUnmap, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:569
VIDEO_ACCESS_RANGE VGAAccessRange[]
Definition: vgamp.c:13
BOOLEAN VGASetColorRegisters(IN PVIDEO_CLUT ColorLookUpTable, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:530
BOOLEAN VGASetCurrentMode(IN PVIDEO_MODE RequestedMode, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:546
VP_STATUS NTAPI VGAFindAdapter(PVOID DeviceExtension, PVOID Context, PWSTR ArgumentString, PVIDEO_PORT_CONFIG_INFO ConfigInfo, PUCHAR Again)
Definition: vgamp.c:89
BOOLEAN NTAPI VGAInitialize(PVOID DeviceExtension)
Definition: vgamp.c:132
BOOLEAN VGAShareVideoMemory(IN PVIDEO_SHARE_MEMORY RequestedMemory, OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:559
BOOLEAN VGAMapVideoMemory(IN PVOID DeviceExtension, IN PVIDEO_MEMORY RequestedAddress, OUT PVIDEO_MEMORY_INFORMATION MapInformation, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:425
BOOLEAN VGAQueryAvailModes(OUT PVIDEO_MODE_INFORMATION ReturnedModes, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:456
BOOLEAN VGAUnshareVideoMemory(IN PVIDEO_MEMORY MemoryToUnshare, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:581
BOOLEAN NTAPI VGAStartIO(PVOID DeviceExtension, PVIDEO_REQUEST_PACKET RequestPacket)
Definition: vgamp.c:189
BOOLEAN NTAPI VGAResetHw(PVOID DeviceExtension, ULONG Columns, ULONG Rows)
Definition: vgamp.c:396
BOOLEAN VGASetPaletteRegisters(IN PUSHORT PaletteRegisters, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:501
BOOLEAN VGAQueryCurrentMode(OUT PVIDEO_MODE_INFORMATION CurrentMode, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:463
BOOLEAN VGAQueryNumAvailModes(OUT PVIDEO_NUM_MODES NumberOfModes, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:492
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
_In_ ULONG Rows
Definition: haltypes.h:7