ReactOS  0.4.14-dev-50-g13bb5e2
vgamp.h File Reference
#include <ntdef.h>
#include <miniport.h>
#include <video.h>
Include dependency graph for vgamp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define UNIMPLEMENTED   VideoPortDebugPrint(Error, "WARNING: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__);
 

Functions

VOID InitVGAMode (VOID)
 
VP_STATUS NTAPI VGAFindAdapter (PVOID DeviceExtension, PVOID Context, PWSTR ArgumentString, PVIDEO_PORT_CONFIG_INFO ConfigInfo, PUCHAR Again)
 
BOOLEAN NTAPI VGAInitialize (PVOID DeviceExtension)
 
BOOLEAN NTAPI VGAStartIO (PVOID DeviceExtension, PVIDEO_REQUEST_PACKET RequestPacket)
 
BOOLEAN NTAPI VGAResetHw (PVOID DeviceExtension, ULONG Columns, ULONG Rows)
 
BOOLEAN VGAMapVideoMemory (IN PVOID DeviceExtension, IN PVIDEO_MEMORY RequestedAddress, OUT PVIDEO_MEMORY_INFORMATION MapInformation, OUT PSTATUS_BLOCK StatusBlock)
 
BOOLEAN VGAQueryAvailModes (OUT PVIDEO_MODE_INFORMATION ReturnedModes, OUT PSTATUS_BLOCK StatusBlock)
 
BOOLEAN VGAQueryCurrentMode (OUT PVIDEO_MODE_INFORMATION CurrentMode, OUT PSTATUS_BLOCK StatusBlock)
 
BOOLEAN VGAQueryNumAvailModes (OUT PVIDEO_NUM_MODES NumberOfModes, OUT PSTATUS_BLOCK StatusBlock)
 
VOID VGAResetDevice (OUT PSTATUS_BLOCK StatusBlock)
 
BOOLEAN VGASetColorRegisters (IN PVIDEO_CLUT ColorLookUpTable, OUT PSTATUS_BLOCK StatusBlock)
 
BOOLEAN VGASetPaletteRegisters (IN PUSHORT PaletteRegisters, OUT PSTATUS_BLOCK StatusBlock)
 
BOOLEAN VGASetCurrentMode (IN PVIDEO_MODE RequestedMode, OUT PSTATUS_BLOCK StatusBlock)
 
BOOLEAN VGAShareVideoMemory (IN PVIDEO_SHARE_MEMORY RequestedMemory, OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory, OUT PSTATUS_BLOCK StatusBlock)
 
BOOLEAN VGAUnmapVideoMemory (IN PVOID DeviceExtension, IN PVIDEO_MEMORY MemoryToUnmap, OUT PSTATUS_BLOCK StatusBlock)
 
BOOLEAN VGAUnshareVideoMemory (IN PVIDEO_MEMORY MemoryToUnshare, OUT PSTATUS_BLOCK StatusBlock)
 

Macro Definition Documentation

◆ UNIMPLEMENTED

#define UNIMPLEMENTED   VideoPortDebugPrint(Error, "WARNING: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__);

Definition at line 30 of file vgamp.h.

Function Documentation

◆ InitVGAMode()

VOID InitVGAMode ( VOID  )

Definition at line 110 of file initvga.c.

111 {
114 }
static VGA_REGISTERS Mode12Regs
Definition: initvga.c:5
VGA_REGISTERS TextModeRegs
Definition: initvga.c:21
static VOID FASTCALL vgaSaveRegisters(PVGA_REGISTERS Registers)
Definition: initvga.c:24
static VOID FASTCALL vgaSetRegisters(PVGA_REGISTERS Registers)
Definition: initvga.c:57

Referenced by VGASetCurrentMode().

◆ VGAFindAdapter()

VP_STATUS NTAPI VGAFindAdapter ( PVOID  DeviceExtension,
PVOID  Context,
PWSTR  ArgumentString,
PVIDEO_PORT_CONFIG_INFO  ConfigInfo,
PUCHAR  Again 
)

Definition at line 79 of file vgamp.c.

84 {
85  /* FIXME: Determine if the adapter is present */
86  *Again = FALSE;
87 
88  return NO_ERROR;
89 
90  /* FIXME: Claim any necessary memory/IO resources for the adapter */
91  /* FIXME: Map resources into system memory for the adapter */
92  /* FIXME: Fill in relevant information in the VIDEO_PORT_CONFIG_INFO buffer */
93  /* FIXME: Update registry settings for adapter specifics. */
94 // return NO_ERROR;
95 }
#define NO_ERROR
Definition: dderror.h:5

Referenced by DriverEntry().

◆ VGAInitialize()

BOOLEAN NTAPI VGAInitialize ( PVOID  DeviceExtension)

Definition at line 111 of file vgamp.c.

112 {
113  return TRUE;
114 }
#define TRUE
Definition: types.h:120

Referenced by DriverEntry().

◆ VGAMapVideoMemory()

BOOLEAN VGAMapVideoMemory ( IN PVOID  DeviceExtension,
IN PVIDEO_MEMORY  RequestedAddress,
OUT PVIDEO_MEMORY_INFORMATION  MapInformation,
OUT PSTATUS_BLOCK  StatusBlock 
)

Definition at line 404 of file vgamp.c.

408 {
410  PVOID ReturnedAddress;
411  ULONG IoSpace;
412  PHYSICAL_ADDRESS FrameBufferBase;
413  ReturnedAddress = RequestedAddress->RequestedVirtualAddress;
414  ReturnedLength = 256 * 1024;
415  FrameBufferBase.QuadPart = 0xA0000;
416  IoSpace = VIDEO_MEMORY_SPACE_MEMORY;
417  StatusBlock->Status = VideoPortMapMemory(DeviceExtension,
418  FrameBufferBase,
420  &IoSpace,
421  &ReturnedAddress);
422  if (StatusBlock->Status != 0)
423  {
424  StatusBlock->Information = 0;
425  return TRUE;
426  }
427  MapInformation->VideoRamBase = MapInformation->FrameBufferBase =
428  ReturnedAddress;
429  MapInformation->VideoRamLength = MapInformation->FrameBufferLength =
431  StatusBlock->Information = sizeof(VIDEO_MEMORY_INFORMATION);
432  return TRUE;
433 }
#define TRUE
Definition: types.h:120
VPAPI VP_STATUS NTAPI VideoPortMapMemory(IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS PhysicalAddress, IN OUT PULONG Length, IN PULONG InIoSpace, IN OUT PVOID *VirtualAddress)
struct _VIDEO_MEMORY_INFORMATION VIDEO_MEMORY_INFORMATION
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:187
unsigned int ULONG
Definition: retypes.h:1
#define VIDEO_MEMORY_SPACE_MEMORY
Definition: video.h:132
LONGLONG QuadPart
Definition: typedefs.h:112

Referenced by VGAStartIO().

◆ VGAQueryAvailModes()

BOOLEAN VGAQueryAvailModes ( OUT PVIDEO_MODE_INFORMATION  ReturnedModes,
OUT PSTATUS_BLOCK  StatusBlock 
)

Definition at line 435 of file vgamp.c.

437 {
438  /* Only one mode exists in VGA (640x480), so use VGAQueryCurrentMode */
439  return VGAQueryCurrentMode(ReturnedModes, StatusBlock);
440 }
BOOLEAN VGAQueryCurrentMode(OUT PVIDEO_MODE_INFORMATION CurrentMode, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:442

Referenced by VGAStartIO().

◆ VGAQueryCurrentMode()

BOOLEAN VGAQueryCurrentMode ( OUT PVIDEO_MODE_INFORMATION  CurrentMode,
OUT PSTATUS_BLOCK  StatusBlock 
)

Definition at line 442 of file vgamp.c.

444 {
445  CurrentMode->Length = sizeof(VIDEO_MODE_INFORMATION);
446  CurrentMode->ModeIndex = 2;
447  CurrentMode->VisScreenWidth = 640;
448  CurrentMode->VisScreenHeight = 480;
449  CurrentMode->ScreenStride = 80;
450  CurrentMode->NumberOfPlanes = 4;
451  CurrentMode->BitsPerPlane = 1;
452  CurrentMode->Frequency = 60;
453  CurrentMode->XMillimeter = 320;
454  CurrentMode->YMillimeter = 240;
455  CurrentMode->NumberRedBits =
456  CurrentMode->NumberGreenBits =
457  CurrentMode->NumberBlueBits = 6;
458  CurrentMode->RedMask =
459  CurrentMode->GreenMask =
460  CurrentMode->BlueMask = 0;
461  CurrentMode->VideoMemoryBitmapWidth = 640;
462  CurrentMode->VideoMemoryBitmapHeight = 480;
463  CurrentMode->AttributeFlags = VIDEO_MODE_GRAPHICS | VIDEO_MODE_COLOR |
465  CurrentMode->DriverSpecificAttributeFlags = 0;
466 
467  StatusBlock->Information = sizeof(VIDEO_MODE_INFORMATION);
468  return TRUE;
469 }
#define TRUE
Definition: types.h:120
#define VIDEO_MODE_NO_OFF_SCREEN
Definition: ntddvdeo.h:298
#define VIDEO_MODE_COLOR
Definition: ntddvdeo.h:293
struct _VIDEO_MODE_INFORMATION VIDEO_MODE_INFORMATION
#define VIDEO_MODE_GRAPHICS
Definition: ntddvdeo.h:294

Referenced by VGAQueryAvailModes(), and VGAStartIO().

◆ VGAQueryNumAvailModes()

BOOLEAN VGAQueryNumAvailModes ( OUT PVIDEO_NUM_MODES  NumberOfModes,
OUT PSTATUS_BLOCK  StatusBlock 
)

Definition at line 471 of file vgamp.c.

473 {
474  NumberOfModes->NumModes = 1;
475  NumberOfModes->ModeInformationLength = sizeof(VIDEO_MODE_INFORMATION);
476  StatusBlock->Information = sizeof(VIDEO_NUM_MODES);
477  return TRUE;
478 }
#define TRUE
Definition: types.h:120
struct _VIDEO_NUM_MODES VIDEO_NUM_MODES
struct _VIDEO_MODE_INFORMATION VIDEO_MODE_INFORMATION

Referenced by VGAStartIO().

◆ VGAResetDevice()

VOID VGAResetDevice ( OUT PSTATUS_BLOCK  StatusBlock)

Definition at line 117 of file initvga.c.

118 {
120 }
VGA_REGISTERS TextModeRegs
Definition: initvga.c:21
static VOID FASTCALL vgaSetRegisters(PVGA_REGISTERS Registers)
Definition: initvga.c:57

Referenced by VGAStartIO().

◆ VGAResetHw()

BOOLEAN NTAPI VGAResetHw ( PVOID  DeviceExtension,
ULONG  Columns,
ULONG  Rows 
)

Definition at line 375 of file vgamp.c.

378 {
379  /* We don't anything to the vga that int10 can't cope with. */
380  return(FALSE);
381 }

Referenced by DriverEntry().

◆ VGASetColorRegisters()

BOOLEAN VGASetColorRegisters ( IN PVIDEO_CLUT  ColorLookUpTable,
OUT PSTATUS_BLOCK  StatusBlock 
)

Definition at line 509 of file vgamp.c.

511 {
512  int i;
513 
514  for (i=ColorLookUpTable->FirstEntry; i<ColorLookUpTable->NumEntries; i++)
515  {
516  VideoPortWritePortUchar((PUCHAR)0x03c8, i);
517  VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Red);
518  VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Green);
519  VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Blue);
520  }
521 
522  return TRUE;
523 }
#define TRUE
Definition: types.h:120
unsigned char * PUCHAR
Definition: retypes.h:3
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
VPAPI VOID NTAPI VideoPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value)

Referenced by VGAStartIO().

◆ VGASetCurrentMode()

BOOLEAN VGASetCurrentMode ( IN PVIDEO_MODE  RequestedMode,
OUT PSTATUS_BLOCK  StatusBlock 
)

Definition at line 525 of file vgamp.c.

527 {
528  if(RequestedMode->RequestedMode == 12)
529  {
530  InitVGAMode();
531  return TRUE;
532  } else {
533  VideoPortDebugPrint(Warn, "Unrecognised mode for VGASetCurrentMode\n");
534  return FALSE;
535  }
536 }
#define TRUE
Definition: types.h:120
VOID InitVGAMode(VOID)
Definition: initvga.c:110
Definition: video.h:581
VPAPI VOID __cdecl VideoPortDebugPrint(IN VIDEO_DEBUG_LEVEL DebugPrintLevel, IN PSTR DebugMessage, IN ...)

Referenced by VGAStartIO().

◆ VGASetPaletteRegisters()

BOOLEAN VGASetPaletteRegisters ( IN PUSHORT  PaletteRegisters,
OUT PSTATUS_BLOCK  StatusBlock 
)

Definition at line 480 of file vgamp.c.

482 {
483  ;
484 
485 /*
486  We don't need the following code because the palette registers are set correctly on VGA initialization.
487  Still, we may include\test this is in the future.
488 
489  int i, j = 2;
490  char tmp, v;
491 
492  tmp = VideoPortReadPortUchar(0x03da);
493  v = VideoPortReadPortUchar(0x03c0);
494 
495  // Set the first 16 palette registers to map to the first 16 palette colors
496  for (i=PaletteRegisters[1]; i<PaletteRegisters[0]; i++)
497  {
498  tmp = VideoPortReadPortUchar(0x03da);
499  VideoPortWritePortUchar(0x03c0, i);
500  VideoPortWritePortUchar(0x03c0, PaletteRegisters[j++]);
501  }
502 
503  tmp = VideoPortReadPortUchar(0x03da);
504  VideoPortWritePortUchar(0x03d0, v | 0x20);
505 */
506  return TRUE;
507 }
#define TRUE
Definition: types.h:120

Referenced by VGAStartIO().

◆ VGAShareVideoMemory()

BOOLEAN VGAShareVideoMemory ( IN PVIDEO_SHARE_MEMORY  RequestedMemory,
OUT PVIDEO_MEMORY_INFORMATION  ReturnedMemory,
OUT PSTATUS_BLOCK  StatusBlock 
)

Definition at line 538 of file vgamp.c.

541 {
543 
544  StatusBlock->Status = ERROR_INVALID_FUNCTION;
545  return FALSE;
546 }
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define UNIMPLEMENTED
Definition: debug.h:114

Referenced by VGAStartIO().

◆ VGAStartIO()

BOOLEAN NTAPI VGAStartIO ( PVOID  DeviceExtension,
PVIDEO_REQUEST_PACKET  RequestPacket 
)

Definition at line 168 of file vgamp.c.

170 {
171  BOOLEAN Result;
172 
173  RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
174 
175  switch (RequestPacket->IoControlCode)
176  {
178  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION) ||
179  RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
180  {
181  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
182  return TRUE;
183  }
184  Result = VGAMapVideoMemory(DeviceExtension,
185  (PVIDEO_MEMORY) RequestPacket->InputBuffer,
187  RequestPacket->OutputBuffer,
188  RequestPacket->StatusBlock);
189  break;
190 
192  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION))
193  {
194  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
195  return TRUE;
196  }
198  RequestPacket->StatusBlock);
199  break;
200 
202  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION))
203  {
204  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
205  return TRUE;
206  }
208  RequestPacket->StatusBlock);
209  break;
210 
212  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_NUM_MODES))
213  {
214  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
215  return TRUE;
216  }
218  RequestPacket->StatusBlock);
219  break;
220 
222  VGAResetDevice(RequestPacket->StatusBlock);
223  Result = TRUE;
224  break;
225 
227  if (RequestPacket->InputBufferLength < sizeof(VIDEO_CLUT) ||
228  RequestPacket->InputBufferLength <
229  (((PVIDEO_CLUT)RequestPacket->InputBuffer)->NumEntries * sizeof(ULONG)) +
230  FIELD_OFFSET(VIDEO_CLUT, LookupTable))
231  {
232  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
233  return TRUE;
234  }
236  RequestPacket->StatusBlock);
237  break;
238 
240  if (RequestPacket->InputBufferLength < sizeof(VIDEO_MODE))
241  {
242  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
243  return TRUE;
244  }
245  Result = VGASetCurrentMode((PVIDEO_MODE) RequestPacket->InputBuffer,
246  RequestPacket->StatusBlock);
247  break;
248 
250  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION) ||
251  RequestPacket->InputBufferLength < sizeof(VIDEO_SHARE_MEMORY))
252  {
253  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
254  return TRUE;
255  }
257  (PVIDEO_MEMORY_INFORMATION) RequestPacket->OutputBuffer,
258  RequestPacket->StatusBlock);
259  break;
260 
262  if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
263  {
264  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
265  return TRUE;
266  }
267  Result = VGAUnmapVideoMemory(DeviceExtension,
268  (PVIDEO_MEMORY) RequestPacket->InputBuffer,
269  RequestPacket->StatusBlock);
270  break;
271 
273  if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
274  {
275  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
276  return TRUE;
277  }
279  RequestPacket->StatusBlock);
280  break;
283  RequestPacket->StatusBlock);
284  break;
285 
286 #if 0
291 
293  VGAFreePublicAccessRanges((PVIDEO_PUBLIC_ACCESS_RANGES)
294  RequestPacket->InputBuffer,
295  RequestPacket->StatusBlock);
296  break;
297 
307 
309  VGAQueryPublicAccessRanges((PVIDEO_PUBLIC_ACCESS_RANGES)
310  RequestPacket->OutputBuffer,
311  RequestPacket->StatusBlock);
312  break;
313 
321 
322 #endif
323 
324  default:
325  RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
326  return FALSE;
327  }
328 
329  if (Result)
330  RequestPacket->StatusBlock->Status = NO_ERROR;
331 
332  return TRUE;
333 }
#define IOCTL_VIDEO_QUERY_COLOR_CAPABILITIES
Definition: ntddvdeo.h:110
#define IOCTL_VIDEO_QUERY_POINTER_POSITION
Definition: ntddvdeo.h:131
#define TRUE
Definition: types.h:120
#define IOCTL_VIDEO_QUERY_POINTER_ATTR
Definition: ntddvdeo.h:125
#define IOCTL_VIDEO_SET_POINTER_ATTR
Definition: ntddvdeo.h:164
#define IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY
Definition: ntddvdeo.h:182
BOOLEAN VGASetPaletteRegisters(IN PUSHORT PaletteRegisters, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:480
#define IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES
Definition: ntddvdeo.h:128
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define IOCTL_VIDEO_DISABLE_CURSOR
Definition: ntddvdeo.h:77
#define IOCTL_VIDEO_GET_POWER_MANAGEMENT
Definition: ntddvdeo.h:98
#define IOCTL_VIDEO_RESET_DEVICE
Definition: ntddvdeo.h:137
#define IOCTL_VIDEO_MAP_VIDEO_MEMORY
Definition: ntddvdeo.h:104
BOOLEAN VGAQueryNumAvailModes(OUT PVIDEO_NUM_MODES NumberOfModes, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:471
ULONG InputBufferLength
Definition: video.h:333
#define NO_ERROR
Definition: dderror.h:5
#define IOCTL_VIDEO_GET_BANK_SELECT_CODE
Definition: ntddvdeo.h:92
#define IOCTL_VIDEO_DISABLE_POINTER
Definition: ntddvdeo.h:80
#define IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES
Definition: ntddvdeo.h:89
BOOLEAN VGASetCurrentMode(IN PVIDEO_MODE RequestedMode, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:525
#define IOCTL_VIDEO_QUERY_CURRENT_MODE
Definition: ntddvdeo.h:113
#define IOCTL_VIDEO_SET_CURRENT_MODE
Definition: ntddvdeo.h:152
BOOLEAN VGAUnshareVideoMemory(IN PVIDEO_MEMORY MemoryToUnshare, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:560
#define IOCTL_VIDEO_SET_PALETTE_REGISTERS
Definition: ntddvdeo.h:161
#define IOCTL_VIDEO_SET_CURSOR_POSITION
Definition: ntddvdeo.h:158
unsigned char BOOLEAN
_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:426
BOOLEAN VGAUnmapVideoMemory(IN PVOID DeviceExtension, IN PVIDEO_MEMORY MemoryToUnmap, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:548
#define IOCTL_VIDEO_QUERY_CURSOR_ATTR
Definition: ntddvdeo.h:116
ULONG OutputBufferLength
Definition: video.h:335
#define IOCTL_VIDEO_SET_POWER_MANAGEMENT
Definition: ntddvdeo.h:170
#define IOCTL_VIDEO_SET_CURSOR_ATTR
Definition: ntddvdeo.h:155
#define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY
Definition: ntddvdeo.h:179
#define IOCTL_VIDEO_ENABLE_CURSOR
Definition: ntddvdeo.h:83
#define IOCTL_VIDEO_QUERY_CURSOR_POSITION
Definition: ntddvdeo.h:119
BOOLEAN VGAQueryAvailModes(OUT PVIDEO_MODE_INFORMATION ReturnedModes, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:435
VOID VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock)
Definition: initvga.c:117
VP_STATUS Status
Definition: video.h:323
BOOLEAN VGAShareVideoMemory(IN PVIDEO_SHARE_MEMORY RequestedMemory, OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:538
#define IOCTL_VIDEO_LOAD_AND_SET_FONT
Definition: ntddvdeo.h:101
#define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES
Definition: ntddvdeo.h:122
#define IOCTL_VIDEO_QUERY_AVAIL_MODES
Definition: ntddvdeo.h:107
BOOLEAN VGAMapVideoMemory(IN PVOID DeviceExtension, IN PVIDEO_MEMORY RequestedAddress, OUT PVIDEO_MEMORY_INFORMATION MapInformation, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:404
#define IOCTL_VIDEO_SHARE_VIDEO_MEMORY
Definition: ntddvdeo.h:173
PSTATUS_BLOCK StatusBlock
Definition: video.h:331
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
#define IOCTL_VIDEO_ENABLE_POINTER
Definition: ntddvdeo.h:86
#define IOCTL_VIDEO_QUERY_PUBLIC_ACCESS_RANGES
Definition: ntddvdeo.h:134
BOOLEAN VGAQueryCurrentMode(OUT PVIDEO_MODE_INFORMATION CurrentMode, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:442
unsigned int ULONG
Definition: retypes.h:1
#define IOCTL_VIDEO_RESTORE_HARDWARE_STATE
Definition: ntddvdeo.h:140
unsigned short * PUSHORT
Definition: retypes.h:2
#define IOCTL_VIDEO_SAVE_HARDWARE_STATE
Definition: ntddvdeo.h:143
BOOLEAN VGASetColorRegisters(IN PVIDEO_CLUT ColorLookUpTable, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:509
#define IOCTL_VIDEO_SET_POINTER_POSITION
Definition: ntddvdeo.h:167
#define IOCTL_VIDEO_SET_COLOR_REGISTERS
Definition: ntddvdeo.h:149
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Referenced by DriverEntry().

◆ VGAUnmapVideoMemory()

BOOLEAN VGAUnmapVideoMemory ( IN PVOID  DeviceExtension,
IN PVIDEO_MEMORY  MemoryToUnmap,
OUT PSTATUS_BLOCK  StatusBlock 
)

Definition at line 548 of file vgamp.c.

551 {
552  if (VideoPortUnmapMemory(DeviceExtension,
553  MemoryToUnmap->RequestedVirtualAddress,
554  0) == NO_ERROR)
555  return TRUE;
556  else
557  return FALSE;
558 }
#define TRUE
Definition: types.h:120
#define NO_ERROR
Definition: dderror.h:5
VPAPI VP_STATUS NTAPI VideoPortUnmapMemory(IN PVOID HwDeviceExtension, IN OUT PVOID VirtualAddress, IN HANDLE ProcessHandle)

Referenced by VGAStartIO().

◆ VGAUnshareVideoMemory()

BOOLEAN VGAUnshareVideoMemory ( IN PVIDEO_MEMORY  MemoryToUnshare,
OUT PSTATUS_BLOCK  StatusBlock 
)

Definition at line 560 of file vgamp.c.

562 {
564 
565  StatusBlock->Status = ERROR_INVALID_FUNCTION;
566  return FALSE;
567 }
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define UNIMPLEMENTED
Definition: debug.h:114

Referenced by VGAStartIO().