ReactOS  0.4.15-dev-5109-g2469ce2
video.h File Reference
#include "ntddvdeo.h"
#include "videoagp.h"
Include dependency graph for video.h:

Go to the source code of this file.

Classes

struct  _VIDEO_PORT_CONFIG_INFO
 
struct  _VIDEO_ACCESS_RANGE
 
struct  _VP_SCATTER_GATHER_ELEMENT
 
struct  _VP_SCATTER_GATHER_LIST
 
struct  _VIDEO_CHILD_ENUM_INFO
 
struct  _QUERY_INTERFACE
 
struct  _STATUS_BLOCK
 
struct  _VIDEO_REQUEST_PACKET
 
struct  _I2C_CALLBACKS
 
struct  _VIDEO_I2C_CONTROL
 
struct  _INT10_BIOS_ARGUMENTS
 
struct  _VIDEO_HARDWARE_CONFIGURATION_DATA
 
struct  _VIDEO_X86_BIOS_ARGUMENTS
 
struct  __VRB_SG
 
struct  _VP_DEVICE_DESCRIPTION
 
struct  _VIDEO_CHILD_STATE
 
struct  _VIDEO_CHILD_STATE_CONFIGURATION
 
struct  _VIDEO_HW_INITIALIZATION_DATA
 
struct  _I2C_FNC_TABLE
 
struct  _DDC_CONTROL
 
struct  _VIDEO_PORT_AGP_INTERFACE
 
struct  _VIDEO_PORT_AGP_INTERFACE_2
 
struct  _VIDEO_PORT_I2C_INTERFACE
 
struct  _VIDEO_PORT_I2C_INTERFACE_2
 
struct  _VIDEO_PORT_INT10_INTERFACE
 
struct  _VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE
 
struct  _VPOSVERSIONINFO
 
struct  _VIDEO_PORT_DEBUG_REPORT_INTERFACE
 

Macros

#define __VIDEO_H__
 
#define VPAPI   DECLSPEC_IMPORT
 
#define PAGED_CODE()
 
#define VideoDebugPrint(x)
 
#define GET_VIDEO_PHYSICAL_ADDRESS(scatterList, VirtualAddress, InputBuffer, pLength, Address)
 
#define GET_VIDEO_SCATTERGATHER(ppDma)   (**(PVRB_SG **)ppDma)
 
#define VIDEO_RANGE_PASSIVE_DECODE   1
 
#define VIDEO_RANGE_10_BIT_DECODE   2
 
#define SIZE_OF_NT4_VIDEO_PORT_CONFIG_INFO   FIELD_OFFSET(VIDEO_PORT_CONFIG_INFO, Master)
 
#define SIZE_OF_WXP_VIDEO_PORT_CONFIG_INFO   sizeof(VIDEO_PORT_CONFIG_INFO)
 
#define SET_USER_EVENT   0x01
 
#define SET_DISPLAY_EVENT   0x02
 
#define EVENT_TYPE_MASK   1
 
#define SYNCHRONIZATION_EVENT   0
 
#define NOTIFICATION_EVENT   1
 
#define INITIAL_EVENT_STATE_MASK   2
 
#define INITIAL_EVENT_NOT_SIGNALED   0
 
#define INITIAL_EVENT_SIGNALED   2
 
#define DISPLAY_ADAPTER_HW_ID   0xFFFFFFFF
 
#define VIDEO_INVALID_CHILD_ID   0xFFFFFFFF
 
#define SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA   FIELD_OFFSET(VIDEO_HW_INITIALIZATION_DATA, HwStartDma)
 
#define SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA   FIELD_OFFSET(VIDEO_HW_INITIALIZATION_DATA, Reserved)
 
#define SIZE_OF_WXP_VIDEO_HW_INITIALIZATION_DATA   (SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA + sizeof(ULONG))
 
#define VIDEO_PORT_AGP_INTERFACE_VERSION_1   1
 
#define VIDEO_PORT_AGP_INTERFACE_VERSION_2   2
 
#define VIDEO_PORT_I2C_INTERFACE_VERSION_1   1
 
#define VIDEO_PORT_I2C_INTERFACE_VERSION_2   2
 
#define VIDEO_PORT_INT10_INTERFACE_VERSION_1   1
 
#define VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE_VERSION_1   1
 
#define VIDEO_PORT_DEBUG_REPORT_INTERFACE_VERSION_1   1
 
#define VIDEO_MEMORY_SPACE_MEMORY   0x00
 
#define VIDEO_MEMORY_SPACE_IO   0x01
 
#define VIDEO_MEMORY_SPACE_USER_MODE   0x02
 
#define VIDEO_MEMORY_SPACE_DENSE   0x04
 
#define VIDEO_MEMORY_SPACE_P6CACHE   0x08
 
#define VIDEO_ENUM_MORE_DEVICES   ERROR_CONTINUE
 
#define VIDEO_ENUM_NO_MORE_DEVICES   ERROR_NO_MORE_DEVICES
 
#define VIDEO_ENUM_INVALID_DEVICE   ERROR_INVALID_NAME
 
#define DEVICE_VGA_ENABLED   1
 
#define CDE_USE_SUBSYSTEM_IDS   0x00000001
 
#define CDE_USE_REVISION   0x00000002
 
#define BUGCHECK_DATA_SIZE_RESERVED   48
 
#define VIDEO_DEBUG_REPORT_MAX_SIZE   0x8000
 

Typedefs

typedef LONG VP_STATUS
 
typedef LONGPVP_STATUS
 
typedef ULONG DMA_EVENT_FLAGS
 
typedef struct _VIDEO_PORT_SPIN_LOCK * PSPIN_LOCK
 
typedef struct _VIDEO_DEBUG_REPORT * PVIDEO_DEBUG_REPORT
 
typedef struct __DMA_PARAMETERS * PDMA
 
typedef struct __VP_DMA_ADAPTER * PVP_DMA_ADAPTER
 
typedef PVOID(NTAPIPVIDEO_PORT_GET_PROC_ADDRESS) (IN PVOID HwDeviceExtension, IN PUCHAR FunctionName)
 
typedef struct _VIDEO_PORT_CONFIG_INFO VIDEO_PORT_CONFIG_INFO
 
typedef struct _VIDEO_PORT_CONFIG_INFOPVIDEO_PORT_CONFIG_INFO
 
typedef VP_STATUS(NTAPIPVIDEO_HW_FIND_ADAPTER) (IN PVOID HwDeviceExtension, IN PVOID HwContext, IN PWSTR ArgumentString, IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo, OUT PUCHAR Again)
 
typedef BOOLEAN(NTAPIPVIDEO_HW_INITIALIZE) (IN PVOID HwDeviceExtension)
 
typedef BOOLEAN(NTAPIPVIDEO_HW_INTERRUPT) (IN PVOID HwDeviceExtension)
 
typedef struct _VIDEO_ACCESS_RANGE VIDEO_ACCESS_RANGE
 
typedef struct _VIDEO_ACCESS_RANGEPVIDEO_ACCESS_RANGE
 
typedef VOID(NTAPIPVIDEO_HW_LEGACYRESOURCES) (IN ULONG VendorId, IN ULONG DeviceId, IN OUT PVIDEO_ACCESS_RANGE *LegacyResourceList, IN OUT PULONG LegacyResourceCount)
 
typedef enum _HW_DMA_RETURN HW_DMA_RETURN
 
typedef enum _HW_DMA_RETURNPHW_DMA_RETURN
 
typedef HW_DMA_RETURN(NTAPIPVIDEO_HW_START_DMA) (PVOID HwDeviceExtension, PDMA pDma)
 
typedef struct _VP_SCATTER_GATHER_ELEMENT VP_SCATTER_GATHER_ELEMENT
 
typedef struct _VP_SCATTER_GATHER_ELEMENTPVP_SCATTER_GATHER_ELEMENT
 
typedef struct _VP_SCATTER_GATHER_LIST VP_SCATTER_GATHER_LIST
 
typedef struct _VP_SCATTER_GATHER_LISTPVP_SCATTER_GATHER_LIST
 
typedef VOID(NTAPIPEXECUTE_DMA) (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN PVP_SCATTER_GATHER_LIST SGList, IN PVOID Context)
 
typedef struct _VIDEO_CHILD_ENUM_INFO VIDEO_CHILD_ENUM_INFO
 
typedef struct _VIDEO_CHILD_ENUM_INFOPVIDEO_CHILD_ENUM_INFO
 
typedef enum _VIDEO_CHILD_TYPE VIDEO_CHILD_TYPE
 
typedef enum _VIDEO_CHILD_TYPEPVIDEO_CHILD_TYPE
 
typedef VP_STATUS(NTAPIPVIDEO_HW_GET_CHILD_DESCRIPTOR) (IN PVOID HwDeviceExtension, IN PVIDEO_CHILD_ENUM_INFO ChildEnumInfo, OUT PVIDEO_CHILD_TYPE VideoChildType, OUT PUCHAR pChildDescriptor, OUT PULONG UId, OUT PULONG pUnused)
 
typedef VP_STATUS(NTAPIPVIDEO_HW_POWER_SET) (IN PVOID HwDeviceExtension, IN ULONG HwId, IN PVIDEO_POWER_MANAGEMENT VideoPowerControl)
 
typedef VP_STATUS(NTAPIPVIDEO_HW_POWER_GET) (IN PVOID HwDeviceExtension, IN ULONG HwId, IN OUT PVIDEO_POWER_MANAGEMENT VideoPowerControl)
 
typedef struct _QUERY_INTERFACE QUERY_INTERFACE
 
typedef struct _QUERY_INTERFACEPQUERY_INTERFACE
 
typedef VP_STATUS(NTAPIPVIDEO_HW_QUERY_INTERFACE) (IN PVOID HwDeviceExtension, IN OUT PQUERY_INTERFACE QueryInterface)
 
typedef VP_STATUS(NTAPIPVIDEO_HW_CHILD_CALLBACK) (PVOID HwDeviceExtension, PVOID ChildDeviceExtension)
 
typedef BOOLEAN(NTAPIPVIDEO_HW_RESET_HW) (IN PVOID HwDeviceExtension, IN ULONG Columns, IN ULONG Rows)
 
typedef struct _STATUS_BLOCK STATUS_BLOCK
 
typedef struct _STATUS_BLOCKPSTATUS_BLOCK
 
typedef struct _VIDEO_REQUEST_PACKET VIDEO_REQUEST_PACKET
 
typedef struct _VIDEO_REQUEST_PACKETPVIDEO_REQUEST_PACKET
 
typedef BOOLEAN(NTAPIPVIDEO_HW_START_IO) (IN PVOID HwDeviceExtension, IN PVIDEO_REQUEST_PACKET RequestPacket)
 
typedef VOID(NTAPIPVIDEO_HW_TIMER) (IN PVOID HwDeviceExtension)
 
typedef VOID(NTAPIPVIDEO_WRITE_CLOCK_LINE) (PVOID HwDeviceExtension, UCHAR Data)
 
typedef VOID(NTAPIPVIDEO_WRITE_DATA_LINE) (PVOID HwDeviceExtension, UCHAR Data)
 
typedef BOOLEAN(NTAPIPVIDEO_READ_CLOCK_LINE) (PVOID HwDeviceExtension)
 
typedef BOOLEAN(NTAPIPVIDEO_READ_DATA_LINE) (PVOID HwDeviceExtension)
 
typedef VOID(NTAPIPVIDEO_WAIT_VSYNC_ACTIVE) (PVOID HwDeviceExtension)
 
typedef struct _I2C_CALLBACKS I2C_CALLBACKS
 
typedef struct _I2C_CALLBACKSPI2C_CALLBACKS
 
typedef BOOLEAN(NTAPIPI2C_START) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks)
 
typedef BOOLEAN(NTAPIPI2C_STOP) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks)
 
typedef BOOLEAN(NTAPIPI2C_WRITE) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks, IN PUCHAR Buffer, IN ULONG Length)
 
typedef BOOLEAN(NTAPIPI2C_READ) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks, OUT PUCHAR Buffer, IN ULONG Length)
 
typedef struct _VIDEO_I2C_CONTROL VIDEO_I2C_CONTROL
 
typedef struct _VIDEO_I2C_CONTROLPVIDEO_I2C_CONTROL
 
typedef BOOLEAN(NTAPIPI2C_START_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl)
 
typedef BOOLEAN(NTAPIPI2C_STOP_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl)
 
typedef BOOLEAN(NTAPIPI2C_WRITE_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl, IN PUCHAR Buffer, IN ULONG Length)
 
typedef BOOLEAN(NTAPIPI2C_READ_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl, OUT PUCHAR Buffer, IN ULONG Length, IN BOOLEAN EndOfRead)
 
typedef struct _INT10_BIOS_ARGUMENTS INT10_BIOS_ARGUMENTS
 
typedef struct _INT10_BIOS_ARGUMENTSPINT10_BIOS_ARGUMENTS
 
typedef VP_STATUS(NTAPIPINT10_CALL_BIOS) (IN PVOID Context, IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)
 
typedef VP_STATUS(NTAPIPINT10_ALLOCATE_BUFFER) (IN PVOID Context, OUT PUSHORT Seg, OUT PUSHORT Off, IN OUT PULONG Length)
 
typedef VP_STATUS(NTAPIPINT10_FREE_BUFFER) (IN PVOID Context, IN USHORT Seg, IN USHORT Off)
 
typedef VP_STATUS(NTAPIPINT10_READ_MEMORY) (IN PVOID Context, IN USHORT Seg, IN USHORT Off, OUT PVOID Buffer, IN ULONG Length)
 
typedef VP_STATUS(NTAPIPINT10_WRITE_MEMORY) (IN PVOID Context, IN USHORT Seg, IN USHORT Off, IN PVOID Buffer, IN ULONG Length)
 
typedef VP_STATUS(NTAPIPROTECT_WC_MEMORY) (IN PVOID Context, IN PVOID HwDeviceExtension)
 
typedef VP_STATUS(NTAPIRESTORE_WC_MEMORY) (IN PVOID Context, IN PVOID HwDeviceExtension)
 
typedef enum _VIDEO_DEVICE_DATA_TYPE VIDEO_DEVICE_DATA_TYPE
 
typedef enum _VIDEO_DEVICE_DATA_TYPEPVIDEO_DEVICE_DATA_TYPE
 
typedef VP_STATUS(NTAPIPMINIPORT_QUERY_DEVICE_ROUTINE) (IN PVOID HwDeviceExtension, IN PVOID Context, IN VIDEO_DEVICE_DATA_TYPE DeviceDataType, IN PVOID Identifier, IN ULONG IdentifierLength, IN PVOID ConfigurationData, IN ULONG ConfigurationDataLength, IN OUT PVOID ComponentInformation, IN ULONG ComponentInformationLength)
 
typedef VP_STATUS(NTAPIPMINIPORT_GET_REGISTRY_ROUTINE) (IN PVOID HwDeviceExtension, IN PVOID Context, IN OUT PWSTR ValueName, IN OUT PVOID ValueData, IN ULONG ValueLength)
 
typedef VOID(NTAPIPMINIPORT_DPC_ROUTINE) (IN PVOID HwDeviceExtension, IN PVOID Context)
 
typedef BOOLEAN(NTAPIPMINIPORT_SYNCHRONIZE_ROUTINE) (IN PVOID Context)
 
typedef VOID(NTAPIPVIDEO_BUGCHECK_CALLBACK) (IN PVOID HwDeviceExtension, IN ULONG BugcheckCode, IN PUCHAR Buffer, IN ULONG BufferSize)
 
typedef enum VIDEO_SYNCHRONIZE_PRIORITY VIDEO_SYNCHRONIZE_PRIORITY
 
typedef enum VIDEO_SYNCHRONIZE_PRIORITYPVIDEO_SYNCHRONIZE_PRIORITY
 
typedef enum _VP_POOL_TYPE VP_POOL_TYPE
 
typedef enum _VP_POOL_TYPEPVP_POOL_TYPE
 
typedef enum _DMA_FLAGS DMA_FLAGS
 
typedef struct _VIDEO_HARDWARE_CONFIGURATION_DATA VIDEO_HARDWARE_CONFIGURATION_DATA
 
typedef struct _VIDEO_HARDWARE_CONFIGURATION_DATAPVIDEO_HARDWARE_CONFIGURATION_DATA
 
typedef struct _VIDEO_X86_BIOS_ARGUMENTS VIDEO_X86_BIOS_ARGUMENTS
 
typedef struct _VIDEO_X86_BIOS_ARGUMENTSPVIDEO_X86_BIOS_ARGUMENTS
 
typedef enum VIDEO_DEBUG_LEVEL VIDEO_DEBUG_LEVEL
 
typedef enum VIDEO_DEBUG_LEVELPVIDEO_DEBUG_LEVEL
 
typedef VP_STATUS(NTAPIPDRIVER_IO_PORT_UCHAR) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUCHAR Data)
 
typedef VP_STATUS(NTAPIPDRIVER_IO_PORT_UCHAR_STRING) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUCHAR Data, IN ULONG DataLength)
 
typedef VP_STATUS(NTAPIPDRIVER_IO_PORT_ULONG) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PULONG Data)
 
typedef VP_STATUS(NTAPIPDRIVER_IO_PORT_ULONG_STRING) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PULONG Data, IN ULONG DataLength)
 
typedef VP_STATUS(NTAPIPDRIVER_IO_PORT_USHORT) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUSHORT Data)
 
typedef VP_STATUS(NTAPIPDRIVER_IO_PORT_USHORT_STRING) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUSHORT Data, IN ULONG DataLength)
 
typedef struct __VRB_SG VRB_SG
 
typedef struct __VRB_SGPVRB_SG
 
typedef enum _VP_LOCK_OPERATION VP_LOCK_OPERATION
 
typedef struct _VP_DEVICE_DESCRIPTION VP_DEVICE_DESCRIPTION
 
typedef struct _VP_DEVICE_DESCRIPTIONPVP_DEVICE_DESCRIPTION
 
typedef struct _VIDEO_CHILD_STATE VIDEO_CHILD_STATE
 
typedef struct _VIDEO_CHILD_STATEPVIDEO_CHILD_STATE
 
typedef struct _VIDEO_CHILD_STATE_CONFIGURATION VIDEO_CHILD_STATE_CONFIGURATION
 
typedef struct _VIDEO_CHILD_STATE_CONFIGURATIONPVIDEO_CHILD_STATE_CONFIGURATION
 
typedef struct _VIDEO_HW_INITIALIZATION_DATA VIDEO_HW_INITIALIZATION_DATA
 
typedef struct _VIDEO_HW_INITIALIZATION_DATAPVIDEO_HW_INITIALIZATION_DATA
 
typedef struct _I2C_FNC_TABLE I2C_FNC_TABLE
 
typedef struct _I2C_FNC_TABLEPI2C_FNC_TABLE
 
typedef struct _DDC_CONTROL DDC_CONTROL
 
typedef struct _DDC_CONTROLPDDC_CONTROL
 
typedef enum _VIDEO_PORT_SERVICES VIDEO_PORT_SERVICES
 
typedef struct _VIDEO_PORT_AGP_INTERFACE VIDEO_PORT_AGP_INTERFACE
 
typedef struct _VIDEO_PORT_AGP_INTERFACEPVIDEO_PORT_AGP_INTERFACE
 
typedef struct _VIDEO_PORT_AGP_INTERFACE_2 VIDEO_PORT_AGP_INTERFACE_2
 
typedef struct _VIDEO_PORT_AGP_INTERFACE_2PVIDEO_PORT_AGP_INTERFACE_2
 
typedef struct _VIDEO_PORT_I2C_INTERFACE VIDEO_PORT_I2C_INTERFACE
 
typedef struct _VIDEO_PORT_I2C_INTERFACEPVIDEO_PORT_I2C_INTERFACE
 
typedef struct _VIDEO_PORT_I2C_INTERFACE_2 VIDEO_PORT_I2C_INTERFACE_2
 
typedef struct _VIDEO_PORT_I2C_INTERFACE_2PVIDEO_PORT_I2C_INTERFACE_2
 
typedef struct _VIDEO_PORT_INT10_INTERFACE VIDEO_PORT_INT10_INTERFACE
 
typedef struct _VIDEO_PORT_INT10_INTERFACEPVIDEO_PORT_INT10_INTERFACE
 
typedef struct _VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE
 
typedef struct _VIDEO_PORT_WCMEMORYPROTECTION_INTERFACEPVIDEO_PORT_WCMEMORYPROTECTION_INTERFACE
 
typedef struct _VPOSVERSIONINFO VPOSVERSIONINFO
 
typedef struct _VPOSVERSIONINFOPVPOSVERSIONINFO
 
typedef struct _VIDEO_PORT_DEBUG_REPORT_INTERFACE VIDEO_PORT_DEBUG_REPORT_INTERFACE
 
typedef struct _VIDEO_PORT_DEBUG_REPORT_INTERFACEPVIDEO_PORT_DEBUG_REPORT_INTERFACE
 

Enumerations

enum  _HW_DMA_RETURN { DmaAsyncReturn, DmaSyncReturn }
 
enum  _VIDEO_CHILD_TYPE { Monitor = 1, NonPrimaryChip, VideoChip, Other }
 
enum  _VIDEO_DEVICE_DATA_TYPE {
  VpMachineData = 0, VpCmosData, VpBusData, VpControllerData,
  VpMonitorData
}
 
enum  VIDEO_SYNCHRONIZE_PRIORITY { VpLowPriority = 0, VpMediumPriority, VpHighPriority }
 
enum  _VP_POOL_TYPE { VpNonPagedPool = 0, VpPagedPool, VpNonPagedPoolCacheAligned = 4, VpPagedPoolCacheAligned }
 
enum  _DMA_FLAGS { VideoPortUnlockAfterDma = 1, VideoPortKeepPagesLocked, VideoPortDmaInitOnly }
 
enum  VIDEO_DEBUG_LEVEL { Error = 0, Warn, Trace, Info }
 
enum  _VP_LOCK_OPERATION { VpReadAccess = 0, VpWriteAccess, VpModifyAccess }
 
enum  _VIDEO_PORT_SERVICES {
  VideoPortServicesAGP = 1, VideoPortServicesI2C, VideoPortServicesHeadless, VideoPortServicesInt10,
  VideoPortServicesDebugReport, VideoPortServicesWCMemoryProtection
}
 

Functions

ULONG NTAPI DriverEntry (PVOID Context1, PVOID Context2)
 
VPAPI VP_STATUS NTAPI VideoPortAllocateBuffer (IN PVOID HwDeviceExtension, IN ULONG Size, OUT PVOID *Buffer)
 
VPAPI VOID NTAPI VideoPortAcquireDeviceLock (IN PVOID HwDeviceExtension)
 
VPAPI ULONG NTAPI VideoPortCompareMemory (IN PVOID Source1, IN PVOID Source2, IN SIZE_T Length)
 
VPAPI BOOLEAN NTAPI VideoPortDDCMonitorHelper (IN PVOID HwDeviceExtension, IN PVOID DDCControl, IN OUT PUCHAR EdidBuffer, IN ULONG EdidBufferSize)
 
VPAPI VOID __cdecl VideoPortDebugPrint (IN VIDEO_DEBUG_LEVEL DebugPrintLevel, IN PSTR DebugMessage, IN ...)
 
VPAPI VP_STATUS NTAPI VideoPortDisableInterrupt (IN PVOID HwDeviceExtension)
 
VPAPI VP_STATUS NTAPI VideoPortEnableInterrupt (IN PVOID HwDeviceExtension)
 
VPAPI VP_STATUS NTAPI VideoPortEnumerateChildren (IN PVOID HwDeviceExtension, IN PVOID Reserved)
 
VPAPI VOID NTAPI VideoPortFreeDeviceBase (IN PVOID HwDeviceExtension, IN PVOID MappedAddress)
 
VPAPI VP_STATUS NTAPI VideoPortGetAccessRanges (IN PVOID HwDeviceExtension, IN ULONG NumRequestedResources, IN PIO_RESOURCE_DESCRIPTOR RequestedResources OPTIONAL, IN ULONG NumAccessRanges, OUT PVIDEO_ACCESS_RANGE AccessRanges, IN PVOID VendorId, IN PVOID DeviceId, OUT PULONG Slot)
 
VPAPI PVOID NTAPI VideoPortGetAssociatedDeviceExtension (IN PVOID DeviceObject)
 
VPAPI ULONG NTAPI VideoPortGetBusData (IN PVOID HwDeviceExtension, IN BUS_DATA_TYPE BusDataType, IN ULONG SlotNumber, IN OUT PVOID Buffer, IN ULONG Offset, IN ULONG Length)
 
VPAPI UCHAR NTAPI VideoPortGetCurrentIrql (VOID)
 
VPAPI PVOID NTAPI VideoPortGetDeviceBase (IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfUchars, IN UCHAR InIoSpace)
 
VPAPI VP_STATUS NTAPI VideoPortGetDeviceData (IN PVOID HwDeviceExtension, IN VIDEO_DEVICE_DATA_TYPE DeviceDataType, IN PMINIPORT_QUERY_DEVICE_ROUTINE CallbackRoutine, IN PVOID Context)
 
VPAPI VP_STATUS NTAPI VideoPortGetRegistryParameters (IN PVOID HwDeviceExtension, IN PWSTR ParameterName, IN UCHAR IsParameterFileName, IN PMINIPORT_GET_REGISTRY_ROUTINE CallbackRoutine, IN PVOID Context)
 
VPAPI PVOID NTAPI VideoPortGetRomImage (IN PVOID HwDeviceExtension, IN PVOID Unused1, IN ULONG Unused2, IN ULONG Length)
 
VPAPI VP_STATUS NTAPI VideoPortGetVgaStatus (IN PVOID HwDeviceExtension, OUT PULONG VgaStatus)
 
VPAPI LONG FASTCALL VideoPortInterlockedDecrement (IN PLONG Addend)
 
VPAPI LONG FASTCALL VideoPortInterlockedExchange (IN OUT PLONG Target, IN LONG Value)
 
VPAPI LONG FASTCALL VideoPortInterlockedIncrement (IN PLONG Addend)
 
VPAPI ULONG NTAPI VideoPortInitialize (IN PVOID Argument1, IN PVOID Argument2, IN PVIDEO_HW_INITIALIZATION_DATA HwInitializationData, IN PVOID HwContext)
 
VPAPI VP_STATUS NTAPI VideoPortInt10 (IN PVOID HwDeviceExtension, IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments)
 
VPAPI VOID NTAPI VideoPortLogError (IN PVOID HwDeviceExtension, IN PVIDEO_REQUEST_PACKET Vrp OPTIONAL, IN VP_STATUS ErrorCode, IN ULONG UniqueId)
 
VPAPI VP_STATUS NTAPI VideoPortMapBankedMemory (IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS PhysicalAddress, IN OUT PULONG Length, PULONG InIoSpace, PVOID *VirtualAddress, ULONG BankLength, UCHAR ReadWriteBank, PBANKED_SECTION_ROUTINE BankRoutine, PVOID Context)
 
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 NTAPI VideoPortMoveMemory (IN PVOID Destination, IN PVOID Source, IN ULONG Length)
 
VPAPI LONGLONG NTAPI VideoPortQueryPerformanceCounter (IN PVOID HwDeviceExtension, OUT PLONGLONG PerformanceFrequency OPTIONAL)
 
VPAPI VP_STATUS NTAPI VideoPortQueryServices (IN PVOID HwDeviceExtension, IN VIDEO_PORT_SERVICES ServicesType, IN OUT PINTERFACE Interface)
 
VPAPI BOOLEAN NTAPI VideoPortQueueDpc (IN PVOID HwDeviceExtension, IN PMINIPORT_DPC_ROUTINE CallbackRoutine, IN PVOID Context)
 
VPAPI VOID NTAPI VideoPortReadPortBufferUchar (IN PUCHAR Port, OUT PUCHAR Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortReadPortBufferUlong (IN PULONG Port, OUT PULONG Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortReadPortBufferUshort (IN PUSHORT Port, OUT PUSHORT Buffer, IN ULONG Count)
 
VPAPI UCHAR NTAPI VideoPortReadPortUchar (IN PUCHAR Port)
 
VPAPI ULONG NTAPI VideoPortReadPortUlong (IN PULONG Port)
 
VPAPI USHORT NTAPI VideoPortReadPortUshort (IN PUSHORT Port)
 
VPAPI VOID NTAPI VideoPortReadRegisterBufferUchar (IN PUCHAR Register, OUT PUCHAR Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortReadRegisterBufferUlong (IN PULONG Register, OUT PULONG Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortReadRegisterBufferUshort (IN PUSHORT Register, OUT PUSHORT Buffer, IN ULONG Count)
 
VPAPI UCHAR NTAPI VideoPortReadRegisterUchar (IN PUCHAR Register)
 
VPAPI ULONG NTAPI VideoPortReadRegisterUlong (IN PULONG Register)
 
VPAPI USHORT NTAPI VideoPortReadRegisterUshort (IN PUSHORT Register)
 
VPAPI VOID NTAPI VideoPortReleaseBuffer (IN PVOID HwDeviceExtension, IN PVOID Buffer)
 
VPAPI VOID NTAPI VideoPortReleaseDeviceLock (IN PVOID HwDeviceExtension)
 
VPAPI BOOLEAN NTAPI VideoPortScanRom (PVOID HwDeviceExtension, PUCHAR RomBase, ULONG RomLength, PUCHAR String)
 
VPAPI ULONG NTAPI VideoPortSetBusData (IN PVOID HwDeviceExtension, IN BUS_DATA_TYPE BusDataType, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
 
VPAPI VP_STATUS NTAPI VideoPortSetRegistryParameters (IN PVOID HwDeviceExtension, IN PWSTR ValueName, IN PVOID ValueData, IN ULONG ValueLength)
 
VPAPI VP_STATUS NTAPI VideoPortSetTrappedEmulatorPorts (IN PVOID HwDeviceExtension, IN ULONG NumAccessRanges, IN PVIDEO_ACCESS_RANGE AccessRange)
 
VPAPI VOID NTAPI VideoPortStallExecution (IN ULONG Microseconds)
 
VPAPI VOID NTAPI VideoPortStartTimer (IN PVOID HwDeviceExtension)
 
VPAPI VOID NTAPI VideoPortStopTimer (IN PVOID HwDeviceExtension)
 
VPAPI BOOLEAN NTAPI VideoPortSynchronizeExecution (IN PVOID HwDeviceExtension, IN VIDEO_SYNCHRONIZE_PRIORITY Priority, IN PMINIPORT_SYNCHRONIZE_ROUTINE SynchronizeRoutine, IN PVOID Context)
 
VPAPI VP_STATUS NTAPI VideoPortUnmapMemory (IN PVOID HwDeviceExtension, IN OUT PVOID VirtualAddress, IN HANDLE ProcessHandle)
 
VPAPI VP_STATUS NTAPI VideoPortVerifyAccessRanges (IN PVOID HwDeviceExtension, IN ULONG NumAccessRanges, IN PVIDEO_ACCESS_RANGE AccessRanges)
 
VPAPI VOID NTAPI VideoPortWritePortBufferUchar (IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortWritePortBufferUlong (IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortWritePortBufferUshort (IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortWritePortUchar (IN PUCHAR Port, IN UCHAR Value)
 
VPAPI VOID NTAPI VideoPortWritePortUlong (IN PULONG Port, IN ULONG Value)
 
VPAPI VOID NTAPI VideoPortWritePortUshort (IN PUSHORT Port, IN USHORT Value)
 
VPAPI VOID NTAPI VideoPortWriteRegisterBufferUchar (IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortWriteRegisterBufferUlong (IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortWriteRegisterBufferUshort (IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
 
VPAPI VOID NTAPI VideoPortWriteRegisterUchar (IN PUCHAR Register, IN UCHAR Value)
 
VPAPI VOID NTAPI VideoPortWriteRegisterUlong (IN PULONG Register, IN ULONG Value)
 
VPAPI VOID NTAPI VideoPortWriteRegisterUshort (IN PUSHORT Register, IN USHORT Value)
 
VPAPI VOID NTAPI VideoPortZeroDeviceMemory (IN PVOID Destination, IN ULONG Length)
 
VPAPI VOID NTAPI VideoPortZeroMemory (IN PVOID Destination, IN ULONG Length)
 
VPAPI PVOID NTAPI VideoPortAllocateContiguousMemory (IN PVOID HwDeviceExtension, IN ULONG NumberOfBytes, IN PHYSICAL_ADDRESS HighestAcceptableAddress)
 
VPAPI PVOID NTAPI VideoPortGetCommonBuffer (IN PVOID HwDeviceExtension, IN ULONG DesiredLength, IN ULONG Alignment, OUT PPHYSICAL_ADDRESS LogicalAddress, OUT PULONG pActualLength, IN BOOLEAN CacheEnabled)
 
VPAPI VOID NTAPI VideoPortFreeCommonBuffer (IN PVOID HwDeviceExtension, IN ULONG Length, IN PVOID VirtualAddress, IN PHYSICAL_ADDRESS LogicalAddress, IN BOOLEAN CacheEnabled)
 
VPAPI PDMA NTAPI VideoPortDoDma (IN PVOID HwDeviceExtension, IN PDMA pDma, IN DMA_FLAGS DmaFlags)
 
VPAPI BOOLEAN NTAPI VideoPortLockPages (IN PVOID HwDeviceExtension, IN OUT PVIDEO_REQUEST_PACKET pVrp, IN OUT PEVENT pUEvent, IN PEVENT pDisplayEvent, IN DMA_FLAGS DmaFlags)
 
VPAPI BOOLEAN NTAPI VideoPortUnlockPages (IN PVOID hwDeviceExtension, IN OUT PDMA pDma)
 
VPAPI BOOLEAN NTAPI VideoPortSignalDmaComplete (IN PVOID HwDeviceExtension, IN PDMA pDmaHandle)
 
VPAPI PVOID NTAPI VideoPortGetMdl (IN PVOID HwDeviceExtension, IN PDMA pDma)
 
VPAPI PVOID NTAPI VideoPortGetDmaContext (IN PVOID HwDeviceExtension, IN PDMA pDma)
 
VPAPI VOID NTAPI VideoPortSetDmaContext (IN PVOID HwDeviceExtension, OUT PDMA pDma, IN PVOID InstanceContext)
 
VPAPI ULONG NTAPI VideoPortGetBytesUsed (IN PVOID HwDeviceExtension, IN PDMA pDma)
 
VPAPI VOID NTAPI VideoPortSetBytesUsed (IN PVOID HwDeviceExtension, IN OUT PDMA pDma, IN ULONG BytesUsed)
 
VPAPI PDMA NTAPI VideoPortAssociateEventsWithDmaHandle (IN PVOID HwDeviceExtension, IN OUT PVIDEO_REQUEST_PACKET pVrp, IN PVOID MappedUserEvent, IN PVOID DisplayDriverEvent)
 
VPAPI PDMA NTAPI VideoPortMapDmaMemory (IN PVOID HwDeviceExtension, IN PVIDEO_REQUEST_PACKET pVrp, IN PHYSICAL_ADDRESS BoardAddress, IN PULONG Length, IN PULONG InIoSpace, IN PVOID MappedUserEvent, IN PVOID DisplayDriverEvent, IN OUT PVOID *VirtualAddress)
 
VPAPI BOOLEAN NTAPI VideoPortUnmapDmaMemory (IN PVOID HwDeviceExtension, IN PVOID VirtualAddress, IN HANDLE ProcessHandle, IN PDMA BoardMemoryHandle)
 
VPAPI VP_STATUS NTAPI VideoPortCreateSecondaryDisplay (IN PVOID HwDeviceExtension, IN OUT PVOID *SecondaryDeviceExtension, IN ULONG ulFlag)
 
VPAPI PVP_DMA_ADAPTER NTAPI VideoPortGetDmaAdapter (IN PVOID HwDeviceExtension, IN PVP_DEVICE_DESCRIPTION VpDeviceDescription)
 
VPAPI VOID NTAPI VideoPortPutDmaAdapter (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter)
 
VPAPI PVOID NTAPI VideoPortAllocateCommonBuffer (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN ULONG DesiredLength, OUT PPHYSICAL_ADDRESS LogicalAddress, IN BOOLEAN CacheEnabled, PVOID Reserved)
 
VPAPI VOID NTAPI VideoPortReleaseCommonBuffer (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN ULONG Length, IN PHYSICAL_ADDRESS LogicalAddress, IN PVOID VirtualAddress, IN BOOLEAN CacheEnabled)
 
VPAPI PVOID NTAPI VideoPortLockBuffer (IN PVOID HwDeviceExtension, IN PVOID BaseAddress, IN ULONG Length, IN VP_LOCK_OPERATION Operation)
 
VPAPI VOID NTAPI VideoPortUnlockBuffer (IN PVOID HwDeviceExtension, IN PVOID Mdl)
 
VPAPI VP_STATUS NTAPI VideoPortStartDma (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN PVOID Mdl, IN ULONG Offset, IN OUT PULONG pLength, IN PEXECUTE_DMA ExecuteDmaRoutine, IN PVOID Context, IN BOOLEAN WriteToDevice)
 
VPAPI VP_STATUS NTAPI VideoPortCompleteDma (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN PVP_SCATTER_GATHER_LIST VpScatterGather, IN BOOLEAN WriteToDevice)
 
VPAPI VP_STATUS NTAPI VideoPortCreateEvent (IN PVOID HwDeviceExtension, IN ULONG EventFlag, IN PVOID Unused, OUT PEVENT *ppEvent)
 
VPAPI VP_STATUS NTAPI VideoPortDeleteEvent (IN PVOID HwDeviceExtension, IN PEVENT pEvent)
 
VPAPI LONG NTAPI VideoPortSetEvent (IN PVOID HwDeviceExtension, IN PEVENT pEvent)
 
VPAPI VOID NTAPI VideoPortClearEvent (IN PVOID HwDeviceExtension, IN PEVENT pEvent)
 
VPAPI LONG NTAPI VideoPortReadStateEvent (IN PVOID HwDeviceExtension, IN PEVENT pEvent)
 
VPAPI VP_STATUS NTAPI VideoPortWaitForSingleObject (IN PVOID HwDeviceExtension, IN PVOID Object, IN PLARGE_INTEGER Timeout OPTIONAL)
 
VPAPI PVOID NTAPI VideoPortAllocatePool (IN PVOID HwDeviceExtension, IN VP_POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
 
VPAPI VOID NTAPI VideoPortFreePool (IN PVOID HwDeviceExtension, IN PVOID Ptr)
 
VPAPI VP_STATUS NTAPI VideoPortCreateSpinLock (IN PVOID HwDeviceExtension, OUT PSPIN_LOCK *SpinLock)
 
VPAPI VP_STATUS NTAPI VideoPortDeleteSpinLock (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)
 
VPAPI VOID NTAPI VideoPortAcquireSpinLock (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, OUT PUCHAR OldIrql)
 
VPAPI VOID NTAPI VideoPortAcquireSpinLockAtDpcLevel (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)
 
VPAPI VOID NTAPI VideoPortReleaseSpinLock (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, IN UCHAR NewIrql)
 
VPAPI VOID NTAPI VideoPortReleaseSpinLockFromDpcLevel (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)
 
VPAPI VOID NTAPI VideoPortQuerySystemTime (OUT PLARGE_INTEGER CurrentTime)
 
VPAPI BOOLEAN NTAPI VideoPortCheckForDeviceExistence (IN PVOID HwDeviceExtension, IN USHORT VendorId, IN USHORT DeviceId, IN UCHAR RevisionId, IN USHORT SubVendorId, IN USHORT SubSystemId, IN ULONG Flags)
 
VPAPI ULONG NTAPI VideoPortGetAssociatedDeviceID (IN PVOID DeviceObject)
 
VPAPI VP_STATUS NTAPI VideoPortFlushRegistry (PVOID HwDeviceExtension)
 
VPAPI VP_STATUS NTAPI VideoPortGetVersion (IN PVOID HwDeviceExtension, IN OUT PVPOSVERSIONINFO pVpOsVersionInfo)
 
VPAPI BOOLEAN NTAPI VideoPortIsNoVesa (VOID)
 
VPAPI VP_STATUS NTAPI VideoPortRegisterBugcheckCallback (IN PVOID HwDeviceExtension, IN ULONG BugcheckCode, IN PVIDEO_BUGCHECK_CALLBACK Callback, IN ULONG BugcheckDataSize)
 
VPAPI PVIDEO_DEBUG_REPORT NTAPI VideoPortDbgReportCreate (IN PVOID HwDeviceExtension, IN ULONG ulCode, IN ULONG_PTR ulpArg1, IN ULONG_PTR ulpArg2, IN ULONG_PTR ulpArg3, IN ULONG_PTR ulpArg4)
 
VPAPI BOOLEAN NTAPI VideoPortDbgReportSecondaryData (IN OUT PVIDEO_DEBUG_REPORT pReport, IN PVOID pvData, IN ULONG ulDataSize)
 
VPAPI VOID NTAPI VideoPortDbgReportComplete (IN OUT PVIDEO_DEBUG_REPORT pReport)
 

Macro Definition Documentation

◆ __VIDEO_H__

#define __VIDEO_H__

Definition at line 25 of file video.h.

◆ BUGCHECK_DATA_SIZE_RESERVED

#define BUGCHECK_DATA_SIZE_RESERVED   48

Definition at line 149 of file video.h.

◆ CDE_USE_REVISION

#define CDE_USE_REVISION   0x00000002

Definition at line 147 of file video.h.

◆ CDE_USE_SUBSYSTEM_IDS

#define CDE_USE_SUBSYSTEM_IDS   0x00000001

Definition at line 146 of file video.h.

◆ DEVICE_VGA_ENABLED

#define DEVICE_VGA_ENABLED   1

Definition at line 143 of file video.h.

◆ DISPLAY_ADAPTER_HW_ID

#define DISPLAY_ADAPTER_HW_ID   0xFFFFFFFF

Definition at line 115 of file video.h.

◆ EVENT_TYPE_MASK

#define EVENT_TYPE_MASK   1

Definition at line 107 of file video.h.

◆ GET_VIDEO_PHYSICAL_ADDRESS

#define GET_VIDEO_PHYSICAL_ADDRESS (   scatterList,
  VirtualAddress,
  InputBuffer,
  pLength,
  Address 
)
Value:
do { \
ULONG_PTR byteOffset; \
\
byteOffset = (PCHAR) VirtualAddress - (PCHAR)InputBuffer; \
while (byteOffset >= scatterList->Length) { \
byteOffset -= scatterList->Length; \
scatterList++; \
} \
*pLength = scatterList->Length - byteOffset; \
Address = (ULONG_PTR) (scatterList->PhysicalAddress + byteOffset); \
} while (0)
signed char * PCHAR
Definition: retypes.h:7
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
#define PCHAR
Definition: match.c:90
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:949
#define ULONG_PTR
Definition: config.h:101

Definition at line 78 of file video.h.

◆ GET_VIDEO_SCATTERGATHER

#define GET_VIDEO_SCATTERGATHER (   ppDma)    (**(PVRB_SG **)ppDma)

Definition at line 95 of file video.h.

◆ INITIAL_EVENT_NOT_SIGNALED

#define INITIAL_EVENT_NOT_SIGNALED   0

Definition at line 112 of file video.h.

◆ INITIAL_EVENT_SIGNALED

#define INITIAL_EVENT_SIGNALED   2

Definition at line 113 of file video.h.

◆ INITIAL_EVENT_STATE_MASK

#define INITIAL_EVENT_STATE_MASK   2

Definition at line 111 of file video.h.

◆ NOTIFICATION_EVENT

#define NOTIFICATION_EVENT   1

Definition at line 109 of file video.h.

◆ PAGED_CODE

#define PAGED_CODE ( )

Definition at line 57 of file video.h.

◆ SET_DISPLAY_EVENT

#define SET_DISPLAY_EVENT   0x02

Definition at line 105 of file video.h.

◆ SET_USER_EVENT

#define SET_USER_EVENT   0x01

Definition at line 104 of file video.h.

◆ SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA

#define SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA   FIELD_OFFSET(VIDEO_HW_INITIALIZATION_DATA, HwStartDma)

Definition at line 119 of file video.h.

◆ SIZE_OF_NT4_VIDEO_PORT_CONFIG_INFO

#define SIZE_OF_NT4_VIDEO_PORT_CONFIG_INFO   FIELD_OFFSET(VIDEO_PORT_CONFIG_INFO, Master)

Definition at line 101 of file video.h.

◆ SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA

#define SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA   FIELD_OFFSET(VIDEO_HW_INITIALIZATION_DATA, Reserved)

Definition at line 120 of file video.h.

◆ SIZE_OF_WXP_VIDEO_HW_INITIALIZATION_DATA

#define SIZE_OF_WXP_VIDEO_HW_INITIALIZATION_DATA   (SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA + sizeof(ULONG))

Definition at line 121 of file video.h.

◆ SIZE_OF_WXP_VIDEO_PORT_CONFIG_INFO

#define SIZE_OF_WXP_VIDEO_PORT_CONFIG_INFO   sizeof(VIDEO_PORT_CONFIG_INFO)

Definition at line 102 of file video.h.

◆ SYNCHRONIZATION_EVENT

#define SYNCHRONIZATION_EVENT   0

Definition at line 108 of file video.h.

◆ VIDEO_DEBUG_REPORT_MAX_SIZE

#define VIDEO_DEBUG_REPORT_MAX_SIZE   0x8000

Definition at line 151 of file video.h.

◆ VIDEO_ENUM_INVALID_DEVICE

#define VIDEO_ENUM_INVALID_DEVICE   ERROR_INVALID_NAME

Definition at line 141 of file video.h.

◆ VIDEO_ENUM_MORE_DEVICES

#define VIDEO_ENUM_MORE_DEVICES   ERROR_CONTINUE

Definition at line 139 of file video.h.

◆ VIDEO_ENUM_NO_MORE_DEVICES

#define VIDEO_ENUM_NO_MORE_DEVICES   ERROR_NO_MORE_DEVICES

Definition at line 140 of file video.h.

◆ VIDEO_INVALID_CHILD_ID

#define VIDEO_INVALID_CHILD_ID   0xFFFFFFFF

Definition at line 117 of file video.h.

◆ VIDEO_MEMORY_SPACE_DENSE

#define VIDEO_MEMORY_SPACE_DENSE   0x04

Definition at line 135 of file video.h.

◆ VIDEO_MEMORY_SPACE_IO

#define VIDEO_MEMORY_SPACE_IO   0x01

Definition at line 133 of file video.h.

◆ VIDEO_MEMORY_SPACE_MEMORY

#define VIDEO_MEMORY_SPACE_MEMORY   0x00

Definition at line 132 of file video.h.

◆ VIDEO_MEMORY_SPACE_P6CACHE

#define VIDEO_MEMORY_SPACE_P6CACHE   0x08

Definition at line 136 of file video.h.

◆ VIDEO_MEMORY_SPACE_USER_MODE

#define VIDEO_MEMORY_SPACE_USER_MODE   0x02

Definition at line 134 of file video.h.

◆ VIDEO_PORT_AGP_INTERFACE_VERSION_1

#define VIDEO_PORT_AGP_INTERFACE_VERSION_1   1

Definition at line 123 of file video.h.

◆ VIDEO_PORT_AGP_INTERFACE_VERSION_2

#define VIDEO_PORT_AGP_INTERFACE_VERSION_2   2

Definition at line 124 of file video.h.

◆ VIDEO_PORT_DEBUG_REPORT_INTERFACE_VERSION_1

#define VIDEO_PORT_DEBUG_REPORT_INTERFACE_VERSION_1   1

Definition at line 129 of file video.h.

◆ VIDEO_PORT_I2C_INTERFACE_VERSION_1

#define VIDEO_PORT_I2C_INTERFACE_VERSION_1   1

Definition at line 125 of file video.h.

◆ VIDEO_PORT_I2C_INTERFACE_VERSION_2

#define VIDEO_PORT_I2C_INTERFACE_VERSION_2   2

Definition at line 126 of file video.h.

◆ VIDEO_PORT_INT10_INTERFACE_VERSION_1

#define VIDEO_PORT_INT10_INTERFACE_VERSION_1   1

Definition at line 127 of file video.h.

◆ VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE_VERSION_1

#define VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE_VERSION_1   1

Definition at line 128 of file video.h.

◆ VIDEO_RANGE_10_BIT_DECODE

#define VIDEO_RANGE_10_BIT_DECODE   2

Definition at line 99 of file video.h.

◆ VIDEO_RANGE_PASSIVE_DECODE

#define VIDEO_RANGE_PASSIVE_DECODE   1

Definition at line 98 of file video.h.

◆ VideoDebugPrint

#define VideoDebugPrint (   x)

Definition at line 75 of file video.h.

◆ VPAPI

#define VPAPI   DECLSPEC_IMPORT

Definition at line 47 of file video.h.

Typedef Documentation

◆ DDC_CONTROL

◆ DMA_EVENT_FLAGS

Definition at line 154 of file video.h.

◆ DMA_FLAGS

◆ HW_DMA_RETURN

◆ I2C_CALLBACKS

◆ I2C_FNC_TABLE

◆ INT10_BIOS_ARGUMENTS

◆ PDDC_CONTROL

◆ PDMA

typedef struct __DMA_PARAMETERS* PDMA

Definition at line 158 of file video.h.

◆ PDRIVER_IO_PORT_UCHAR

typedef VP_STATUS(NTAPI * PDRIVER_IO_PORT_UCHAR) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUCHAR Data)

Definition at line 589 of file video.h.

◆ PDRIVER_IO_PORT_UCHAR_STRING

typedef VP_STATUS(NTAPI * PDRIVER_IO_PORT_UCHAR_STRING) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUCHAR Data, IN ULONG DataLength)

Definition at line 596 of file video.h.

◆ PDRIVER_IO_PORT_ULONG

typedef VP_STATUS(NTAPI * PDRIVER_IO_PORT_ULONG) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PULONG Data)

Definition at line 604 of file video.h.

◆ PDRIVER_IO_PORT_ULONG_STRING

typedef VP_STATUS(NTAPI * PDRIVER_IO_PORT_ULONG_STRING) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PULONG Data, IN ULONG DataLength)

Definition at line 611 of file video.h.

◆ PDRIVER_IO_PORT_USHORT

typedef VP_STATUS(NTAPI * PDRIVER_IO_PORT_USHORT) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUSHORT Data)

Definition at line 619 of file video.h.

◆ PDRIVER_IO_PORT_USHORT_STRING

typedef VP_STATUS(NTAPI * PDRIVER_IO_PORT_USHORT_STRING) (IN ULONG_PTR Context, IN ULONG Port, IN UCHAR AccessMode, IN PUSHORT Data, IN ULONG DataLength)

Definition at line 626 of file video.h.

◆ PEXECUTE_DMA

typedef VOID(NTAPI * PEXECUTE_DMA) (IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN PVP_SCATTER_GATHER_LIST SGList, IN PVOID Context)

Definition at line 253 of file video.h.

◆ PHW_DMA_RETURN

◆ PI2C_CALLBACKS

◆ PI2C_FNC_TABLE

◆ PI2C_READ

typedef BOOLEAN(NTAPI * PI2C_READ) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks, OUT PUCHAR Buffer, IN ULONG Length)

Definition at line 394 of file video.h.

◆ PI2C_READ_2

typedef BOOLEAN(NTAPI * PI2C_READ_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl, OUT PUCHAR Buffer, IN ULONG Length, IN BOOLEAN EndOfRead)

Definition at line 426 of file video.h.

◆ PI2C_START

typedef BOOLEAN(NTAPI * PI2C_START) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks)

Definition at line 377 of file video.h.

◆ PI2C_START_2

typedef BOOLEAN(NTAPI * PI2C_START_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl)

Definition at line 409 of file video.h.

◆ PI2C_STOP

typedef BOOLEAN(NTAPI * PI2C_STOP) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks)

Definition at line 382 of file video.h.

◆ PI2C_STOP_2

typedef BOOLEAN(NTAPI * PI2C_STOP_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl)

Definition at line 414 of file video.h.

◆ PI2C_WRITE

typedef BOOLEAN(NTAPI * PI2C_WRITE) (IN PVOID HwDeviceExtension, IN PI2C_CALLBACKS I2CCallbacks, IN PUCHAR Buffer, IN ULONG Length)

Definition at line 387 of file video.h.

◆ PI2C_WRITE_2

typedef BOOLEAN(NTAPI * PI2C_WRITE_2) (IN PVOID HwDeviceExtension, IN PVIDEO_I2C_CONTROL I2CControl, IN PUCHAR Buffer, IN ULONG Length)

Definition at line 419 of file video.h.

◆ PINT10_ALLOCATE_BUFFER

typedef VP_STATUS(NTAPI * PINT10_ALLOCATE_BUFFER) (IN PVOID Context, OUT PUSHORT Seg, OUT PUSHORT Off, IN OUT PULONG Length)

Definition at line 451 of file video.h.

◆ PINT10_BIOS_ARGUMENTS

◆ PINT10_CALL_BIOS

typedef VP_STATUS(NTAPI * PINT10_CALL_BIOS) (IN PVOID Context, IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)

Definition at line 446 of file video.h.

◆ PINT10_FREE_BUFFER

typedef VP_STATUS(NTAPI * PINT10_FREE_BUFFER) (IN PVOID Context, IN USHORT Seg, IN USHORT Off)

Definition at line 458 of file video.h.

◆ PINT10_READ_MEMORY

typedef VP_STATUS(NTAPI * PINT10_READ_MEMORY) (IN PVOID Context, IN USHORT Seg, IN USHORT Off, OUT PVOID Buffer, IN ULONG Length)

Definition at line 464 of file video.h.

◆ PINT10_WRITE_MEMORY

typedef VP_STATUS(NTAPI * PINT10_WRITE_MEMORY) (IN PVOID Context, IN USHORT Seg, IN USHORT Off, IN PVOID Buffer, IN ULONG Length)

Definition at line 472 of file video.h.

◆ PMINIPORT_DPC_ROUTINE

typedef VOID(NTAPI * PMINIPORT_DPC_ROUTINE) (IN PVOID HwDeviceExtension, IN PVOID Context)

Definition at line 518 of file video.h.

◆ PMINIPORT_GET_REGISTRY_ROUTINE

typedef VP_STATUS(NTAPI * PMINIPORT_GET_REGISTRY_ROUTINE) (IN PVOID HwDeviceExtension, IN PVOID Context, IN OUT PWSTR ValueName, IN OUT PVOID ValueData, IN ULONG ValueLength)

Definition at line 510 of file video.h.

◆ PMINIPORT_QUERY_DEVICE_ROUTINE

typedef VP_STATUS(NTAPI * PMINIPORT_QUERY_DEVICE_ROUTINE) (IN PVOID HwDeviceExtension, IN PVOID Context, IN VIDEO_DEVICE_DATA_TYPE DeviceDataType, IN PVOID Identifier, IN ULONG IdentifierLength, IN PVOID ConfigurationData, IN ULONG ConfigurationDataLength, IN OUT PVOID ComponentInformation, IN ULONG ComponentInformationLength)

Definition at line 498 of file video.h.

◆ PMINIPORT_SYNCHRONIZE_ROUTINE

typedef BOOLEAN(NTAPI * PMINIPORT_SYNCHRONIZE_ROUTINE) (IN PVOID Context)

Definition at line 523 of file video.h.

◆ PQUERY_INTERFACE

◆ PROTECT_WC_MEMORY

typedef VP_STATUS(NTAPI * PROTECT_WC_MEMORY) (IN PVOID Context, IN PVOID HwDeviceExtension)

Definition at line 480 of file video.h.

◆ PSPIN_LOCK

typedef struct _VIDEO_PORT_SPIN_LOCK* PSPIN_LOCK

Definition at line 156 of file video.h.

◆ PSTATUS_BLOCK

◆ PVIDEO_ACCESS_RANGE

◆ PVIDEO_BUGCHECK_CALLBACK

typedef VOID(NTAPI * PVIDEO_BUGCHECK_CALLBACK) (IN PVOID HwDeviceExtension, IN ULONG BugcheckCode, IN PUCHAR Buffer, IN ULONG BufferSize)

Definition at line 527 of file video.h.

◆ PVIDEO_CHILD_ENUM_INFO

◆ PVIDEO_CHILD_STATE

◆ PVIDEO_CHILD_STATE_CONFIGURATION

◆ PVIDEO_CHILD_TYPE

◆ PVIDEO_DEBUG_LEVEL

◆ PVIDEO_DEBUG_REPORT

typedef struct _VIDEO_DEBUG_REPORT* PVIDEO_DEBUG_REPORT

Definition at line 157 of file video.h.

◆ PVIDEO_DEVICE_DATA_TYPE

◆ PVIDEO_HARDWARE_CONFIGURATION_DATA

◆ PVIDEO_HW_CHILD_CALLBACK

typedef VP_STATUS(NTAPI * PVIDEO_HW_CHILD_CALLBACK) (PVOID HwDeviceExtension, PVOID ChildDeviceExtension)

Definition at line 311 of file video.h.

◆ PVIDEO_HW_FIND_ADAPTER

typedef VP_STATUS(NTAPI * PVIDEO_HW_FIND_ADAPTER) (IN PVOID HwDeviceExtension, IN PVOID HwContext, IN PWSTR ArgumentString, IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo, OUT PUCHAR Again)

Definition at line 199 of file video.h.

◆ PVIDEO_HW_GET_CHILD_DESCRIPTOR

typedef VP_STATUS(NTAPI * PVIDEO_HW_GET_CHILD_DESCRIPTOR) (IN PVOID HwDeviceExtension, IN PVIDEO_CHILD_ENUM_INFO ChildEnumInfo, OUT PVIDEO_CHILD_TYPE VideoChildType, OUT PUCHAR pChildDescriptor, OUT PULONG UId, OUT PULONG pUnused)

Definition at line 277 of file video.h.

◆ PVIDEO_HW_INITIALIZATION_DATA

◆ PVIDEO_HW_INITIALIZE

typedef BOOLEAN(NTAPI * PVIDEO_HW_INITIALIZE) (IN PVOID HwDeviceExtension)

Definition at line 207 of file video.h.

◆ PVIDEO_HW_INTERRUPT

typedef BOOLEAN(NTAPI * PVIDEO_HW_INTERRUPT) (IN PVOID HwDeviceExtension)

Definition at line 211 of file video.h.

◆ PVIDEO_HW_LEGACYRESOURCES

typedef VOID(NTAPI * PVIDEO_HW_LEGACYRESOURCES) (IN ULONG VendorId, IN ULONG DeviceId, IN OUT PVIDEO_ACCESS_RANGE *LegacyResourceList, IN OUT PULONG LegacyResourceCount)

Definition at line 224 of file video.h.

◆ PVIDEO_HW_POWER_GET

typedef VP_STATUS(NTAPI * PVIDEO_HW_POWER_GET) (IN PVOID HwDeviceExtension, IN ULONG HwId, IN OUT PVIDEO_POWER_MANAGEMENT VideoPowerControl)

Definition at line 292 of file video.h.

◆ PVIDEO_HW_POWER_SET

typedef VP_STATUS(NTAPI * PVIDEO_HW_POWER_SET) (IN PVOID HwDeviceExtension, IN ULONG HwId, IN PVIDEO_POWER_MANAGEMENT VideoPowerControl)

Definition at line 286 of file video.h.

◆ PVIDEO_HW_QUERY_INTERFACE

typedef VP_STATUS(NTAPI * PVIDEO_HW_QUERY_INTERFACE) (IN PVOID HwDeviceExtension, IN OUT PQUERY_INTERFACE QueryInterface)

Definition at line 306 of file video.h.

◆ PVIDEO_HW_RESET_HW

typedef BOOLEAN(NTAPI * PVIDEO_HW_RESET_HW) (IN PVOID HwDeviceExtension, IN ULONG Columns, IN ULONG Rows)

Definition at line 316 of file video.h.

◆ PVIDEO_HW_START_DMA

typedef HW_DMA_RETURN(NTAPI * PVIDEO_HW_START_DMA) (PVOID HwDeviceExtension, PDMA pDma)

Definition at line 236 of file video.h.

◆ PVIDEO_HW_START_IO

typedef BOOLEAN(NTAPI * PVIDEO_HW_START_IO) (IN PVOID HwDeviceExtension, IN PVIDEO_REQUEST_PACKET RequestPacket)

Definition at line 339 of file video.h.

◆ PVIDEO_HW_TIMER

typedef VOID(NTAPI * PVIDEO_HW_TIMER) (IN PVOID HwDeviceExtension)

Definition at line 344 of file video.h.

◆ PVIDEO_I2C_CONTROL

◆ PVIDEO_PORT_AGP_INTERFACE

◆ PVIDEO_PORT_AGP_INTERFACE_2

◆ PVIDEO_PORT_CONFIG_INFO

◆ PVIDEO_PORT_DEBUG_REPORT_INTERFACE

◆ PVIDEO_PORT_GET_PROC_ADDRESS

typedef PVOID(NTAPI * PVIDEO_PORT_GET_PROC_ADDRESS) (IN PVOID HwDeviceExtension, IN PUCHAR FunctionName)

Definition at line 162 of file video.h.

◆ PVIDEO_PORT_I2C_INTERFACE

◆ PVIDEO_PORT_I2C_INTERFACE_2

◆ PVIDEO_PORT_INT10_INTERFACE

◆ PVIDEO_PORT_WCMEMORYPROTECTION_INTERFACE

◆ PVIDEO_READ_CLOCK_LINE

typedef BOOLEAN(NTAPI * PVIDEO_READ_CLOCK_LINE) (PVOID HwDeviceExtension)

Definition at line 358 of file video.h.

◆ PVIDEO_READ_DATA_LINE

typedef BOOLEAN(NTAPI * PVIDEO_READ_DATA_LINE) (PVOID HwDeviceExtension)

Definition at line 362 of file video.h.

◆ PVIDEO_REQUEST_PACKET

◆ PVIDEO_SYNCHRONIZE_PRIORITY

◆ PVIDEO_WAIT_VSYNC_ACTIVE

typedef VOID(NTAPI * PVIDEO_WAIT_VSYNC_ACTIVE) (PVOID HwDeviceExtension)

Definition at line 366 of file video.h.

◆ PVIDEO_WRITE_CLOCK_LINE

typedef VOID(NTAPI * PVIDEO_WRITE_CLOCK_LINE) (PVOID HwDeviceExtension, UCHAR Data)

Definition at line 348 of file video.h.

◆ PVIDEO_WRITE_DATA_LINE

typedef VOID(NTAPI * PVIDEO_WRITE_DATA_LINE) (PVOID HwDeviceExtension, UCHAR Data)

Definition at line 353 of file video.h.

◆ PVIDEO_X86_BIOS_ARGUMENTS

◆ PVP_DEVICE_DESCRIPTION

◆ PVP_DMA_ADAPTER

typedef struct __VP_DMA_ADAPTER* PVP_DMA_ADAPTER

Definition at line 159 of file video.h.

◆ PVP_POOL_TYPE

◆ PVP_SCATTER_GATHER_ELEMENT

◆ PVP_SCATTER_GATHER_LIST

◆ PVP_STATUS

typedef LONG * PVP_STATUS

Definition at line 153 of file video.h.

◆ PVPOSVERSIONINFO

◆ PVRB_SG

typedef struct __VRB_SG * PVRB_SG

◆ QUERY_INTERFACE

◆ RESTORE_WC_MEMORY

typedef VP_STATUS(NTAPI * RESTORE_WC_MEMORY) (IN PVOID Context, IN PVOID HwDeviceExtension)

Definition at line 485 of file video.h.

◆ STATUS_BLOCK

◆ VIDEO_ACCESS_RANGE

◆ VIDEO_CHILD_ENUM_INFO

◆ VIDEO_CHILD_STATE

◆ VIDEO_CHILD_STATE_CONFIGURATION

◆ VIDEO_CHILD_TYPE

◆ VIDEO_DEBUG_LEVEL

◆ VIDEO_DEVICE_DATA_TYPE

◆ VIDEO_HARDWARE_CONFIGURATION_DATA

◆ VIDEO_HW_INITIALIZATION_DATA

◆ VIDEO_I2C_CONTROL

◆ VIDEO_PORT_AGP_INTERFACE

◆ VIDEO_PORT_AGP_INTERFACE_2

◆ VIDEO_PORT_CONFIG_INFO

◆ VIDEO_PORT_DEBUG_REPORT_INTERFACE

◆ VIDEO_PORT_I2C_INTERFACE

◆ VIDEO_PORT_I2C_INTERFACE_2

◆ VIDEO_PORT_INT10_INTERFACE

◆ VIDEO_PORT_SERVICES

◆ VIDEO_PORT_WCMEMORYPROTECTION_INTERFACE

◆ VIDEO_REQUEST_PACKET

◆ VIDEO_SYNCHRONIZE_PRIORITY

◆ VIDEO_X86_BIOS_ARGUMENTS

◆ VP_DEVICE_DESCRIPTION

◆ VP_LOCK_OPERATION

◆ VP_POOL_TYPE

◆ VP_SCATTER_GATHER_ELEMENT

◆ VP_SCATTER_GATHER_LIST

◆ VP_STATUS

typedef LONG VP_STATUS

Definition at line 153 of file video.h.

◆ VPOSVERSIONINFO

◆ VRB_SG

Enumeration Type Documentation

◆ _DMA_FLAGS

Enumerator
VideoPortUnlockAfterDma 
VideoPortKeepPagesLocked 
VideoPortDmaInitOnly 

Definition at line 548 of file video.h.

◆ _HW_DMA_RETURN

Enumerator
DmaAsyncReturn 
DmaSyncReturn 

Definition at line 230 of file video.h.

230  {
enum _HW_DMA_RETURN HW_DMA_RETURN
enum _HW_DMA_RETURN * PHW_DMA_RETURN

◆ _VIDEO_CHILD_TYPE

Enumerator
Monitor 
NonPrimaryChip 
VideoChip 
Other 

Definition at line 269 of file video.h.

269  {
270  Monitor = 1,
272  VideoChip,
273  Other
Definition: video.h:273
enum _VIDEO_CHILD_TYPE VIDEO_CHILD_TYPE
Definition: video.h:270
enum _VIDEO_CHILD_TYPE * PVIDEO_CHILD_TYPE

◆ _VIDEO_DEVICE_DATA_TYPE

Enumerator
VpMachineData 
VpCmosData 
VpBusData 
VpControllerData 
VpMonitorData 

Definition at line 489 of file video.h.

489  {
490  VpMachineData = 0,
491  VpCmosData,
492  VpBusData,
enum _VIDEO_DEVICE_DATA_TYPE * PVIDEO_DEVICE_DATA_TYPE
enum _VIDEO_DEVICE_DATA_TYPE VIDEO_DEVICE_DATA_TYPE

◆ _VIDEO_PORT_SERVICES

Enumerator
VideoPortServicesAGP 
VideoPortServicesI2C 
VideoPortServicesHeadless 
VideoPortServicesInt10 
VideoPortServicesDebugReport 
VideoPortServicesWCMemoryProtection 

Definition at line 704 of file video.h.

◆ _VP_LOCK_OPERATION

Enumerator
VpReadAccess 
VpWriteAccess 
VpModifyAccess 

Definition at line 640 of file video.h.

640  {
641  VpReadAccess = 0,
enum _VP_LOCK_OPERATION VP_LOCK_OPERATION

◆ _VP_POOL_TYPE

Enumerator
VpNonPagedPool 
VpPagedPool 
VpNonPagedPoolCacheAligned 
VpPagedPoolCacheAligned 

Definition at line 541 of file video.h.

541  {
542  VpNonPagedPool = 0,
543  VpPagedPool,
enum _VP_POOL_TYPE * PVP_POOL_TYPE
enum _VP_POOL_TYPE VP_POOL_TYPE

◆ VIDEO_DEBUG_LEVEL

Enumerator
Error 
Warn 
Trace 
Info 

Definition at line 579 of file video.h.

579  {
580  Error = 0,
581  Warn,
582  Trace,
583  Info
enum VIDEO_DEBUG_LEVEL * PVIDEO_DEBUG_LEVEL
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:683
Definition: video.h:581
Definition: video.h:582
VIDEO_DEBUG_LEVEL
Definition: video.h:579
Definition: video.h:580

◆ VIDEO_SYNCHRONIZE_PRIORITY

Enumerator
VpLowPriority 
VpMediumPriority 
VpHighPriority 

Definition at line 534 of file video.h.

534  {
535  VpLowPriority = 0,
enum VIDEO_SYNCHRONIZE_PRIORITY * PVIDEO_SYNCHRONIZE_PRIORITY
VIDEO_SYNCHRONIZE_PRIORITY
Definition: video.h:534

Function Documentation

◆ DriverEntry()

ULONG NTAPI DriverEntry ( PVOID  Context1,
PVOID  Context2 
)

Definition at line 383 of file ParaNdis5-Driver.c.

384 {
388 
390 
391  DEBUG_ENTRY(0);
392  _LogOutString(0, __DATE__ " " __TIME__);
393 
395  DriverObject,
396  RegistryPath,
397  NULL
398  );
399 
400  if (DriverHandle)
401  {
402  NdisZeroMemory(&chars, sizeof(chars));
403  //NDIS version of the miniport
404  chars.MajorNdisVersion = NDIS_MINIPORT_MAJOR_VERSION;
405  chars.MinorNdisVersion = NDIS_MINIPORT_MINOR_VERSION;
406  //Init and destruction
407  chars.InitializeHandler = ParaNdis5_Initialize;
408  chars.HaltHandler = ParaNdis5_Halt;
409 
410  //Interrupt and DPC handling
411  chars.HandleInterruptHandler = ParaNdis5_HandleDPC;
412  chars.ISRHandler = ParaNdis5_MiniportISR;
413 
414  //Packet transfer - send path and notification on the send packet
415  chars.SendPacketsHandler = ParaNdis5_SendPackets;
416  chars.ReturnPacketHandler = ParaNdis5_ReturnPacket;
417 
418  //OID set\get
419  chars.SetInformationHandler = ParaNdis5_SetOID;
420  chars.QueryInformationHandler = ParaNdis5_QueryOID;
421 
422  //Reset
423  chars.ResetHandler = ParaNdis5_Reset;
424  chars.CheckForHangHandler = ParaNdis5_CheckForHang; //optional
425 
426  chars.CancelSendPacketsHandler = ParaNdis5_CancelSendPackets;
427  chars.PnPEventNotifyHandler = ParaNdis5_PnPEventNotify;
428  chars.AdapterShutdownHandler = ParaNdis5_Shutdown;
429 
431  DriverHandle,
432  &chars,
433  sizeof(chars));
434  }
435 
437  {
439  }
440  else if (DriverHandle)
441  {
442  DPrintf(0, ("NdisMRegisterMiniport failed"));
444  }
445  else
446  {
447  DPrintf(0, ("NdisMInitializeWrapper failed"));
448  }
449 
450  DEBUG_EXIT_STATUS(status ? 0 : 4, status);
451  return status;
452 }
void _LogOutString(int level, const char *s)
#define DEBUG_EXIT_STATUS(level, status)
Definition: kdebugprint.h:50
static NDIS_STATUS NTAPI ParaNdis5_Reset(OUT PBOOLEAN AddressingReset, IN NDIS_HANDLE MiniportAdapterContext)
#define DEBUG_ENTRY(level)
Definition: kdebugprint.h:49
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:213
VOID EXPORT NdisMRegisterUnloadHandler(IN NDIS_HANDLE NdisWrapperHandle, IN PDRIVER_UNLOAD UnloadHandler)
Definition: miniport.c:3151
int NDIS_STATUS
Definition: ntddndis.h:475
#define DPrintf(Level, Fmt)
Definition: kdebugprint.h:61
static NDIS_HANDLE DriverHandle
static VOID NTAPI ParaNdis5_Shutdown(IN NDIS_HANDLE MiniportAdapterContext)
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
VOID NTAPI ParaNdis5_HandleDPC(IN NDIS_HANDLE MiniportAdapterContext)
VOID EXPORT NdisTerminateWrapper(IN NDIS_HANDLE NdisWrapperHandle, IN PVOID SystemSpecific)
Definition: miniport.c:3012
VOID NTAPI ParaNdis5_PnPEventNotify(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_DEVICE_PNP_EVENT PnPEvent, IN PVOID InformationBuffer, IN ULONG InformationBufferLength)
NDIS_STATUS NTAPI ParaNdis5_QueryOID(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_OID Oid, IN PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesWritten, OUT PULONG BytesNeeded)
NDIS_STATUS NTAPI ParaNdis5_SetOID(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_OID Oid, IN PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesRead, OUT PULONG BytesNeeded)
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
VOID NTAPI ParaNdis5_ReturnPacket(IN NDIS_HANDLE MiniportAdapterContext, IN PNDIS_PACKET Packet)
static NDIS_STATUS NTAPI ParaNdis5_Initialize(OUT PNDIS_STATUS OpenErrorStatus, OUT PUINT SelectedMediumIndex, IN PNDIS_MEDIUM MediumArray, IN UINT MediumArraySize, IN NDIS_HANDLE MiniportAdapterHandle, IN NDIS_HANDLE WrapperConfigurationContext)
static VOID NTAPI ParaNdis5_MiniportISR(OUT PBOOLEAN InterruptRecognized, OUT PBOOLEAN QueueMiniportHandleInterrupt, IN NDIS_HANDLE MiniportAdapterContext)
static BOOLEAN NTAPI ParaNdis5_CheckForHang(IN NDIS_HANDLE MiniportAdapterContext)
static VOID NTAPI ParaNdis5_Halt(IN NDIS_HANDLE MiniportAdapterContext)
#define NULL
Definition: types.h:112
VOID NTAPI ParaNdis5_CancelSendPackets(IN NDIS_HANDLE MiniportAdapterContext, IN PVOID CancelId)
void ParaNdis_DebugInitialize(PVOID DriverObject, PVOID RegistryPath)
#define NdisZeroMemory(Destination, Length)
Definition: ndis.h:3926
static VOID NTAPI ParaVirtualNICUnload(IN PDRIVER_OBJECT pDriverObject)
#define NdisMInitializeWrapper(NdisWrapperHandle, SystemSpecific1, SystemSpecific2, SystemSpecific3)
Definition: ndis.h:5592
NDIS_STATUS EXPORT NdisMRegisterMiniport(IN NDIS_HANDLE NdisWrapperHandle, IN PNDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics, IN UINT CharacteristicsLength)
Definition: miniport.c:2637
static SERVICE_STATUS status
Definition: service.c:31
#define NDIS_STATUS_FAILURE
Definition: ndis.h:465
VOID NTAPI ParaNdis5_SendPackets(IN NDIS_HANDLE MiniportAdapterContext, IN PPNDIS_PACKET PacketArray, IN UINT NumberOfPackets)
Definition: ps.c:97

◆ VideoPortAcquireDeviceLock()

VPAPI VOID NTAPI VideoPortAcquireDeviceLock ( IN PVOID  HwDeviceExtension)

Definition at line 1602 of file videoprt.c.

1604 {
1605  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1606 
1607  TRACE_(VIDEOPRT, "VideoPortAcquireDeviceLock\n");
1608  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1610  // ASSERT(Status == STATUS_SUCCESS);
1611 }
#define KeWaitForMutexObject
Definition: kefuncs.h:557
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
#define FALSE
Definition: types.h:117
#define TRACE_(x)
Definition: compat.h:76
#define NULL
Definition: types.h:112

◆ VideoPortAcquireSpinLock()

VPAPI VOID NTAPI VideoPortAcquireSpinLock ( IN PVOID  HwDeviceExtension,
IN PSPIN_LOCK  SpinLock,
OUT PUCHAR  OldIrql 
)

Definition at line 63 of file spinlock.c.

67 {
68  TRACE_(VIDEOPRT, "VideoPortAcquireSpinLock\n");
70 }
VOID NTAPI KeAcquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL OldIrql)
Definition: spinlock.c:50
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFSPINLOCK * SpinLock
Definition: wdfsync.h:225
#define TRACE_(x)
Definition: compat.h:76
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:792

◆ VideoPortAcquireSpinLockAtDpcLevel()

VPAPI VOID NTAPI VideoPortAcquireSpinLockAtDpcLevel ( IN PVOID  HwDeviceExtension,
IN PSPIN_LOCK  SpinLock 
)

Definition at line 77 of file spinlock.c.

80 {
81  TRACE_(VIDEOPRT, "VideoPortAcquireSpinLockAtDpcLevel\n");
83 }
VOID NTAPI KeAcquireSpinLockAtDpcLevel(IN PKSPIN_LOCK SpinLock)
Definition: spinlock.c:198
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFSPINLOCK * SpinLock
Definition: wdfsync.h:225
#define TRACE_(x)
Definition: compat.h:76

◆ VideoPortAllocateBuffer()

VPAPI VP_STATUS NTAPI VideoPortAllocateBuffer ( IN PVOID  HwDeviceExtension,
IN ULONG  Size,
OUT PVOID Buffer 
)

Definition at line 947 of file resource.c.

951 {
952  TRACE_(VIDEOPRT, "VideoPortAllocateBuffer\n");
955 }
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
#define NO_ERROR
Definition: dderror.h:5
#define TAG_VIDEO_PORT_BUFFER
Definition: videoprt.h:39
Definition: bufpool.h:45
#define TRACE_(x)
Definition: compat.h:76
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define NULL
Definition: types.h:112

◆ VideoPortAllocateCommonBuffer()

VPAPI PVOID NTAPI VideoPortAllocateCommonBuffer ( IN PVOID  HwDeviceExtension,
IN PVP_DMA_ADAPTER  VpDmaAdapter,
IN ULONG  DesiredLength,
OUT PPHYSICAL_ADDRESS  LogicalAddress,
IN BOOLEAN  CacheEnabled,
PVOID  Reserved 
)

Definition at line 43 of file dma.c.

49 {
50  PVIP_DMA_ADAPTER Adapter = (PVIP_DMA_ADAPTER)VpDmaAdapter;
51 
52  /* check for valid arguments */
53  if (!Adapter || !Adapter->Adapter)
54  {
55  /* invalid parameter */
56  return NULL;
57  }
58 
59  /* allocate common buffer */
60  return Adapter->Adapter->DmaOperations->AllocateCommonBuffer(Adapter->Adapter, DesiredLength, LogicalAddress, CacheEnabled);
61 }
struct _DMA_OPERATIONS * DmaOperations
Definition: iotypes.h:2295
struct VIP_DMA_ADAPTER * PVIP_DMA_ADAPTER
PDMA_ADAPTER Adapter
Definition: dma.c:19
#define NULL
Definition: types.h:112

Referenced by VideoPortGetCommonBuffer().

◆ VideoPortAllocateContiguousMemory()

VPAPI PVOID NTAPI VideoPortAllocateContiguousMemory ( IN PVOID  HwDeviceExtension,
IN ULONG  NumberOfBytes,
IN PHYSICAL_ADDRESS  HighestAcceptableAddress 
)

Definition at line 1646 of file videoprt.c.

1651 {
1653 }
_Out_ PNDIS_HANDLE _Out_ PUINT _In_ PNDIS_STRING _In_ NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress
Definition: ndis.h:3227
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1035
PVOID NTAPI MmAllocateContiguousMemory(IN SIZE_T NumberOfBytes, IN PHYSICAL_ADDRESS HighestAcceptableAddress)
Definition: contmem.c:626

◆ VideoPortAllocatePool()

VPAPI PVOID NTAPI VideoPortAllocatePool ( IN PVOID  HwDeviceExtension,
IN VP_POOL_TYPE  PoolType,
IN SIZE_T  NumberOfBytes,
IN ULONG  Tag 
)

Definition at line 920 of file resource.c.

925 {
926  TRACE_(VIDEOPRT, "VideoPortAllocatePool\n");
928 }
#define TRACE_(x)
Definition: compat.h:76
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4061
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1035
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3810

Referenced by InitializeModeTable(), VbeGetVideoMemoryBaseAddress(), VBEInitialize(), and VbeSetColorLookup().

◆ VideoPortAssociateEventsWithDmaHandle()

VPAPI PDMA NTAPI VideoPortAssociateEventsWithDmaHandle ( IN PVOID  HwDeviceExtension,
IN OUT PVIDEO_REQUEST_PACKET  pVrp,
IN PVOID  MappedUserEvent,
IN PVOID  DisplayDriverEvent 
)

Definition at line 439 of file dma.c.

443 {
444  /* Deprecated */
445  return NULL;
446 }
#define NULL
Definition: types.h:112

◆ VideoPortCheckForDeviceExistence()

VPAPI BOOLEAN NTAPI VideoPortCheckForDeviceExistence ( IN PVOID  HwDeviceExtension,
IN USHORT  VendorId,
IN USHORT  DeviceId,
IN UCHAR  RevisionId,
IN USHORT  SubVendorId,
IN USHORT  SubSystemId,
IN ULONG  Flags 
)

Definition at line 1510 of file videoprt.c.

1518 {
1519  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1522  IO_STACK_LOCATION IoStack;
1523  ULONG PciFlags = 0;
1524  NTSTATUS Status;
1525  BOOL DevicePresent;
1526 
1527  TRACE_(VIDEOPRT, "VideoPortCheckForDeviceExistence\n");
1528 
1530  {
1531  WARN_(VIDEOPRT, "VideoPortCheckForDeviceExistence: Unknown flags 0x%lx\n", Flags & ~(CDE_USE_REVISION | CDE_USE_SUBSYSTEM_IDS));
1532  return FALSE;
1533  }
1534 
1535  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1536 
1538  PciDevicePresentInterface.Version = 1;
1540  IoStack.Parameters.QueryInterface.Version = PciDevicePresentInterface.Version;
1542  IoStack.Parameters.QueryInterface.InterfaceType =
1543  &GUID_PCI_DEVICE_PRESENT_INTERFACE;
1544  Status = IopInitiatePnpIrp(DeviceExtension->NextDeviceObject,
1546  if (!NT_SUCCESS(Status))
1547  {
1548  WARN_(VIDEOPRT, "IopInitiatePnpIrp() failed! (Status 0x%lx)\n", Status);
1549  return FALSE;
1550  }
1551 
1552  if (Flags & CDE_USE_REVISION)
1553  PciFlags |= PCI_USE_REVISION;
1555  PciFlags |= PCI_USE_SUBSYSTEM_IDS;
1556 
1557  DevicePresent = PciDevicePresentInterface.IsDevicePresent(
1558  VendorId, DeviceId, RevisionId,
1559  SubVendorId, SubSystemId, PciFlags);
1560 
1561  PciDevicePresentInterface.InterfaceDereference(PciDevicePresentInterface.Context);
1562 
1563  return DevicePresent;
1564 }
LONG NTSTATUS
Definition: precomp.h:26
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
struct _PCI_DEVICE_PRESENT_INTERFACE PCI_DEVICE_PRESENT_INTERFACE
#define PCI_USE_REVISION
Definition: iotypes.h:867
#define FALSE
Definition: types.h:117
#define CDE_USE_REVISION
Definition: video.h:147
unsigned int BOOL
Definition: ntddk_ex.h:94
struct _INTERFACE * PINTERFACE
Status
Definition: gdiplustypes.h:24
#define TRACE_(x)
Definition: compat.h:76
#define CDE_USE_SUBSYSTEM_IDS
Definition: video.h:146
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define IRP_MN_QUERY_INTERFACE
PDEVICE_OBJECT NextDeviceObject
Definition: videoprt.h:89
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
unsigned int ULONG
Definition: retypes.h:1
PCI_INTERFACE PciDevicePresentInterface
Definition: devhere.c:18
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3128
NTSTATUS NTAPI IopInitiatePnpIrp(IN PDEVICE_OBJECT DeviceObject, IN PIO_STATUS_BLOCK IoStatusBlock, IN UCHAR MinorFunction, IN PIO_STACK_LOCATION Stack)
#define WARN_(ch,...)
Definition: debug.h:157
#define PCI_USE_SUBSYSTEM_IDS
Definition: iotypes.h:866

◆ VideoPortClearEvent()

VPAPI VOID NTAPI VideoPortClearEvent ( IN PVOID  HwDeviceExtension,
IN PEVENT  pEvent 
)

◆ VideoPortCompareMemory()

VPAPI ULONG NTAPI VideoPortCompareMemory ( IN PVOID  Source1,
IN PVOID  Source2,
IN SIZE_T  Length 
)

Referenced by VBEInitialize().

◆ VideoPortCompleteDma()

VPAPI VP_STATUS NTAPI VideoPortCompleteDma ( IN PVOID  HwDeviceExtension,
IN PVP_DMA_ADAPTER  VpDmaAdapter,
IN PVP_SCATTER_GATHER_LIST  VpScatterGather,
IN BOOLEAN  WriteToDevice 
)

Definition at line 453 of file dma.c.

457 {
458  KIRQL OldIrql;
459  PVIP_DMA_ADAPTER Adapter = (PVIP_DMA_ADAPTER)VpDmaAdapter;
460 
462  Adapter->Adapter->DmaOperations->PutScatterGatherList(Adapter->Adapter, (PSCATTER_GATHER_LIST)VpScatterGather, WriteToDevice);
464 
465  return NO_ERROR;
466 }
#define NO_ERROR
Definition: dderror.h:5
struct _DMA_OPERATIONS * DmaOperations
Definition: iotypes.h:2295
UCHAR KIRQL
Definition: env_spec_w32.h:591
struct VIP_DMA_ADAPTER * PVIP_DMA_ADAPTER
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:792
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID _In_ ULONG _In_ BOOLEAN WriteToDevice
Definition: cdrom.h:989
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
PDMA_ADAPTER Adapter
Definition: dma.c:19
VOID NTAPI KeRaiseIrql(KIRQL NewIrql, PKIRQL OldIrql)
Definition: spinlock.c:27
struct _SCATTER_GATHER_LIST * PSCATTER_GATHER_LIST
Definition: iotypes.h:2204
VOID NTAPI KeLowerIrql(KIRQL NewIrql)
Definition: spinlock.c:39

◆ VideoPortCreateEvent()

VPAPI VP_STATUS NTAPI VideoPortCreateEvent ( IN PVOID  HwDeviceExtension,
IN ULONG  EventFlag,
IN PVOID  Unused,
OUT PEVENT ppEvent 
)

Referenced by VmxFindAdapter().

◆ VideoPortCreateSecondaryDisplay()

VPAPI VP_STATUS NTAPI VideoPortCreateSecondaryDisplay ( IN PVOID  HwDeviceExtension,
IN OUT PVOID SecondaryDeviceExtension,
IN ULONG  ulFlag 
)

Definition at line 1389 of file videoprt.c.

1393 {
1395  PVIDEO_PORT_DEVICE_EXTENSION FirstDeviceExtension, DeviceExtension;
1396  NTSTATUS Status;
1397 
1398  ASSERT(SecondaryDeviceExtension);
1399 
1400  if (Flag != 0)
1401  {
1402  UNIMPLEMENTED;
1403  }
1404 
1405  FirstDeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1406 
1407  if (FirstDeviceExtension->DisplayNumber != 0)
1408  {
1409  DPRINT1("Calling VideoPortCreateSecondaryDisplay for InstanceId %lu\n",
1410  FirstDeviceExtension->DisplayNumber);
1411  }
1412 
1414  FirstDeviceExtension->DriverExtension,
1415  FirstDeviceExtension->PhysicalDeviceObject,
1416  FirstDeviceExtension->AdapterNumber,
1417  FirstDeviceExtension->NumberOfSecondaryDisplays + 1,
1418  &DeviceObject);
1419  if (!NT_SUCCESS(Status))
1420  {
1421  DPRINT1("IntVideoPortCreateAdapterDeviceObject() failed with status 0x%08x\n", Status);
1422  return ERROR_DEV_NOT_EXIST;
1423  }
1424 
1425  DeviceExtension = DeviceObject->DeviceExtension;
1426 
1427  /* Increment secondary display count */
1428  FirstDeviceExtension->NumberOfSecondaryDisplays++;
1429 
1430  *SecondaryDeviceExtension = DeviceExtension->MiniPortDeviceExtension;
1431  return NO_ERROR;
1432 }
VIDEO_PORT_DRIVER_EXTENSION * DriverExtension
Definition: videoprt.h:103
LONG NTSTATUS
Definition: precomp.h:26
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
#define NO_ERROR
Definition: dderror.h:5
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
PDEVICE_OBJECT PhysicalDeviceObject
Definition: videoprt.h:87
NTSTATUS NTAPI IntVideoPortCreateAdapterDeviceObject(_In_ PDRIVER_OBJECT DriverObject, _In_ PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, _In_opt_ PDEVICE_OBJECT PhysicalDeviceObject, _In_ USHORT AdapterNumber, _In_ USHORT DisplayNumber, _Out_opt_ PDEVICE_OBJECT *DeviceObject)
Definition: videoprt.c:159
Status
Definition: gdiplustypes.h:24
#define ASSERT(a)
Definition: mode.c:44
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Definition: xml2sdb.h:79
CHAR POINTER_ALIGNMENT MiniPortDeviceExtension[1]
Definition: videoprt.h:113
PDRIVER_OBJECT DriverObject
Definition: videoprt.h:86
#define DPRINT1
Definition: precomp.h:8
#define UNIMPLEMENTED
Definition: debug.h:115
#define ERROR_DEV_NOT_EXIST
Definition: dderror.h:8

◆ VideoPortCreateSpinLock()

VPAPI VP_STATUS NTAPI VideoPortCreateSpinLock ( IN PVOID  HwDeviceExtension,
OUT PSPIN_LOCK SpinLock 
)

Definition at line 32 of file spinlock.c.

35 {
36  TRACE_(VIDEOPRT, "VideoPortCreateSpinLock\n");
38  if (*SpinLock == NULL)
41  return NO_ERROR;
42 }
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
#define NO_ERROR
Definition: dderror.h:5
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFSPINLOCK * SpinLock
Definition: wdfsync.h:225
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:240
#define TRACE_(x)
Definition: compat.h:76
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
#define NULL
Definition: types.h:112

◆ VideoPortDbgReportComplete()

VPAPI VOID NTAPI VideoPortDbgReportComplete ( IN OUT PVIDEO_DEBUG_REPORT  pReport)

◆ VideoPortDbgReportCreate()

VPAPI PVIDEO_DEBUG_REPORT NTAPI VideoPortDbgReportCreate ( IN PVOID  HwDeviceExtension,
IN ULONG  ulCode,
IN ULONG_PTR  ulpArg1,
IN ULONG_PTR  ulpArg2,
IN ULONG_PTR  ulpArg3,
IN ULONG_PTR  ulpArg4 
)

◆ VideoPortDbgReportSecondaryData()

VPAPI BOOLEAN NTAPI VideoPortDbgReportSecondaryData ( IN OUT PVIDEO_DEBUG_REPORT  pReport,
IN PVOID  pvData,
IN ULONG  ulDataSize 
)

◆ VideoPortDDCMonitorHelper()

VPAPI BOOLEAN NTAPI VideoPortDDCMonitorHelper ( IN PVOID  HwDeviceExtension,
IN PVOID  DDCControl,
IN OUT PUCHAR  EdidBuffer,
IN ULONG  EdidBufferSize 
)

Referenced by VBEReadEdidUsingSCI().

◆ VideoPortDebugPrint()

VPAPI VOID __cdecl VideoPortDebugPrint ( IN VIDEO_DEBUG_LEVEL  DebugPrintLevel,
IN PSTR  DebugMessage,
IN ...   
)

◆ VideoPortDeleteEvent()

VPAPI VP_STATUS NTAPI VideoPortDeleteEvent ( IN PVOID  HwDeviceExtension,
IN PEVENT  pEvent 
)

◆ VideoPortDeleteSpinLock()

VPAPI VP_STATUS NTAPI VideoPortDeleteSpinLock ( IN PVOID  HwDeviceExtension,
IN PSPIN_LOCK  SpinLock 
)

Definition at line 49 of file spinlock.c.

52 {
53  TRACE_(VIDEOPRT, "VideoPortDeleteSpinLock\n");
55  return NO_ERROR;
56 }
#define NO_ERROR
Definition: dderror.h:5
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFSPINLOCK * SpinLock
Definition: wdfsync.h:225
#define TRACE_(x)
Definition: compat.h:76
#define ExFreePool(addr)
Definition: env_spec_w32.h:352

◆ VideoPortDisableInterrupt()

VPAPI VP_STATUS NTAPI VideoPortDisableInterrupt ( IN PVOID  HwDeviceExtension)

Definition at line 154 of file interrupt.c.

155 {
156 #ifndef _M_AMD64
157  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
158 
159  /* Get the device extension */
160  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
161 
162  /* Fail if the driver didn't register an ISR */
163  if (!DeviceExtension->DriverExtension->InitializationData.HwInterrupt)
164  {
165  /* No ISR, no interrupts */
166  return ERROR_INVALID_FUNCTION;
167  }
168 
169  /* Disable the interrupt and return */
170  HalDisableSystemInterrupt(DeviceExtension->InterruptVector, 0);
171  return NO_ERROR;
172 #else
173  /* FIXME: Function still present? If so what to use instead of HalDisableSystemInterrupt? */
175  return ERROR_INVALID_FUNCTION;
176 #endif
177 }
VIDEO_PORT_DRIVER_EXTENSION * DriverExtension
Definition: videoprt.h:103
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
VIDEO_HW_INITIALIZATION_DATA InitializationData
Definition: videoprt.h:72
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
#define NO_ERROR
Definition: dderror.h:5
VOID NTAPI HalDisableSystemInterrupt(IN ULONG Vector, IN KIRQL Irql)
Definition: pic.c:309
PVIDEO_HW_INTERRUPT HwInterrupt
Definition: video.h:668
#define UNIMPLEMENTED
Definition: debug.h:115

◆ VideoPortDoDma()

VPAPI PDMA NTAPI VideoPortDoDma ( IN PVOID  HwDeviceExtension,
IN PDMA  pDma,
IN DMA_FLAGS  DmaFlags 
)

Definition at line 426 of file dma.c.

429 {
430  /* Deprecated */
431  return NULL;
432 }
#define NULL
Definition: types.h:112

◆ VideoPortEnableInterrupt()

VPAPI VP_STATUS NTAPI VideoPortEnableInterrupt ( IN PVOID  HwDeviceExtension)

Definition at line 116 of file interrupt.c.

117 {
118 #ifndef _M_AMD64
119  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
120  BOOLEAN InterruptValid;
121 
122  /* Get the device extension */
123  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
124 
125  /* Fail if the driver didn't register an ISR */
126  if (!DeviceExtension->DriverExtension->InitializationData.HwInterrupt)
127  {
128  /* No ISR, no interrupts */
129  return ERROR_INVALID_FUNCTION;
130  }
131 
132  /* Re-enable the interrupt and return */
133  InterruptValid = HalEnableSystemInterrupt(DeviceExtension->InterruptVector,
134  0,
135  DeviceExtension->InterruptLevel);
136 
137  /* Make sure the interrupt was valid */
138  ASSERT(InterruptValid == TRUE);
139 
140  /* Return to caller */
141  return NO_ERROR;
142 #else
143  /* FIXME: Function still present? If so what to use instead of HalEnableSystemInterrupt? */
145  return ERROR_INVALID_FUNCTION;
146 #endif
147 }
BOOLEAN NTAPI HalEnableSystemInterrupt(IN ULONG Vector, IN KIRQL Irql, IN KINTERRUPT_MODE InterruptMode)
Definition: pic.c:295
VIDEO_PORT_DRIVER_EXTENSION * DriverExtension
Definition: videoprt.h:103
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define TRUE
Definition: types.h:120
VIDEO_HW_INITIALIZATION_DATA InitializationData
Definition: videoprt.h:72
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
#define NO_ERROR
Definition: dderror.h:5
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
PVIDEO_HW_INTERRUPT HwInterrupt
Definition: video.h:668
#define UNIMPLEMENTED
Definition: debug.h:115

◆ VideoPortEnumerateChildren()

VPAPI VP_STATUS NTAPI VideoPortEnumerateChildren ( IN PVOID  HwDeviceExtension,
IN PVOID  Reserved 
)

Definition at line 1366 of file videoprt.c.

1369 {
1370  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1371 
1372  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1373  ASSERT(DeviceExtension);
1374 
1375  if (DeviceExtension->PhysicalDeviceObject)
1376  {
1377  /* Trigger reenumeration by the PnP manager */
1379  }
1380 
1381  return NO_ERROR;
1382 }
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
#define NO_ERROR
Definition: dderror.h:5
PDEVICE_OBJECT PhysicalDeviceObject
Definition: videoprt.h:87
#define ASSERT(a)
Definition: mode.c:44
VOID NTAPI IoInvalidateDeviceRelations(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_RELATION_TYPE Type)
Definition: pnpmgr.c:2342

Referenced by IntVideoPortDispatchOpen(), and VBEInitialize().

◆ VideoPortFlushRegistry()

VPAPI VP_STATUS NTAPI VideoPortFlushRegistry ( PVOID  HwDeviceExtension)

Definition at line 29 of file stubs.c.

31 {
33  return 0;
34 }
#define UNIMPLEMENTED
Definition: stubs.c:20

◆ VideoPortFreeCommonBuffer()

VPAPI VOID NTAPI VideoPortFreeCommonBuffer ( IN PVOID  HwDeviceExtension,
IN ULONG  Length,
IN PVOID  VirtualAddress,
IN PHYSICAL_ADDRESS  LogicalAddress,
IN BOOLEAN  CacheEnabled 
)

Definition at line 187 of file dma.c.

192 {
193  PVIP_DMA_ADAPTER VpDmaAdapter;
194  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
195 
196  /* sanity check */
197  ASSERT(!IsListEmpty(&DeviceExtension->DmaAdapterList));
198 
199  /* grab first dma adapter */
200  VpDmaAdapter = (PVIP_DMA_ADAPTER)CONTAINING_RECORD(DeviceExtension->DmaAdapterList.Flink, VIP_DMA_ADAPTER, Entry);
201 
202  /* sanity checks */
203  ASSERT(VpDmaAdapter->HwDeviceExtension == HwDeviceExtension);
204  ASSERT(VpDmaAdapter->Adapter != NULL);
205  ASSERT(VpDmaAdapter->MapRegisters != 0);
206 
207  VideoPortReleaseCommonBuffer(HwDeviceExtension, (PVP_DMA_ADAPTER)VpDmaAdapter, Length, LogicalAddress, VirtualAddress, CacheEnabled);
208 }
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
PVOID HwDeviceExtension
Definition: dma.c:21
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define ASSERT(a)
Definition: mode.c:44
struct __VP_DMA_ADAPTER * PVP_DMA_ADAPTER
Definition: video.h:159
struct VIP_DMA_ADAPTER * PVIP_DMA_ADAPTER
ULONG MapRegisters
Definition: dma.c:20
VOID NTAPI VideoPortReleaseCommonBuffer(IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN ULONG Length, IN PHYSICAL_ADDRESS LogicalAddress, IN PVOID VirtualAddress, IN BOOLEAN CacheEnabled)
Definition: dma.c:68
PDMA_ADAPTER Adapter
Definition: dma.c:19
#define NULL
Definition: types.h:112
base of all file and directory entries
Definition: entries.h:82

◆ VideoPortFreeDeviceBase()

VPAPI VOID NTAPI VideoPortFreeDeviceBase ( IN PVOID  HwDeviceExtension,
IN PVOID  MappedAddress 
)

Definition at line 473 of file resource.c.

476 {
477  TRACE_(VIDEOPRT, "VideoPortFreeDeviceBase\n");
479  VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension),
480  MappedAddress);
481 }
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
#define TRACE_(x)
Definition: compat.h:76
VOID NTAPI IntVideoPortUnmapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, IN PVOID MappedAddress)
Definition: resource.c:400

Referenced by InitializeModeTable().

◆ VideoPortFreePool()

VPAPI VOID NTAPI VideoPortFreePool ( IN PVOID  HwDeviceExtension,
IN PVOID  Ptr 
)

Definition at line 935 of file resource.c.

938 {
939  ExFreePool(Ptr);
940 }
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
#define ExFreePool(addr)
Definition: env_spec_w32.h:352

Referenced by InitializeModeTable(), VbeGetVideoMemoryBaseAddress(), and VbeSetColorLookup().

◆ VideoPortGetAccessRanges()

VPAPI VP_STATUS NTAPI VideoPortGetAccessRanges ( IN PVOID  HwDeviceExtension,
IN ULONG  NumRequestedResources,
IN PIO_RESOURCE_DESCRIPTOR RequestedResources  OPTIONAL,
IN ULONG  NumAccessRanges,
OUT PVIDEO_ACCESS_RANGE  AccessRanges,
IN PVOID  VendorId,
IN PVOID  DeviceId,
OUT PULONG  Slot 
)

Referenced by XboxVmpFindAdapter().

◆ VideoPortGetAssociatedDeviceExtension()

VPAPI PVOID NTAPI VideoPortGetAssociatedDeviceExtension ( IN PVOID  DeviceObject)

Definition at line 1455 of file videoprt.c.

1457 {
1458  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1459 
1460  TRACE_(VIDEOPRT, "VideoPortGetAssociatedDeviceExtension\n");
1461  DeviceExtension = ((PDEVICE_OBJECT)DeviceObject)->DeviceExtension;
1462  if (!DeviceExtension)
1463  return NULL;
1464  return DeviceExtension->MiniPortDeviceExtension;
1465 }
struct _DEVICE_OBJECT * PDEVICE_OBJECT
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
#define TRACE_(x)
Definition: compat.h:76
CHAR POINTER_ALIGNMENT MiniPortDeviceExtension[1]
Definition: videoprt.h:113
#define NULL
Definition: types.h:112

◆ VideoPortGetAssociatedDeviceID()

VPAPI ULONG NTAPI VideoPortGetAssociatedDeviceID ( IN PVOID  DeviceObject)

Definition at line 38 of file stubs.c.

40 {
42  return 0;
43 }
#define UNIMPLEMENTED
Definition: stubs.c:20

◆ VideoPortGetBusData()

VPAPI ULONG NTAPI VideoPortGetBusData ( IN PVOID  HwDeviceExtension,
IN BUS_DATA_TYPE  BusDataType,
IN ULONG  SlotNumber,
IN OUT PVOID  Buffer,
IN ULONG  Offset,
IN ULONG  Length 
)

◆ VideoPortGetBytesUsed()

VPAPI ULONG NTAPI VideoPortGetBytesUsed ( IN PVOID  HwDeviceExtension,
IN PDMA  pDma 
)

Definition at line 48 of file stubs.c.

51 {
53  return 0;
54 }
#define UNIMPLEMENTED
Definition: stubs.c:20

◆ VideoPortGetCommonBuffer()

VPAPI PVOID NTAPI VideoPortGetCommonBuffer ( IN PVOID  HwDeviceExtension,
IN ULONG  DesiredLength,
IN ULONG  Alignment,
OUT PPHYSICAL_ADDRESS  LogicalAddress,
OUT PULONG  pActualLength,
IN BOOLEAN  CacheEnabled 
)

Definition at line 215 of file dma.c.

221 {
222  PVOID Result;
223  PVIP_DMA_ADAPTER VpDmaAdapter;
224  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
225 
226  /* maximum palette size */
227  if (DesiredLength > 262144)
228  {
229  /* size exceeded */
230  return NULL;
231  }
232 
233  if (IsListEmpty(&DeviceExtension->DmaAdapterList))
234  {
235  /* no adapter available */
236  return NULL;
237  }
238 
239  /* grab first dma adapter */
240  VpDmaAdapter = (PVIP_DMA_ADAPTER)CONTAINING_RECORD(DeviceExtension->DmaAdapterList.Flink, VIP_DMA_ADAPTER, Entry);
241 
242  /* sanity checks */
243  ASSERT(VpDmaAdapter->HwDeviceExtension == HwDeviceExtension);
244  ASSERT(VpDmaAdapter->Adapter != NULL);
245  ASSERT(VpDmaAdapter->MapRegisters != 0);
246 
247  /* allocate common buffer */
248  Result = VideoPortAllocateCommonBuffer(HwDeviceExtension, (PVP_DMA_ADAPTER)VpDmaAdapter, DesiredLength, LogicalAddress, CacheEnabled, NULL);
249 
250  if (Result)
251  {
252  /* store length */
253  *pActualLength = DesiredLength;
254  }
255  else
256  {
257  /* failed to allocate common buffer */
258  *pActualLength = 0;
259  }
260 
261  return Result;
262 }
PVOID HwDeviceExtension
Definition: dma.c:21
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
_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
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
PVOID NTAPI VideoPortAllocateCommonBuffer(IN PVOID HwDeviceExtension, IN PVP_DMA_ADAPTER VpDmaAdapter, IN ULONG DesiredLength, OUT PPHYSICAL_ADDRESS LogicalAddress, IN BOOLEAN CacheEnabled, PVOID Reserved)
Definition: dma.c:43
#define ASSERT(a)
Definition: mode.c:44
struct __VP_DMA_ADAPTER * PVP_DMA_ADAPTER
Definition: video.h:159
struct VIP_DMA_ADAPTER * PVIP_DMA_ADAPTER
ULONG MapRegisters
Definition: dma.c:20
PDMA_ADAPTER Adapter
Definition: dma.c:19
#define NULL
Definition: types.h:112
base of all file and directory entries
Definition: entries.h:82

◆ VideoPortGetCurrentIrql()

VPAPI UCHAR NTAPI VideoPortGetCurrentIrql ( VOID  )

Definition at line 911 of file videoprt.c.

912 {
913  return KeGetCurrentIrql();
914 }
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706

◆ VideoPortGetDeviceBase()

VPAPI PVOID NTAPI VideoPortGetDeviceBase ( IN PVOID  HwDeviceExtension,
IN PHYSICAL_ADDRESS  IoAddress,
IN ULONG  NumberOfUchars,
IN UCHAR  InIoSpace 
)

Definition at line 452 of file resource.c.

457 {
458  TRACE_(VIDEOPRT, "VideoPortGetDeviceBase\n");
459  return IntVideoPortMapMemory(
460  VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension),
461  IoAddress,
462  NumberOfUchars,
463  InIoSpace,
464  NULL,
465  NULL);
466 }
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
#define TRACE_(x)
Definition: compat.h:76
#define NULL
Definition: types.h:112
PVOID NTAPI IntVideoPortMapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, IN PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfUchars, IN ULONG InIoSpace, IN HANDLE ProcessHandle, OUT VP_STATUS *Status)
Definition: resource.c:245

Referenced by InitializeModeTable(), and VgaFindAdapter().

◆ VideoPortGetDeviceData()

VPAPI VP_STATUS NTAPI VideoPortGetDeviceData ( IN PVOID  HwDeviceExtension,
IN VIDEO_DEVICE_DATA_TYPE  DeviceDataType,
IN PMINIPORT_QUERY_DEVICE_ROUTINE  CallbackRoutine,
IN PVOID  Context 
)

Definition at line 904 of file resource.c.

909 {
910  TRACE_(VIDEOPRT, "VideoPortGetDeviceData\n");
912  return ERROR_INVALID_FUNCTION;
913 }
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define TRACE_(x)
Definition: compat.h:76
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by VgaFindAdapter().

◆ VideoPortGetDmaAdapter()

VPAPI PVP_DMA_ADAPTER NTAPI VideoPortGetDmaAdapter ( IN PVOID  HwDeviceExtension,
IN PVP_DEVICE_DESCRIPTION  VpDeviceDescription 
)

Definition at line 120 of file dma.c.

122 {
124  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
126  PVIP_DMA_ADAPTER Adapter;
127  PDMA_ADAPTER DmaAdapter;
128 
129  /* allocate private adapter structure */
130  Adapter = ExAllocatePool(NonPagedPool, sizeof(VIP_DMA_ADAPTER));
131  if (!Adapter)
132  {
133  /* failed to allocate adapter structure */
134  return NULL;
135  }
136 
137  /* Zero the structure */
139  sizeof(DEVICE_DESCRIPTION));
140 
141  /* Initialize the structure */
143  DeviceDescription.Master = TRUE;
144  DeviceDescription.DmaWidth = Width8Bits;
145  DeviceDescription.DmaSpeed = Compatible;
146 
147  /* Copy data from caller's device extension */
148  DeviceDescription.ScatterGather = VpDeviceExtension->ScatterGather;
149  DeviceDescription.Dma32BitAddresses = VpDeviceExtension->Dma32BitAddresses;
150  DeviceDescription.Dma64BitAddresses = VpDeviceExtension->Dma64BitAddresses;
151  DeviceDescription.MaximumLength = VpDeviceExtension->MaximumLength;
152 
153  /* Copy data from the internal device extension */
154  DeviceDescription.BusNumber = DeviceExtension->SystemIoBusNumber;
155  DeviceDescription.InterfaceType = DeviceExtension->AdapterInterfaceType;
156 
157  /* acquire dma adapter */
159  if (!DmaAdapter)
160  {
161  /* failed to acquire dma */
162  ExFreePool(Adapter);
163  return NULL;
164  }
165 
166  /* store dma adapter */
167  Adapter->Adapter = DmaAdapter;
168 
169  /* store map register count */
171 
172  /* store hw device extension */
173  Adapter->HwDeviceExtension = HwDeviceExtension;
174 
175  /* store in dma adapter list */
176  InsertTailList(&DeviceExtension->DmaAdapterList, &Adapter->Entry);
177 
178  /* return result */
179  return (PVP_DMA_ADAPTER)Adapter;
180 }
_Out_ PULONG NumberOfMapRegisters
Definition: halfuncs.h:209
PDMA_ADAPTER NTAPI IoGetDmaAdapter(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PDEVICE_DESCRIPTION DeviceDescription, IN OUT PULONG NumberOfMapRegisters)
Definition: pnpdma.c:23
#define TRUE
Definition: types.h:120
PVOID HwDeviceExtension
Definition: dma.c:21
LIST_ENTRY Entry
Definition: dma.c:18
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
#define InsertTailList(ListHead, Entry)
#define DEVICE_DESCRIPTION_VERSION
Definition: iotypes.h:2063
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceDescription
Definition: wdfpdo.h:430
PDEVICE_OBJECT PhysicalDeviceObject
Definition: videoprt.h:87
struct __VP_DMA_ADAPTER * PVP_DMA_ADAPTER
Definition: video.h:159
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
ULONG MapRegisters
Definition: dma.c:20
PDMA_ADAPTER Adapter
Definition: dma.c:19
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
INTERFACE_TYPE AdapterInterfaceType
Definition: videoprt.h:98
#define ExFreePool(addr)
Definition: env_spec_w32.h:352

◆ VideoPortGetDmaContext()

VPAPI PVOID NTAPI VideoPortGetDmaContext ( IN PVOID  HwDeviceExtension,
IN PDMA  pDma 
)

Definition at line 414 of file dma.c.

416 {
417  /* Deprecated */
418  return NULL;
419 }
#define NULL
Definition: types.h:112

◆ VideoPortGetMdl()

VPAPI PVOID NTAPI VideoPortGetMdl ( IN PVOID  HwDeviceExtension,
IN PDMA  pDma 
)

Definition at line 58 of file stubs.c.

61 {
63  return 0;
64 }
#define UNIMPLEMENTED
Definition: stubs.c:20

◆ VideoPortGetRegistryParameters()

VPAPI VP_STATUS NTAPI VideoPortGetRegistryParameters ( IN PVOID  HwDeviceExtension,
IN PWSTR  ParameterName,
IN UCHAR  IsParameterFileName,
IN PMINIPORT_GET_REGISTRY_ROUTINE  CallbackRoutine,
IN PVOID  Context 
)

Definition at line 952 of file videoprt.c.

958 {
961  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
963 
964  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
965 
966  TRACE_(VIDEOPRT, "VideoPortGetRegistryParameters ParameterName %S, RegPath: %wZ\n",
967  ParameterName, &DeviceExtension->RegistryPath);
968 
969  Context.HwDeviceExtension = HwDeviceExtension;
970  Context.HwContext = HwContext;
971  Context.HwGetRegistryRoutine = GetRegistryRoutine;
972 
976 
978  DeviceExtension->RegistryPath.Buffer,
979  QueryTable,
980  &Context,
981  NULL);
982  if (!NT_SUCCESS(Status))
983  {
984  WARN_(VIDEOPRT, "VideoPortGetRegistryParameters could not find the "
985  "requested parameter\n");
987  }
988 
989  if (IsParameterFileName)
990  {
991  /* FIXME: need to read the contents of the file */
993  }
994 
995  return NO_ERROR;
996 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
Definition: rtlfuncs.h:4182
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:897
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
#define NO_ERROR
Definition: dderror.h:5
PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine
Definition: nt_native.h:109
static NTSTATUS NTAPI QueryRegistryCallback(IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
Definition: videoprt.c:926
Status
Definition: gdiplustypes.h:24
#define TRACE_(x)
Definition: compat.h:76
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_In_opt_ PWSTR _In_ PWSTR ParameterName
Definition: cdrom.h:960
#define RTL_REGISTRY_ABSOLUTE
Definition: nt_native.h:161
#define NULL
Definition: types.h:112
struct tagContext Context
Definition: acpixf.h:1034
#define UNIMPLEMENTED
Definition: debug.h:115
UNICODE_STRING RegistryPath
Definition: videoprt.h:90
#define RTL_QUERY_REGISTRY_REQUIRED
Definition: nt_native.h:132
#define WARN_(ch,...)
Definition: debug.h:157

◆ VideoPortGetRomImage()

VPAPI PVOID NTAPI VideoPortGetRomImage ( IN PVOID  HwDeviceExtension,
IN PVOID  Unused1,
IN ULONG  Unused2,
IN ULONG  Length 
)

Definition at line 1062 of file videoprt.c.

1067 {
1068  static PVOID RomImageBuffer = NULL;
1069  PKPROCESS CallingProcess;
1071 
1072  TRACE_(VIDEOPRT, "VideoPortGetRomImage(HwDeviceExtension 0x%X Length 0x%X)\n",
1073  HwDeviceExtension, Length);
1074 
1075  /* If the length is zero then free the existing buffer. */
1076  if (Length == 0)
1077  {
1078  if (RomImageBuffer != NULL)
1079  {
1080  ExFreePool(RomImageBuffer);
1081  RomImageBuffer = NULL;
1082  }
1083  return NULL;
1084  }
1085  else
1086  {
1087  /*
1088  * The DDK says we shouldn't use the legacy C0000 method but get the
1089  * rom base address from the corresponding pci or acpi register but
1090  * lets ignore that and use C0000 anyway. We have already mapped the
1091  * bios area into memory so we'll copy from there.
1092  */
1093 
1094  /* Copy the bios. */
1095  Length = min(Length, 0x10000);
1096  if (RomImageBuffer != NULL)
1097  {
1098  ExFreePool(RomImageBuffer);
1099  }
1100 
1101  RomImageBuffer = ExAllocatePool(PagedPool, Length);
1102  if (RomImageBuffer == NULL)
1103  {
1104  return NULL;
1105  }
1106 
1107  IntAttachToCSRSS(&CallingProcess, &ApcState);
1108  RtlCopyMemory(RomImageBuffer, (PUCHAR)0xC0000, Length);
1109  IntDetachFromCSRSS(&CallingProcess, &ApcState);
1110 
1111  return RomImageBuffer;
1112  }
1113 }
KAPC_STATE
Definition: ketypes.h:1285
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
unsigned char * PUCHAR
Definition: retypes.h:3
#define TRACE_(x)
Definition: compat.h:76
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
VOID FASTCALL IntAttachToCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:497
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1727
#define min(a, b)
Definition: monoChain.cc:55
#define NULL
Definition: types.h:112
VOID FASTCALL IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:510
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define ExFreePool(addr)
Definition: env_spec_w32.h:352

◆ VideoPortGetVersion()

VPAPI VP_STATUS NTAPI VideoPortGetVersion ( IN PVOID  HwDeviceExtension,
IN OUT PVPOSVERSIONINFO  pVpOsVersionInfo 
)

Definition at line 1472 of file videoprt.c.

1475 {
1477 
1478  Version.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOEXW);
1479  if (VpOsVersionInfo->Size >= sizeof(VPOSVERSIONINFO))
1480  {
1481 #if 1
1483  {
1484  VpOsVersionInfo->MajorVersion = Version.dwMajorVersion;
1485  VpOsVersionInfo->MinorVersion = Version.dwMinorVersion;
1486  VpOsVersionInfo->BuildNumber = Version.dwBuildNumber;
1487  VpOsVersionInfo->ServicePackMajor = Version.wServicePackMajor;
1488  VpOsVersionInfo->ServicePackMinor = Version.wServicePackMinor;
1489  return NO_ERROR;
1490  }
1491  return ERROR_INVALID_PARAMETER;
1492 #else
1493  VpOsVersionInfo->MajorVersion = 5;
1494  VpOsVersionInfo->MinorVersion = 0;
1495  VpOsVersionInfo->BuildNumber = 2195;
1496  VpOsVersionInfo->ServicePackMajor = 4;
1497  VpOsVersionInfo->ServicePackMinor = 0;
1498  return NO_ERROR;
1499 #endif
1500  }
1501 
1502  return ERROR_INVALID_PARAMETER;
1503 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
NTSTATUS NTAPI RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation)
Definition: version.c:158
#define NO_ERROR
Definition: dderror.h:5
struct _OSVERSIONINFOEXW RTL_OSVERSIONINFOEXW
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:361

◆ VideoPortGetVgaStatus()

VPAPI VP_STATUS NTAPI VideoPortGetVgaStatus ( IN PVOID  HwDeviceExtension,
OUT PULONG  VgaStatus 
)

Definition at line 1034 of file videoprt.c.

1037 {
1038  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1039 
1040  TRACE_(VIDEOPRT, "VideoPortGetVgaStatus\n");
1041 
1042  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1044  {
1045  if (DeviceExtension->AdapterInterfaceType == PCIBus)
1046  {
1047  /* VgaStatus: 0 == VGA not enabled, 1 == VGA enabled. */
1048  /* Assumed for now */
1049  *VgaStatus = 1;
1050  return NO_ERROR;
1051  }
1052  }
1053 
1054  return ERROR_INVALID_FUNCTION;
1055 }
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
#define NO_ERROR
Definition: dderror.h:5
#define TRACE_(x)
Definition: compat.h:76
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
INTERFACE_TYPE AdapterInterfaceType
Definition: videoprt.h:98

◆ VideoPortInitialize()

VPAPI ULONG NTAPI VideoPortInitialize ( IN PVOID  Argument1,
IN PVOID  Argument2,
IN PVIDEO_HW_INITIALIZATION_DATA  HwInitializationData,
IN PVOID  HwContext 
)

Definition at line 662 of file videoprt.c.

667 {
672  BOOLEAN PnpDriver = FALSE, LegacyDetection = FALSE;
673  static BOOLEAN FirstInitialization;
674 
675  TRACE_(VIDEOPRT, "VideoPortInitialize\n");
676 
677  if (!FirstInitialization)
678  {
679  FirstInitialization = TRUE;
683  }
684 
685  /* As a first thing do parameter checks. */
686  if (HwInitializationData->HwInitDataSize > sizeof(VIDEO_HW_INITIALIZATION_DATA))
687  {
688  ERR_(VIDEOPRT, "Invalid HwInitializationData\n");
690  }
691 
692  if ((HwInitializationData->HwFindAdapter == NULL) ||
693  (HwInitializationData->HwInitialize == NULL) ||
694  (HwInitializationData->HwStartIO == NULL))
695  {
696  ERR_(VIDEOPRT, "Invalid HwInitializationData\n");
698  }
699 
700  switch (HwInitializationData->HwInitDataSize)
701  {
702  /*
703  * NT4 drivers are special case, because we must use legacy method
704  * of detection instead of the Plug & Play one.
705  */
707  INFO_(VIDEOPRT, "We were loaded by a Windows NT miniport driver.\n");
708  break;
709 
711  INFO_(VIDEOPRT, "We were loaded by a Windows 2000 miniport driver.\n");
712  break;
713 
714  case sizeof(VIDEO_HW_INITIALIZATION_DATA):
715  INFO_(VIDEOPRT, "We were loaded by a Windows XP or later miniport driver.\n");
716  break;
717 
718  default:
719  ERR_(VIDEOPRT, "Invalid HwInitializationData size.\n");
720  return STATUS_UNSUCCESSFUL;
721  }
722 
723  /* Set dispatching routines */
726  DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
728  DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] =
730  DriverObject->DriverUnload = IntVideoPortUnload;
731 
732  /* Determine type of the miniport driver */
733  if ((HwInitializationData->HwInitDataSize >=
734  FIELD_OFFSET(VIDEO_HW_INITIALIZATION_DATA, HwQueryInterface)) &&
735  (HwInitializationData->HwSetPowerState != NULL) &&
736  (HwInitializationData->HwGetPowerState != NULL) &&
737  (HwInitializationData->HwGetVideoChildDescriptor != NULL))
738  {
739  INFO_(VIDEOPRT, "The miniport is a PnP miniport driver\n");
740  PnpDriver = TRUE;
741  }
742 
743  /* Check if legacy detection should be applied */
744  if (!PnpDriver || HwContext)
745  {
746  INFO_(VIDEOPRT, "Legacy detection for adapter interface %d\n",
747  HwInitializationData->AdapterInterfaceType);
748 
749  /* FIXME: Move the code for legacy detection
750  to another function and call it here */
751  LegacyDetection = TRUE;
752  }
753 
754  /*
755  * NOTE:
756  * The driver extension can be already allocated in case that we were
757  * called by legacy driver and failed detecting device. Some miniport
758  * drivers in that case adjust parameters and call VideoPortInitialize
759  * again.
760  */
762  if (DriverExtension == NULL)
763  {
765  DriverObject,
767  (PVOID *)&DriverExtension);
768  if (!NT_SUCCESS(Status))
769  {
770  ERR_(VIDEOPRT, "IoAllocateDriverObjectExtension failed 0x%x\n", Status);
771  return Status;
772  }
773 
774  /*
775  * Save the registry path. This should be done only once even if
776  * VideoPortInitialize is called multiple times.
777  */
778  if (RegistryPath->Length != 0)
779  {
780  DriverExtension->RegistryPath.Length = 0;
781  DriverExtension->RegistryPath.MaximumLength =
782  RegistryPath->Length + sizeof(UNICODE_NULL);
783  DriverExtension->RegistryPath.Buffer =
785  PagedPool,
786  DriverExtension->RegistryPath.MaximumLength,
787  'RTSU');
788  if (DriverExtension->RegistryPath.Buffer == NULL)
789  {
790  RtlInitUnicodeString(&DriverExtension->RegistryPath, NULL);
792  }
793 
795 
796  /* There is a bug in Spice guest agent, which searches 'System' case-sensitively.
797  * Replace 'SYSTEM' by 'System' to fix that.
798  * Probably for similar reason, Windows also replaces 'MACHINE' by 'Machine'.
799  */
800  wcsncpy(wcsstr(DriverExtension->RegistryPath.Buffer, L"\\SYSTEM\\"), L"\\System\\", ARRAYSIZE(L"\\SYSTEM\\") - 1);
801  wcsncpy(wcsstr(DriverExtension->RegistryPath.Buffer, L"\\MACHINE\\"), L"\\Machine\\", ARRAYSIZE(L"\\MACHINE\\") - 1);
802 
803  INFO_(VIDEOPRT, "RegistryPath: %wZ\n", &DriverExtension->RegistryPath);
804  }
805  else
806  {
807  RtlInitUnicodeString(&DriverExtension->RegistryPath, NULL);
808  }
809  }
810 
811  /* Copy the correct miniport initialization data to the device extension. */
812  RtlCopyMemory(&DriverExtension->InitializationData,
814  HwInitializationData->HwInitDataSize);
815  if (HwInitializationData->HwInitDataSize <
817  {
818  RtlZeroMemory((PVOID)((ULONG_PTR)&DriverExtension->InitializationData +
819  HwInitializationData->HwInitDataSize),
821  HwInitializationData->HwInitDataSize);
822  }
823  DriverExtension->HwContext = HwContext;
824 
825  /*
826  * Plug & Play drivers registers the device in AddDevice routine.
827  * For legacy drivers we must do it now.
828  */
829  if (LegacyDetection)
830  {
832 
834  {
835  /* Power management */
837  }
838 
841  NULL,
842  DriverExtension->InitializationData.StartingDeviceNumber,
843  0,
844  &DeviceObject);
845  if (!NT_SUCCESS(Status))
846  {
847  ERR_(VIDEOPRT, "IntVideoPortCreateAdapterDeviceObject returned 0x%x\n", Status);
848  return Status;
849  }
850 
852  if (!NT_SUCCESS(Status))
853  ERR_(VIDEOPRT, "IntVideoPortFindAdapter returned 0x%x\n", Status);
854 
855  return Status;
856  }
857  else
858  {
859  DriverObject->DriverExtension->AddDevice = IntVideoPortAddDevice;
863 
864  return STATUS_SUCCESS;
865  }
866 }
VOID FASTCALL IntLoadRegistryParameters(VOID)
Definition: videoprt.c:522
NTSTATUS NTAPI IntVideoPortFindAdapter(IN PDRIVER_OBJECT DriverObject, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PDEVICE_OBJECT DeviceObject)
Definition: videoprt.c:348
#define STATUS_REVISION_MISMATCH
Definition: ntstatus.h:325
NTSTATUS NTAPI IntVideoPortDispatchPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:1141
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define INFO_(ch,...)
Definition: debug.h:159
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
Definition: driver.c:1797
#define IRP_MJ_SHUTDOWN
#define TRUE
Definition: types.h:120
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
#define ERR_(ch,...)
Definition: debug.h:156
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:897
KMUTEX VideoPortInt10Mutex
Definition: videoprt.c:42
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
NTSTATUS NTAPI IntVideoPortDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:723
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
uint32_t ULONG_PTR
Definition: typedefs.h:65
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
#define UNICODE_NULL
VOID NTAPI IntVideoPortUnload(PDRIVER_OBJECT DriverObject)
Definition: dispatch.c:1197
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:240
unsigned char BOOLEAN
struct _VIDEO_HW_INITIALIZATION_DATA VIDEO_HW_INITIALIZATION_DATA
KSPIN_LOCK HwResetAdaptersLock
Definition: videoprt.c:43
NTSTATUS NTAPI IntVideoPortDispatchClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:436
NTSTATUS NTAPI IntVideoPortCreateAdapterDeviceObject(_In_ PDRIVER_OBJECT DriverObject, _In_ PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, _In_opt_ PDEVICE_OBJECT PhysicalDeviceObject, _In_ USHORT AdapterNumber, _In_ USHORT DisplayNumber, _Out_opt_ PDEVICE_OBJECT *DeviceObject)
Definition: videoprt.c:159
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
Status
Definition: gdiplustypes.h:24
#define TRACE_(x)
Definition: compat.h:76
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA
Definition: video.h:119
NTSTATUS NTAPI IntVideoPortDispatchSystemControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:1175
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
VOID NTAPI KeInitializeMutex(IN PKMUTEX Mutex, IN ULONG Level)
Definition: mutex.c:67
#define IRP_MJ_POWER
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
NTSTATUS NTAPI IntVideoPortAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject)
Definition: dispatch.c:334
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
Definition: driver.c:1875
#define IRP_MJ_SYSTEM_CONTROL
_In_ PNET_PNP_EVENT _In_ PTDI_PNP_CONTEXT _In_ PTDI_PNP_CONTEXT Context2
Definition: tdikrnl.h:1094
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
_In_ PNET_PNP_EVENT _In_ PTDI_PNP_CONTEXT Context1
Definition: tdikrnl.h:1094
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define NULL
Definition: types.h:112
NTSTATUS NTAPI IntVideoPortDispatchPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:1109
NTSTATUS NTAPI IntVideoPortDispatchOpen(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: dispatch.c:369
PPCI_DRIVER_EXTENSION DriverExtension
Definition: pci.c:31
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define STATUS_SUCCESS
Definition: shellext.h:65
#define SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA
Definition: video.h:120
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA * HwInitializationData
Definition: srb.h:897
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52

Referenced by DriverEntry().

◆ VideoPortInt10()

VPAPI VP_STATUS NTAPI VideoPortInt10 ( IN PVOID  HwDeviceExtension,
IN PVIDEO_X86_BIOS_ARGUMENTS  BiosArguments 
)

Definition at line 457 of file int10.c.

460 {
461  INT10_BIOS_ARGUMENTS Int10BiosArguments;
463 
464  if (!CsrProcess)
465  {
467  }
468 
469  /* Copy arguments to other format */
470  RtlCopyMemory(&Int10BiosArguments, BiosArguments, sizeof(*BiosArguments));
471  Int10BiosArguments.SegDs = 0;
472  Int10BiosArguments.SegEs = 0;
473 
474  /* Do the BIOS call */
475  Status = IntInt10CallBios(NULL, &Int10BiosArguments);
476 
477  /* Copy results back */
478  RtlCopyMemory(BiosArguments, &Int10BiosArguments, sizeof(*BiosArguments));
479 
480  return Status;
481 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
PKPROCESS CsrProcess
Definition: videoprt.c:39
VP_STATUS NTAPI IntInt10CallBios(IN PVOID Context, IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)
Definition: int10.c:380
Status
Definition: gdiplustypes.h:24
#define NULL
Definition: types.h:112
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
LONG VP_STATUS
Definition: video.h:153

Referenced by VbeSetMode().

◆ VideoPortInterlockedDecrement()

VPAPI LONG FASTCALL VideoPortInterlockedDecrement ( IN PLONG  Addend)

Definition at line 100 of file stubs.c.

102 {
104 }
IN OUT PLONG Addend
Definition: CrNtStubs.h:22
long __cdecl _InterlockedDecrement(_Interlocked_operand_ long volatile *_Addend)

◆ VideoPortInterlockedExchange()

VPAPI LONG FASTCALL VideoPortInterlockedExchange ( IN OUT PLONG  Target,
IN LONG  Value 
)

Definition at line 116 of file stubs.c.

119 {
121 }
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
#define InterlockedExchange
Definition: armddk.h:54
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306

◆ VideoPortInterlockedIncrement()

VPAPI LONG FASTCALL VideoPortInterlockedIncrement ( IN PLONG  Addend)

Definition at line 108 of file stubs.c.

110 {
112 }
IN OUT PLONG Addend
Definition: CrNtStubs.h:22
long __cdecl _InterlockedIncrement(_Interlocked_operand_ long volatile *_Addend)

◆ VideoPortIsNoVesa()

VPAPI BOOLEAN NTAPI VideoPortIsNoVesa ( VOID  )

Definition at line 1660 of file videoprt.c.

1661 {
1662  return VpNoVesa;
1663 }
BOOLEAN VpNoVesa
Definition: videoprt.c:37

Referenced by InitializeModeTable(), VBEFindAdapter(), and VBEInitialize().

◆ VideoPortLockBuffer()

VPAPI PVOID NTAPI VideoPortLockBuffer ( IN PVOID  HwDeviceExtension,
IN PVOID  BaseAddress,
IN ULONG  Length,
IN VP_LOCK_OPERATION  Operation 
)

Definition at line 975 of file resource.c.

980 {
981  PMDL Mdl;
982 
984  if (!Mdl)
985  {
986  return NULL;
987  }
988  /* FIXME use seh */
990  return Mdl;
991 }
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define FALSE
Definition: types.h:117
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
FP_OP Operation
Definition: fpcontrol.c:150
PMDL NTAPI IoAllocateMdl(IN PVOID VirtualAddress, IN ULONG Length, IN BOOLEAN SecondaryBuffer, IN BOOLEAN ChargeQuota, IN PIRP Irp)
Definition: iomdl.c:22
VOID NTAPI MmProbeAndLockPages(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN LOCK_OPERATION Operation)
Definition: mdlsup.c:931
#define NULL
Definition: types.h:112
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl

Referenced by VideoPortLockPages().

◆ VideoPortLockPages()

VPAPI BOOLEAN NTAPI VideoPortLockPages ( IN PVOID  HwDeviceExtension,
IN OUT PVIDEO_REQUEST_PACKET  pVrp,
IN OUT PEVENT  pUEvent,
IN PEVENT  pDisplayEvent,
IN DMA_FLAGS  DmaFlags 
)

◆ VideoPortLogError()

VPAPI VOID NTAPI VideoPortLogError ( IN PVOID  HwDeviceExtension,
IN PVIDEO_REQUEST_PACKET Vrp  OPTIONAL,
IN VP_STATUS  ErrorCode,
IN ULONG  UniqueId 
)

Definition at line 892 of file videoprt.c.

897 {
899 
900  INFO_(VIDEOPRT, "VideoPortLogError ErrorCode %d (0x%x) UniqueId %lu (0x%lx)\n",
901  ErrorCode, ErrorCode, UniqueId, UniqueId);
902  if (Vrp)
903  INFO_(VIDEOPRT, "Vrp->IoControlCode %lu (0x%lx)\n", Vrp->IoControlCode, Vrp->IoControlCode);
904 }
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
#define INFO_(ch,...)
Definition: debug.h:159
#define UNIMPLEMENTED
Definition: debug.h:115

◆ VideoPortMapBankedMemory()

VPAPI VP_STATUS NTAPI VideoPortMapBankedMemory ( IN PVOID  HwDeviceExtension,
IN PHYSICAL_ADDRESS  PhysicalAddress,
IN OUT PULONG  Length,
PULONG  InIoSpace,
PVOID VirtualAddress,
ULONG  BankLength,
UCHAR  ReadWriteBank,
PBANKED_SECTION_ROUTINE  BankRoutine,
PVOID  Context 
)

◆ VideoPortMapDmaMemory()

VPAPI PDMA NTAPI VideoPortMapDmaMemory ( IN PVOID  HwDeviceExtension,
IN PVIDEO_REQUEST_PACKET  pVrp,
IN PHYSICAL_ADDRESS  BoardAddress,
IN PULONG  Length,
IN PULONG  InIoSpace,
IN PVOID  MappedUserEvent,
IN PVOID  DisplayDriverEvent,
IN OUT PVOID VirtualAddress 
)

Definition at line 284 of file dma.c.

292 {
293  /* Deprecated */
294  return NULL;
295 }
#define NULL
Definition: types.h:112

◆ VideoPortMapMemory()

VPAPI VP_STATUS NTAPI VideoPortMapMemory ( IN PVOID  HwDeviceExtension,
IN PHYSICAL_ADDRESS  PhysicalAddress,
IN OUT PULONG  Length,
IN PULONG  InIoSpace,
IN OUT PVOID VirtualAddress 
)

◆ VideoPortMoveMemory()

VPAPI VOID NTAPI VideoPortMoveMemory ( IN PVOID  Destination,
IN PVOID  Source,
IN ULONG  Length 
)

◆ VideoPortPutDmaAdapter()

VPAPI VOID NTAPI VideoPortPutDmaAdapter ( IN PVOID  HwDeviceExtension,
IN PVP_DMA_ADAPTER  VpDmaAdapter 
)

Definition at line 93 of file dma.c.

95 {
96  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
97  PVIP_DMA_ADAPTER Adapter = (PVIP_DMA_ADAPTER)VpDmaAdapter;
98 
99  /* get hw device extension */
100  DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
101 
102  /* sanity check */
103  ASSERT(!IsListEmpty(&DeviceExtension->DmaAdapterList));
104 
105  /* remove dma adapter from list */
106  RemoveEntryList(&Adapter->Entry);
107 
108  /* release dma adapter */
109  Adapter->Adapter->DmaOperations->PutDmaAdapter(Adapter->Adapter);
110 
111  /* free memory */
112  ExFreePool(Adapter);
113 }
LIST_ENTRY Entry
Definition: dma.c:18
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
struct _DMA_OPERATIONS * DmaOperations
Definition: iotypes.h:2295
FORCEINLINE BOOLEAN RemoveEntryList(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:105
#define ASSERT(a)
Definition: mode.c:44
struct VIP_DMA_ADAPTER * PVIP_DMA_ADAPTER
PDMA_ADAPTER Adapter
Definition: dma.c:19
#define ExFreePool(addr)
Definition: env_spec_w32.h:352

◆ VideoPortQueryPerformanceCounter()

VPAPI LONGLONG NTAPI VideoPortQueryPerformanceCounter ( IN PVOID  HwDeviceExtension,
OUT PLONGLONG PerformanceFrequency  OPTIONAL 
)

Definition at line 1586 of file videoprt.c.

1589 {
1591 
1592  TRACE_(VIDEOPRT, "VideoPortQueryPerformanceCounter\n");
1593  Result = KeQueryPerformanceCounter((PLARGE_INTEGER)PerformanceFrequency);
1594  return Result.QuadPart;
1595 }
LARGE_INTEGER NTAPI KeQueryPerformanceCounter(IN PLARGE_INTEGER PerformanceFreq)
Definition: timer.c:138
_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
#define TRACE_(x)
Definition: compat.h:76

◆ VideoPortQueryServices()

VPAPI VP_STATUS NTAPI VideoPortQueryServices ( IN PVOID  HwDeviceExtension,