ReactOS 0.4.17-dev-1190-g4c812f4
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 }
277 Result = VGAShareVideoMemory(DeviceExtension,
278 (PVIDEO_SHARE_MEMORY) RequestPacket->InputBuffer,
280 RequestPacket->StatusBlock);
281 break;
282
284 if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
285 {
287 return TRUE;
288 }
289 Result = VGAUnmapVideoMemory(DeviceExtension,
290 (PVIDEO_MEMORY) RequestPacket->InputBuffer,
291 RequestPacket->StatusBlock);
292 break;
293
295 if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
296 {
298 return TRUE;
299 }
301 RequestPacket->StatusBlock);
302 break;
305 RequestPacket->StatusBlock);
306 break;
307
308#if 0
313
315 VGAFreePublicAccessRanges((PVIDEO_PUBLIC_ACCESS_RANGES)
316 RequestPacket->InputBuffer,
317 RequestPacket->StatusBlock);
318 break;
319
329
331 VGAQueryPublicAccessRanges((PVIDEO_PUBLIC_ACCESS_RANGES)
332 RequestPacket->OutputBuffer,
333 RequestPacket->StatusBlock);
334 break;
335
343
344#endif
345
346 default:
347 RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
348 return FALSE;
349 }
350
351 if (Result)
352 RequestPacket->StatusBlock->Status = NO_ERROR;
353
354 return TRUE;
355}
356
357#if 0
358// VGAInterrupt
359//
360// DESCRIPTION:
361// This function will be called upon receipt of a adapter generated
362// interrupt when enabled.
363//
364// RUN LEVEL:
365// IRQL
366//
367// ARGUMENTS:
368// PVOID DeviceExtension
369// RETURNS:
370// BOOLEAN TRUE if the interrupt was handled by the routine
371
372static BOOLEAN NTAPI
373VGAInterrupt(PVOID DeviceExtension)
374{
375 return(TRUE);
376}
377#endif
378
379// VGAResetHw
380//
381// DESCRIPTION:
382// This function is called to reset the hardware to a known state
383// if calling a BIOS int 10 reset will not achieve this result.
384//
385// RUN LEVEL:
386// PASSIVE_LEVEL
387//
388// ARGUMENTS:
389// PVOID DeviceExtension
390// ULONG Columns Columns and Rows specify the mode parameters
391// ULONG Rows to reset to.
392// RETURNS:
393// BOOLEAN TRUE if no further action is necessary, FALSE if the system
394// needs to still do a BIOS int 10 reset.
395
397VGAResetHw(PVOID DeviceExtension,
399 ULONG Rows)
400{
401 /* We don't anything to the vga that int10 can't cope with. */
402 return(FALSE);
403}
404
405#if 0
406// VGATimer
407//
408// DESCRIPTION:
409// This function will be called once a second when enabled
410//
411// RUN LEVEL:
412// PASSIVE_LEVEL
413//
414// ARGUMENTS:
415// PVOID DeviceExtension
416// RETURNS:
417// VOID
418
419static VOID NTAPI
420VGATimer(PVOID DeviceExtension)
421{
422}
423
424#endif
425
427 IN PVIDEO_MEMORY RequestedAddress,
428 OUT PVIDEO_MEMORY_INFORMATION MapInformation,
429 OUT PSTATUS_BLOCK StatusBlock)
430{
432 PVOID ReturnedAddress;
433 ULONG IoSpace;
434 PHYSICAL_ADDRESS FrameBufferBase;
435 ReturnedAddress = RequestedAddress->RequestedVirtualAddress;
436 ReturnedLength = 256 * 1024;
437 FrameBufferBase.QuadPart = 0xA0000;
439 StatusBlock->Status = VideoPortMapMemory(DeviceExtension,
440 FrameBufferBase,
442 &IoSpace,
443 &ReturnedAddress);
444 if (StatusBlock->Status != 0)
445 {
446 StatusBlock->Information = 0;
447 return TRUE;
448 }
449 MapInformation->VideoRamBase = MapInformation->FrameBufferBase =
450 ReturnedAddress;
451 MapInformation->VideoRamLength = MapInformation->FrameBufferLength =
453 StatusBlock->Information = sizeof(VIDEO_MEMORY_INFORMATION);
454 return TRUE;
455}
456
458 OUT PSTATUS_BLOCK StatusBlock)
459{
460 /* Only one mode exists in VGA (640x480), so use VGAQueryCurrentMode */
461 return VGAQueryCurrentMode(ReturnedModes, StatusBlock);
462}
463
465 OUT PSTATUS_BLOCK StatusBlock)
466{
467 CurrentMode->Length = sizeof(VIDEO_MODE_INFORMATION);
468 CurrentMode->ModeIndex = 2;
469 CurrentMode->VisScreenWidth = 640;
470 CurrentMode->VisScreenHeight = 480;
471 CurrentMode->ScreenStride = 80;
472 CurrentMode->NumberOfPlanes = 4;
473 CurrentMode->BitsPerPlane = 1;
474 CurrentMode->Frequency = 60;
475 CurrentMode->XMillimeter = 320;
476 CurrentMode->YMillimeter = 240;
477 CurrentMode->NumberRedBits =
478 CurrentMode->NumberGreenBits =
479 CurrentMode->NumberBlueBits = 6;
480 CurrentMode->RedMask =
481 CurrentMode->GreenMask =
482 CurrentMode->BlueMask = 0;
483 CurrentMode->VideoMemoryBitmapWidth = 640;
484 CurrentMode->VideoMemoryBitmapHeight = 480;
485 CurrentMode->AttributeFlags = VIDEO_MODE_GRAPHICS | VIDEO_MODE_COLOR |
487 CurrentMode->DriverSpecificAttributeFlags = 0;
488
489 StatusBlock->Information = sizeof(VIDEO_MODE_INFORMATION);
490 return TRUE;
491}
492
494 OUT PSTATUS_BLOCK StatusBlock)
495{
496 NumberOfModes->NumModes = 1;
497 NumberOfModes->ModeInformationLength = sizeof(VIDEO_MODE_INFORMATION);
498 StatusBlock->Information = sizeof(VIDEO_NUM_MODES);
499 return TRUE;
500}
501
503 OUT PSTATUS_BLOCK StatusBlock)
504{
505 ;
506
507/*
508 We don't need the following code because the palette registers are set correctly on VGA initialization.
509 Still, we may include\test this is in the future.
510
511 int i, j = 2;
512 char tmp, v;
513
514 tmp = VideoPortReadPortUchar(0x03da);
515 v = VideoPortReadPortUchar(0x03c0);
516
517 // Set the first 16 palette registers to map to the first 16 palette colors
518 for (i=PaletteRegisters[1]; i<PaletteRegisters[0]; i++)
519 {
520 tmp = VideoPortReadPortUchar(0x03da);
521 VideoPortWritePortUchar(0x03c0, i);
522 VideoPortWritePortUchar(0x03c0, PaletteRegisters[j++]);
523 }
524
525 tmp = VideoPortReadPortUchar(0x03da);
526 VideoPortWritePortUchar(0x03d0, v | 0x20);
527*/
528 return TRUE;
529}
530
532 OUT PSTATUS_BLOCK StatusBlock)
533{
534 int i;
535
536 for (i=ColorLookUpTable->FirstEntry; i<ColorLookUpTable->NumEntries; i++)
537 {
539 VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Red);
540 VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Green);
541 VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Blue);
542 }
543
544 return TRUE;
545}
546
548 OUT PSTATUS_BLOCK StatusBlock)
549{
550 if(RequestedMode->RequestedMode == 2)
551 {
552 InitVGAMode();
553 return TRUE;
554 } else {
555 VideoPortDebugPrint(Warn, "Unrecognised mode for VGASetCurrentMode\n");
556 return FALSE;
557 }
558}
559
582 _In_ PVOID DeviceExtension,
583 _In_ PVIDEO_SHARE_MEMORY RequestedMemory,
584 _Out_ PVIDEO_MEMORY_INFORMATION ReturnedMemory,
585 _Out_ PSTATUS_BLOCK StatusBlock)
586{
588 PVOID ReturnedAddress;
589 ULONG IoSpace;
590 PHYSICAL_ADDRESS FrameBufferBase;
591
592 /* Requested view must fall in the 64K VGA gap at 0xA0000 */
593 if (RequestedMemory->ViewOffset + RequestedMemory->ViewSize > 0x10000)
594 {
595 StatusBlock->Status = ERROR_INVALID_PARAMETER;
596 StatusBlock->Information = 0;
597 return TRUE;
598 }
599
600 ReturnedAddress = RequestedMemory->RequestedVirtualAddress;
601 ReturnedLength = RequestedMemory->ViewSize;
602 FrameBufferBase.QuadPart = 0xA0000 + RequestedMemory->ViewOffset;
604
605 StatusBlock->Status = VideoPortMapMemory(DeviceExtension,
606 FrameBufferBase,
608 &IoSpace,
609 &ReturnedAddress);
610 if (StatusBlock->Status != NO_ERROR)
611 {
612 StatusBlock->Information = 0;
613 return TRUE;
614 }
615
616 ReturnedMemory->VideoRamBase = ReturnedMemory->FrameBufferBase = ReturnedAddress;
617 ReturnedMemory->VideoRamLength = ReturnedMemory->FrameBufferLength = ReturnedLength;
618 StatusBlock->Information = sizeof(VIDEO_MEMORY_INFORMATION);
619
620 return TRUE;
621}
622
624 IN PVIDEO_MEMORY MemoryToUnmap,
625 OUT PSTATUS_BLOCK StatusBlock)
626{
627 if (VideoPortUnmapMemory(DeviceExtension,
628 MemoryToUnmap->RequestedVirtualAddress,
629 0) == NO_ERROR)
630 return TRUE;
631 else
632 return FALSE;
633}
634
636 OUT PSTATUS_BLOCK StatusBlock)
637{
639
640 StatusBlock->Status = ERROR_INVALID_FUNCTION;
641 return FALSE;
642}
unsigned char BOOLEAN
Definition: actypes.h:127
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 ARRAYSIZE(a)
Definition: cat.c:25
#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 ERROR_INVALID_PARAMETER
Definition: compat.h:101
DRIVER_INITIALIZE DriverEntry
Definition: condrv.c:21
Status
Definition: gdiplustypes.h:24
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
VOID InitVGAMode(VOID)
Definition: initvga.c:110
VOID VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock)
Definition: initvga.c:117
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_ PVOID Context
Definition: kse.h:81
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#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
@ Isa
Definition: restypes.h:123
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:982
VPAPI VP_STATUS NTAPI VideoPortUnmapMemory(IN PVOID HwDeviceExtension, IN OUT PVOID VirtualAddress, IN HANDLE ProcessHandle)
LONG VP_STATUS
Definition: video.h:153
VPAPI VOID __cdecl VideoPortDebugPrint(_In_ VIDEO_DEBUG_LEVEL DebugPrintLevel, _In_ PSTR DebugMessage, _In_ ...)
Definition: videoprt.c:1145
VPAPI ULONG NTAPI VideoPortInitialize(IN PVOID Argument1, IN PVOID Argument2, IN PVIDEO_HW_INITIALIZATION_DATA HwInitializationData, IN PVOID HwContext)
Definition: videoprt.c:945
VPAPI VP_STATUS NTAPI VideoPortMapMemory(IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS PhysicalAddress, IN OUT PULONG Length, IN PULONG InIoSpace, IN OUT PVOID *VirtualAddress)
#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:623
VIDEO_ACCESS_RANGE VGAAccessRange[]
Definition: vgamp.c:13
BOOLEAN VGASetColorRegisters(IN PVIDEO_CLUT ColorLookUpTable, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:531
BOOLEAN VGASetCurrentMode(IN PVIDEO_MODE RequestedMode, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:547
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 VGAMapVideoMemory(IN PVOID DeviceExtension, IN PVIDEO_MEMORY RequestedAddress, OUT PVIDEO_MEMORY_INFORMATION MapInformation, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:426
BOOLEAN VGAShareVideoMemory(_In_ PVOID DeviceExtension, _In_ PVIDEO_SHARE_MEMORY RequestedMemory, _Out_ PVIDEO_MEMORY_INFORMATION ReturnedMemory, _Out_ PSTATUS_BLOCK StatusBlock)
Shares a portion of VGA video memory with a VDM.
Definition: vgamp.c:581
BOOLEAN VGAQueryAvailModes(OUT PVIDEO_MODE_INFORMATION ReturnedModes, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:457
BOOLEAN VGAUnshareVideoMemory(IN PVIDEO_MEMORY MemoryToUnshare, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:635
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:397
BOOLEAN VGASetPaletteRegisters(IN PUSHORT PaletteRegisters, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:502
BOOLEAN VGAQueryCurrentMode(OUT PVIDEO_MODE_INFORMATION CurrentMode, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:464
BOOLEAN VGAQueryNumAvailModes(OUT PVIDEO_NUM_MODES NumberOfModes, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:493
_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:17