ReactOS 0.4.15-dev-7958-gcd0bb1a
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 return VideoPortInitialize(Context1, Context2, &InitData, NULL);
59}
60
61// VGAFindAdapter
62//
63// DESCRIPTION:
64// This routine is called by the videoport driver to find and allocate
65// the adapter for a given bus. The miniport driver needs to do the
66// following in this routine:
67// - Determine if the adapter is present
68// - Claim any necessary memory/IO resources for the adapter
69// - Map resources into system memory for the adapter
70// - fill in relevant information in the VIDEO_PORT_CONFIG_INFO buffer
71// - update registry settings for adapter specifics.
72// - Set 'Again' based on whether the function should be called again
73// another adapter on the same bus.
74//
75// RUN LEVEL:
76// PASSIVE_LEVEL
77//
78// ARGUMENTS:
79// PVOID DeviceExtension
80// PVOID Context
81// PWSTR ArgumentString
82// PVIDEO_PORT_CONFIG_INFO ConfigInfo
83// PUCHAR Again
84// RETURNS:
85// VP_STATUS
86
88VGAFindAdapter(PVOID DeviceExtension,
90 PWSTR ArgumentString,
91 PVIDEO_PORT_CONFIG_INFO ConfigInfo,
92 PUCHAR Again)
93{
95
96 /* FIXME: Determine if the adapter is present */
97 *Again = FALSE;
98
99 if (ConfigInfo->Length < sizeof(VIDEO_PORT_CONFIG_INFO))
101
103 if (Status != NO_ERROR)
104 return Status;
105
108 return NO_ERROR;
109
110 /* FIXME: Claim any necessary memory/IO resources for the adapter */
111 /* FIXME: Map resources into system memory for the adapter */
112 /* FIXME: Fill in relevant information in the VIDEO_PORT_CONFIG_INFO buffer */
113 /* FIXME: Update registry settings for adapter specifics. */
114// return NO_ERROR;
115}
116
117// VGAInitialize
118//
119// DESCRIPTION:
120// Perform initialization tasks, but leave the adapter in the same
121// user visible state
122//
123// RUN LEVEL:
124// PASSIVE_LEVEL
125//
126// ARGUMENTS:
127// PVOID DeviceExtension
128// RETURNS:
129// BOOLEAN Success or failure
131VGAInitialize(PVOID DeviceExtension)
132{
133 return TRUE;
134}
135
136// VGAStartIO
137//
138// DESCRIPTION:
139// This function gets called in responce to GDI EngDeviceIoControl
140// calls. Device requests are passed in VRPs.
141// Required VRPs:
142// IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES
143// IOCTL_VIDEO_QUERY_AVAIL_MODES
144// IOCTL_VIDEO_QUERY_CURRENT_MODE
145// IOCTL_VIDEO_SET_CURRENT_MODE
146// IOCTL_VIDEO_RESET_DEVICE
147// IOCTL_VIDEO_MAP_VIDEO_MEMORY
148// IOCTL_VIDEO_UNMAP_VIDEO_MEMORY
149// IOCTL_VIDEO_SHARE_VIDEO_MEMORY
150// IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY
151// Optional VRPs:
152// IOCTL_VIDEO_GET_PUBLIC_ACCESS_RANGES
153// IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES
154// IOCTL_VIDEO_GET_POWER_MANAGEMENT
155// IOCTL_VIDEO_SET_POWER_MANAGEMENT
156// IOCTL_QUERY_COLOR_CAPABILITIES
157// IOCTL_VIDEO_SET_COLOR_REGISTERS (required if the device has a palette)
158// IOCTL_VIDEO_DISABLE_POINTER
159// IOCTL_VIDEO_ENABLE_POINTER
160// IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES
161// IOCTL_VIDEO_QUERY_POINTER_ATTR
162// IOCTL_VIDEO_SET_POINTER_ATTR
163// IOCTL_VIDEO_QUERY_POINTER_POSITION
164// IOCTL_VIDEO_SET_POINTER_POSITION
165// IOCTL_VIDEO_SAVE_HARDWARE_STATE
166// IOCTL_VIDEO_RESTORE_HARDWARE_STATE
167// IOCTL_VIDEO_DISABLE_CURSOR
168// IOCTL_VIDEO_ENABLE_CURSOR
169// IOCTL_VIDEO_QUERY_CURSOR_ATTR
170// IOCTL_VIDEO_SET_CURSOR_ATTR
171// IOCTL_VIDEO_QUERY_CURSOR_POSITION
172// IOCTL_VIDEO_SET_CURSOR_POSITION
173// IOCTL_VIDEO_GET_BANK_SELECT_CODE
174// IOCTL_VIDEO_SET_PALETTE_REGISTERS
175// IOCTL_VIDEO_LOAD_AND_SET_FONT
176//
177// RUN LEVEL:
178// PASSIVE_LEVEL
179//
180// ARGUMENTS:
181// PVOID DeviceExtension
182// PVIDEO_REQUEST_PACKET RequestPacket
183// RETURNS:
184// BOOLEAN This function must return TRUE, and complete the work or
185// set an error status in the VRP.
186
188VGAStartIO(PVOID DeviceExtension,
189 PVIDEO_REQUEST_PACKET RequestPacket)
190{
192
193 RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
194
195 switch (RequestPacket->IoControlCode)
196 {
198 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION) ||
199 RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
200 {
202 return TRUE;
203 }
204 Result = VGAMapVideoMemory(DeviceExtension,
205 (PVIDEO_MEMORY) RequestPacket->InputBuffer,
207 RequestPacket->OutputBuffer,
208 RequestPacket->StatusBlock);
209 break;
210
212 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION))
213 {
215 return TRUE;
216 }
218 RequestPacket->StatusBlock);
219 break;
220
222 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION))
223 {
225 return TRUE;
226 }
228 RequestPacket->StatusBlock);
229 break;
230
232 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_NUM_MODES))
233 {
235 return TRUE;
236 }
238 RequestPacket->StatusBlock);
239 break;
240
242 VGAResetDevice(RequestPacket->StatusBlock);
243 Result = TRUE;
244 break;
245
247 if (RequestPacket->InputBufferLength < sizeof(VIDEO_CLUT) ||
248 RequestPacket->InputBufferLength <
249 (((PVIDEO_CLUT)RequestPacket->InputBuffer)->NumEntries * sizeof(ULONG)) +
250 FIELD_OFFSET(VIDEO_CLUT, LookupTable))
251 {
253 return TRUE;
254 }
256 RequestPacket->StatusBlock);
257 break;
258
260 if (RequestPacket->InputBufferLength < sizeof(VIDEO_MODE))
261 {
263 return TRUE;
264 }
266 RequestPacket->StatusBlock);
267 break;
268
270 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION) ||
271 RequestPacket->InputBufferLength < sizeof(VIDEO_SHARE_MEMORY))
272 {
274 return TRUE;
275 }
278 RequestPacket->StatusBlock);
279 break;
280
282 if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
283 {
285 return TRUE;
286 }
287 Result = VGAUnmapVideoMemory(DeviceExtension,
288 (PVIDEO_MEMORY) RequestPacket->InputBuffer,
289 RequestPacket->StatusBlock);
290 break;
291
293 if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
294 {
296 return TRUE;
297 }
299 RequestPacket->StatusBlock);
300 break;
303 RequestPacket->StatusBlock);
304 break;
305
306#if 0
311
313 VGAFreePublicAccessRanges((PVIDEO_PUBLIC_ACCESS_RANGES)
314 RequestPacket->InputBuffer,
315 RequestPacket->StatusBlock);
316 break;
317
327
329 VGAQueryPublicAccessRanges((PVIDEO_PUBLIC_ACCESS_RANGES)
330 RequestPacket->OutputBuffer,
331 RequestPacket->StatusBlock);
332 break;
333
341
342#endif
343
344 default:
345 RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
346 return FALSE;
347 }
348
349 if (Result)
350 RequestPacket->StatusBlock->Status = NO_ERROR;
351
352 return TRUE;
353}
354
355#if 0
356// VGAInterrupt
357//
358// DESCRIPTION:
359// This function will be called upon receipt of a adapter generated
360// interrupt when enabled.
361//
362// RUN LEVEL:
363// IRQL
364//
365// ARGUMENTS:
366// PVOID DeviceExtension
367// RETURNS:
368// BOOLEAN TRUE if the interrupt was handled by the routine
369
370static BOOLEAN NTAPI
371VGAInterrupt(PVOID DeviceExtension)
372{
373 return(TRUE);
374}
375#endif
376
377// VGAResetHw
378//
379// DESCRIPTION:
380// This function is called to reset the hardware to a known state
381// if calling a BIOS int 10 reset will not achieve this result.
382//
383// RUN LEVEL:
384// PASSIVE_LEVEL
385//
386// ARGUMENTS:
387// PVOID DeviceExtension
388// ULONG Columns Columns and Rows specify the mode parameters
389// ULONG Rows to reset to.
390// RETURNS:
391// BOOLEAN TRUE if no further action is necessary, FALSE if the system
392// needs to still do a BIOS int 10 reset.
393
395VGAResetHw(PVOID DeviceExtension,
397 ULONG Rows)
398{
399 /* We don't anything to the vga that int10 can't cope with. */
400 return(FALSE);
401}
402
403#if 0
404// VGATimer
405//
406// DESCRIPTION:
407// This function will be called once a second when enabled
408//
409// RUN LEVEL:
410// PASSIVE_LEVEL
411//
412// ARGUMENTS:
413// PVOID DeviceExtension
414// RETURNS:
415// VOID
416
417static VOID NTAPI
418VGATimer(PVOID DeviceExtension)
419{
420}
421
422#endif
423
425 IN PVIDEO_MEMORY RequestedAddress,
426 OUT PVIDEO_MEMORY_INFORMATION MapInformation,
427 OUT PSTATUS_BLOCK StatusBlock)
428{
430 PVOID ReturnedAddress;
431 ULONG IoSpace;
432 PHYSICAL_ADDRESS FrameBufferBase;
433 ReturnedAddress = RequestedAddress->RequestedVirtualAddress;
434 ReturnedLength = 256 * 1024;
435 FrameBufferBase.QuadPart = 0xA0000;
437 StatusBlock->Status = VideoPortMapMemory(DeviceExtension,
438 FrameBufferBase,
440 &IoSpace,
441 &ReturnedAddress);
442 if (StatusBlock->Status != 0)
443 {
444 StatusBlock->Information = 0;
445 return TRUE;
446 }
447 MapInformation->VideoRamBase = MapInformation->FrameBufferBase =
448 ReturnedAddress;
449 MapInformation->VideoRamLength = MapInformation->FrameBufferLength =
451 StatusBlock->Information = sizeof(VIDEO_MEMORY_INFORMATION);
452 return TRUE;
453}
454
456 OUT PSTATUS_BLOCK StatusBlock)
457{
458 /* Only one mode exists in VGA (640x480), so use VGAQueryCurrentMode */
459 return VGAQueryCurrentMode(ReturnedModes, StatusBlock);
460}
461
463 OUT PSTATUS_BLOCK StatusBlock)
464{
465 CurrentMode->Length = sizeof(VIDEO_MODE_INFORMATION);
466 CurrentMode->ModeIndex = 2;
467 CurrentMode->VisScreenWidth = 640;
468 CurrentMode->VisScreenHeight = 480;
469 CurrentMode->ScreenStride = 80;
470 CurrentMode->NumberOfPlanes = 4;
471 CurrentMode->BitsPerPlane = 1;
472 CurrentMode->Frequency = 60;
473 CurrentMode->XMillimeter = 320;
474 CurrentMode->YMillimeter = 240;
475 CurrentMode->NumberRedBits =
476 CurrentMode->NumberGreenBits =
477 CurrentMode->NumberBlueBits = 6;
478 CurrentMode->RedMask =
479 CurrentMode->GreenMask =
480 CurrentMode->BlueMask = 0;
481 CurrentMode->VideoMemoryBitmapWidth = 640;
482 CurrentMode->VideoMemoryBitmapHeight = 480;
483 CurrentMode->AttributeFlags = VIDEO_MODE_GRAPHICS | VIDEO_MODE_COLOR |
485 CurrentMode->DriverSpecificAttributeFlags = 0;
486
487 StatusBlock->Information = sizeof(VIDEO_MODE_INFORMATION);
488 return TRUE;
489}
490
492 OUT PSTATUS_BLOCK StatusBlock)
493{
494 NumberOfModes->NumModes = 1;
495 NumberOfModes->ModeInformationLength = sizeof(VIDEO_MODE_INFORMATION);
496 StatusBlock->Information = sizeof(VIDEO_NUM_MODES);
497 return TRUE;
498}
499
501 OUT PSTATUS_BLOCK StatusBlock)
502{
503 ;
504
505/*
506 We don't need the following code because the palette registers are set correctly on VGA initialization.
507 Still, we may include\test this is in the future.
508
509 int i, j = 2;
510 char tmp, v;
511
512 tmp = VideoPortReadPortUchar(0x03da);
513 v = VideoPortReadPortUchar(0x03c0);
514
515 // Set the first 16 palette registers to map to the first 16 palette colors
516 for (i=PaletteRegisters[1]; i<PaletteRegisters[0]; i++)
517 {
518 tmp = VideoPortReadPortUchar(0x03da);
519 VideoPortWritePortUchar(0x03c0, i);
520 VideoPortWritePortUchar(0x03c0, PaletteRegisters[j++]);
521 }
522
523 tmp = VideoPortReadPortUchar(0x03da);
524 VideoPortWritePortUchar(0x03d0, v | 0x20);
525*/
526 return TRUE;
527}
528
530 OUT PSTATUS_BLOCK StatusBlock)
531{
532 int i;
533
534 for (i=ColorLookUpTable->FirstEntry; i<ColorLookUpTable->NumEntries; i++)
535 {
537 VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Red);
538 VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Green);
539 VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Blue);
540 }
541
542 return TRUE;
543}
544
546 OUT PSTATUS_BLOCK StatusBlock)
547{
548 if(RequestedMode->RequestedMode == 2)
549 {
550 InitVGAMode();
551 return TRUE;
552 } else {
553 VideoPortDebugPrint(Warn, "Unrecognised mode for VGASetCurrentMode\n");
554 return FALSE;
555 }
556}
557
559 OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory,
560 OUT PSTATUS_BLOCK StatusBlock)
561{
563
564 StatusBlock->Status = ERROR_INVALID_FUNCTION;
565 return FALSE;
566}
567
569 IN PVIDEO_MEMORY MemoryToUnmap,
570 OUT PSTATUS_BLOCK StatusBlock)
571{
572 if (VideoPortUnmapMemory(DeviceExtension,
573 MemoryToUnmap->RequestedVirtualAddress,
574 0) == NO_ERROR)
575 return TRUE;
576 else
577 return FALSE;
578}
579
581 OUT PSTATUS_BLOCK StatusBlock)
582{
584
585 StatusBlock->Status = ERROR_INVALID_FUNCTION;
586 return FALSE;
587}
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: debug.h:115
#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
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:916
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
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:568
VIDEO_ACCESS_RANGE VGAAccessRange[]
Definition: vgamp.c:13
BOOLEAN VGASetColorRegisters(IN PVIDEO_CLUT ColorLookUpTable, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:529
BOOLEAN VGASetCurrentMode(IN PVIDEO_MODE RequestedMode, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:545
VP_STATUS NTAPI VGAFindAdapter(PVOID DeviceExtension, PVOID Context, PWSTR ArgumentString, PVIDEO_PORT_CONFIG_INFO ConfigInfo, PUCHAR Again)
Definition: vgamp.c:88
BOOLEAN NTAPI VGAInitialize(PVOID DeviceExtension)
Definition: vgamp.c:131
BOOLEAN VGAShareVideoMemory(IN PVIDEO_SHARE_MEMORY RequestedMemory, OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:558
BOOLEAN VGAMapVideoMemory(IN PVOID DeviceExtension, IN PVIDEO_MEMORY RequestedAddress, OUT PVIDEO_MEMORY_INFORMATION MapInformation, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:424
BOOLEAN VGAQueryAvailModes(OUT PVIDEO_MODE_INFORMATION ReturnedModes, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:455
BOOLEAN VGAUnshareVideoMemory(IN PVIDEO_MEMORY MemoryToUnshare, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:580
BOOLEAN NTAPI VGAStartIO(PVOID DeviceExtension, PVIDEO_REQUEST_PACKET RequestPacket)
Definition: vgamp.c:188
BOOLEAN NTAPI VGAResetHw(PVOID DeviceExtension, ULONG Columns, ULONG Rows)
Definition: vgamp.c:395
BOOLEAN VGASetPaletteRegisters(IN PUSHORT PaletteRegisters, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:500
BOOLEAN VGAQueryCurrentMode(OUT PVIDEO_MODE_INFORMATION CurrentMode, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:462
BOOLEAN VGAQueryNumAvailModes(OUT PVIDEO_NUM_MODES NumberOfModes, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:491
_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