ReactOS 0.4.15-dev-5666-gc548b97
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)
#define ULONG_PTR
Definition: config.h:101
signed char * PCHAR
Definition: retypes.h:7
#define PCHAR
Definition: match.c:90
static WCHAR Address[46]
Definition: ping.c:68
uint32_t ULONG_PTR
Definition: typedefs.h:65
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:953

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 588 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 595 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 603 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 610 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 618 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 625 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 252 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 393 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 425 of file video.h.

◆ PI2C_START

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

Definition at line 376 of file video.h.

◆ PI2C_START_2

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

Definition at line 408 of file video.h.

◆ PI2C_STOP

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

Definition at line 381 of file video.h.

◆ PI2C_STOP_2

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

Definition at line 413 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 386 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 418 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 450 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 445 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 457 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 463 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 471 of file video.h.

◆ PMINIPORT_DPC_ROUTINE

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

Definition at line 517 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 509 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 497 of file video.h.

◆ PMINIPORT_SYNCHRONIZE_ROUTINE

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

Definition at line 522 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 479 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 526 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 310 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 198 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 276 of file video.h.

◆ PVIDEO_HW_INITIALIZATION_DATA

◆ PVIDEO_HW_INITIALIZE

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

Definition at line 206 of file video.h.

◆ PVIDEO_HW_INTERRUPT

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

Definition at line 210 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 223 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 291 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 285 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 305 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 315 of file video.h.

◆ PVIDEO_HW_START_DMA

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

Definition at line 235 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 338 of file video.h.

◆ PVIDEO_HW_TIMER

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

Definition at line 343 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 161 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 357 of file video.h.

◆ PVIDEO_READ_DATA_LINE

typedef BOOLEAN(NTAPI * PVIDEO_READ_DATA_LINE) (PVOID HwDeviceExtension)

Definition at line 361 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 365 of file video.h.

◆ PVIDEO_WRITE_CLOCK_LINE

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

Definition at line 347 of file video.h.

◆ PVIDEO_WRITE_DATA_LINE

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

Definition at line 352 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 484 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.

548 {
552} DMA_FLAGS;
@ VideoPortUnlockAfterDma
Definition: video.h:549
@ VideoPortKeepPagesLocked
Definition: video.h:550
@ VideoPortDmaInitOnly
Definition: video.h:551
enum _DMA_FLAGS DMA_FLAGS

◆ _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
@ DmaSyncReturn
Definition: video.h:232
@ DmaAsyncReturn
Definition: video.h:231

◆ _VIDEO_CHILD_TYPE

Enumerator
Monitor 
NonPrimaryChip 
VideoChip 
Other 

Definition at line 269 of file video.h.

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

◆ _VIDEO_DEVICE_DATA_TYPE

Enumerator
VpMachineData 
VpCmosData 
VpBusData 
VpControllerData 
VpMonitorData 

Definition at line 489 of file video.h.

489 {
490 VpMachineData = 0,
492 VpBusData,
@ VpMachineData
Definition: video.h:490
@ VpBusData
Definition: video.h:492
@ VpControllerData
Definition: video.h:493
@ VpMonitorData
Definition: video.h:494
@ VpCmosData
Definition: video.h:491
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.

704 {
enum _VIDEO_PORT_SERVICES VIDEO_PORT_SERVICES
@ VideoPortServicesWCMemoryProtection
Definition: video.h:710
@ VideoPortServicesAGP
Definition: video.h:705
@ VideoPortServicesI2C
Definition: video.h:706
@ VideoPortServicesHeadless
Definition: video.h:707
@ VideoPortServicesDebugReport
Definition: video.h:709
@ VideoPortServicesInt10
Definition: video.h:708

◆ _VP_LOCK_OPERATION

Enumerator
VpReadAccess 
VpWriteAccess 
VpModifyAccess 

Definition at line 640 of file video.h.

640 {
641 VpReadAccess = 0,
@ VpReadAccess
Definition: video.h:641
@ VpWriteAccess
Definition: video.h:642
@ VpModifyAccess
Definition: video.h:643
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,
enum _VP_POOL_TYPE VP_POOL_TYPE
enum _VP_POOL_TYPE * PVP_POOL_TYPE
@ VpNonPagedPool
Definition: video.h:542
@ VpPagedPool
Definition: video.h:543
@ VpPagedPoolCacheAligned
Definition: video.h:545
@ VpNonPagedPoolCacheAligned
Definition: video.h:544

◆ 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
VIDEO_DEBUG_LEVEL
Definition: video.h:579
@ Error
Definition: video.h:580
@ Warn
Definition: video.h:581
@ Trace
Definition: video.h:582
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:690

◆ VIDEO_SYNCHRONIZE_PRIORITY

Enumerator
VpLowPriority 
VpMediumPriority 
VpHighPriority 

Definition at line 534 of file video.h.

534 {
535 VpLowPriority = 0,
VIDEO_SYNCHRONIZE_PRIORITY
Definition: video.h:534
@ VpMediumPriority
Definition: video.h:536
@ VpLowPriority
Definition: video.h:535
@ VpHighPriority
Definition: video.h:537
enum VIDEO_SYNCHRONIZE_PRIORITY * PVIDEO_SYNCHRONIZE_PRIORITY

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
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
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
451 return status;
452}
#define DEBUG_ENTRY(level)
Definition: kdebugprint.h:49
#define DPrintf(Level, Fmt)
Definition: kdebugprint.h:61
#define DEBUG_EXIT_STATUS(level, status)
Definition: kdebugprint.h:50
void _LogOutString(int level, const char *s)
static VOID NTAPI ParaNdis5_Halt(IN NDIS_HANDLE MiniportAdapterContext)
static NDIS_HANDLE DriverHandle
static NDIS_STATUS NTAPI ParaNdis5_Reset(OUT PBOOLEAN AddressingReset, IN NDIS_HANDLE MiniportAdapterContext)
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 ParaVirtualNICUnload(IN PDRIVER_OBJECT pDriverObject)
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)
VOID NTAPI ParaNdis5_PnPEventNotify(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_DEVICE_PNP_EVENT PnPEvent, IN PVOID InformationBuffer, IN ULONG InformationBufferLength)
static VOID NTAPI ParaNdis5_Shutdown(IN NDIS_HANDLE MiniportAdapterContext)
VOID NTAPI ParaNdis5_SendPackets(IN NDIS_HANDLE MiniportAdapterContext, IN PPNDIS_PACKET PacketArray, IN UINT NumberOfPackets)
VOID NTAPI ParaNdis5_ReturnPacket(IN NDIS_HANDLE MiniportAdapterContext, IN PNDIS_PACKET Packet)
VOID NTAPI ParaNdis5_CancelSendPackets(IN NDIS_HANDLE MiniportAdapterContext, IN PVOID CancelId)
VOID NTAPI ParaNdis5_HandleDPC(IN NDIS_HANDLE MiniportAdapterContext)
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)
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)
#define NULL
Definition: types.h:112
void ParaNdis_DebugInitialize(PVOID DriverObject, PVOID RegistryPath)
#define NdisZeroMemory(Destination, Length)
Definition: ndis.h:3926
#define NDIS_STATUS_FAILURE
Definition: ndis.h:465
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
#define NdisMInitializeWrapper(NdisWrapperHandle, SystemSpecific1, SystemSpecific2, SystemSpecific3)
Definition: ndis.h:5592
VOID EXPORT NdisMRegisterUnloadHandler(IN NDIS_HANDLE NdisWrapperHandle, IN PDRIVER_UNLOAD UnloadHandler)
Definition: miniport.c:3151
NDIS_STATUS EXPORT NdisMRegisterMiniport(IN NDIS_HANDLE NdisWrapperHandle, IN PNDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics, IN UINT CharacteristicsLength)
Definition: miniport.c:2637
VOID EXPORT NdisTerminateWrapper(IN NDIS_HANDLE NdisWrapperHandle, IN PVOID SystemSpecific)
Definition: miniport.c:3012
int NDIS_STATUS
Definition: ntddndis.h:475
Definition: ps.c:97
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213

◆ VideoPortAcquireDeviceLock()

VPAPI VOID NTAPI VideoPortAcquireDeviceLock ( IN PVOID  HwDeviceExtension)

Definition at line 1603 of file videoprt.c.

1605{
1606 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1607
1608 TRACE_(VIDEOPRT, "VideoPortAcquireDeviceLock\n");
1609 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1611 // ASSERT(Status == STATUS_SUCCESS);
1612}
#define FALSE
Definition: types.h:117
#define TRACE_(x)
Definition: compat.h:76
#define KernelMode
Definition: asm.h:34
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
#define KeWaitForMutexObject
Definition: kefuncs.h:557
@ Executive
Definition: ketypes.h:403

◆ 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}
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFSPINLOCK * SpinLock
Definition: wdfsync.h:228
_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}
#define KeAcquireSpinLockAtDpcLevel(SpinLock)
Definition: ke.h:125

◆ 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}
Definition: bufpool.h:45
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define NO_ERROR
Definition: dderror.h:5
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PagedPool
Definition: env_spec_w32.h:308
#define TAG_VIDEO_PORT_BUFFER
Definition: videoprt.h:39
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533

◆ 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}
PDMA_ADAPTER Adapter
Definition: dma.c:19
struct _DMA_OPERATIONS * DmaOperations
Definition: iotypes.h:2295
struct VIP_DMA_ADAPTER * PVIP_DMA_ADAPTER

Referenced by VideoPortGetCommonBuffer().

◆ VideoPortAllocateContiguousMemory()

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

Definition at line 1647 of file videoprt.c.

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

◆ 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}
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815

Referenced by BochsInitialize(), 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}

◆ 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 1511 of file videoprt.c.

1519{
1520 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1523 IO_STACK_LOCATION IoStack;
1524 ULONG PciFlags = 0;
1526 BOOL DevicePresent;
1527
1528 TRACE_(VIDEOPRT, "VideoPortCheckForDeviceExistence\n");
1529
1531 {
1532 WARN_(VIDEOPRT, "VideoPortCheckForDeviceExistence: Unknown flags 0x%lx\n", Flags & ~(CDE_USE_REVISION | CDE_USE_SUBSYSTEM_IDS));
1533 return FALSE;
1534 }
1535
1536 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1537
1539 PciDevicePresentInterface.Version = 1;
1541 IoStack.Parameters.QueryInterface.Version = PciDevicePresentInterface.Version;
1543 IoStack.Parameters.QueryInterface.InterfaceType =
1544 &GUID_PCI_DEVICE_PRESENT_INTERFACE;
1545 Status = IopInitiatePnpIrp(DeviceExtension->NextDeviceObject,
1547 if (!NT_SUCCESS(Status))
1548 {
1549 WARN_(VIDEOPRT, "IopInitiatePnpIrp() failed! (Status 0x%lx)\n", Status);
1550 return FALSE;
1551 }
1552
1553 if (Flags & CDE_USE_REVISION)
1554 PciFlags |= PCI_USE_REVISION;
1556 PciFlags |= PCI_USE_SUBSYSTEM_IDS;
1557
1558 DevicePresent = PciDevicePresentInterface.IsDevicePresent(
1559 VendorId, DeviceId, RevisionId,
1560 SubVendorId, SubSystemId, PciFlags);
1561
1562 PciDevicePresentInterface.InterfaceDereference(PciDevicePresentInterface.Context);
1563
1564 return DevicePresent;
1565}
LONG NTSTATUS
Definition: precomp.h:26
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
unsigned int BOOL
Definition: ntddk_ex.h:94
Status
Definition: gdiplustypes.h:25
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
PCI_INTERFACE PciDevicePresentInterface
Definition: devhere.c:18
unsigned int ULONG
Definition: retypes.h:1
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
NTSTATUS NTAPI IopInitiatePnpIrp(IN PDEVICE_OBJECT DeviceObject, IN PIO_STATUS_BLOCK IoStatusBlock, IN UCHAR MinorFunction, IN PIO_STACK_LOCATION Stack)
struct _INTERFACE * PINTERFACE
#define CDE_USE_REVISION
Definition: video.h:147
#define CDE_USE_SUBSYSTEM_IDS
Definition: video.h:146
#define WARN_(ch,...)
Definition: debug.h:157
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3128
PDEVICE_OBJECT NextDeviceObject
Definition: videoprt.h:89
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define IRP_MN_QUERY_INTERFACE
struct _PCI_DEVICE_PRESENT_INTERFACE PCI_DEVICE_PRESENT_INTERFACE
#define PCI_USE_REVISION
Definition: iotypes.h:867
#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{
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}
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID _In_ ULONG _In_ BOOLEAN WriteToDevice
Definition: cdrom.h:992
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
struct _SCATTER_GATHER_LIST * PSCATTER_GATHER_LIST
Definition: iotypes.h:2204

◆ 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 1390 of file videoprt.c.

1394{
1396 PVIDEO_PORT_DEVICE_EXTENSION FirstDeviceExtension, DeviceExtension;
1398
1399 ASSERT(SecondaryDeviceExtension);
1400
1401 if (Flag != 0)
1402 {
1404 }
1405
1406 FirstDeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1407
1408 if (FirstDeviceExtension->DisplayNumber != 0)
1409 {
1410 DPRINT1("Calling VideoPortCreateSecondaryDisplay for InstanceId %lu\n",
1411 FirstDeviceExtension->DisplayNumber);
1412 }
1413
1415 FirstDeviceExtension->DriverExtension,
1416 FirstDeviceExtension->PhysicalDeviceObject,
1417 FirstDeviceExtension->AdapterNumber,
1418 FirstDeviceExtension->NumberOfSecondaryDisplays + 1,
1419 &DeviceObject);
1420 if (!NT_SUCCESS(Status))
1421 {
1422 DPRINT1("IntVideoPortCreateAdapterDeviceObject() failed with status 0x%08x\n", Status);
1423 return ERROR_DEV_NOT_EXIST;
1424 }
1425
1426 DeviceExtension = DeviceObject->DeviceExtension;
1427
1428 /* Increment secondary display count */
1429 FirstDeviceExtension->NumberOfSecondaryDisplays++;
1430
1431 *SecondaryDeviceExtension = DeviceExtension->MiniPortDeviceExtension;
1432 return NO_ERROR;
1433}
#define DPRINT1
Definition: precomp.h:8
#define UNIMPLEMENTED
Definition: debug.h:115
#define ERROR_DEV_NOT_EXIST
Definition: dderror.h:8
#define ASSERT(a)
Definition: mode.c:44
Definition: xml2sdb.h:80
PDEVICE_OBJECT PhysicalDeviceObject
Definition: videoprt.h:87
VIDEO_PORT_DRIVER_EXTENSION * DriverExtension
Definition: videoprt.h:103
CHAR POINTER_ALIGNMENT MiniPortDeviceExtension[1]
Definition: videoprt.h:113
PDRIVER_OBJECT DriverObject
Definition: videoprt.h:86
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
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055

◆ 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}
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
#define NonPagedPool
Definition: env_spec_w32.h:307
#define KeInitializeSpinLock(sl)
Definition: env_spec_w32.h:604
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44

◆ 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 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 */
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? */
176#endif
177}
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
VOID NTAPI HalDisableSystemInterrupt(IN ULONG Vector, IN KIRQL Irql)
Definition: pic.c:309
PVIDEO_HW_INTERRUPT HwInterrupt
Definition: video.h:668
VIDEO_HW_INITIALIZATION_DATA InitializationData
Definition: videoprt.h:72

◆ 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}

◆ 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 */
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? */
146#endif
147}
unsigned char BOOLEAN
#define TRUE
Definition: types.h:120
BOOLEAN NTAPI HalEnableSystemInterrupt(IN ULONG Vector, IN KIRQL Irql, IN KINTERRUPT_MODE InterruptMode)
Definition: pic.c:295

◆ VideoPortEnumerateChildren()

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

Definition at line 1367 of file videoprt.c.

1370{
1371 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1372
1373 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1374 ASSERT(DeviceExtension);
1375
1376 if (DeviceExtension->PhysicalDeviceObject)
1377 {
1378 /* Trigger reenumeration by the PnP manager */
1380 }
1381
1382 return NO_ERROR;
1383}
VOID NTAPI IoInvalidateDeviceRelations(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_RELATION_TYPE Type)
Definition: pnpmgr.c:2342
@ BusRelations
Definition: iotypes.h:2152

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:5

◆ 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 */
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}
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
struct __VP_DMA_ADAPTER * PVP_DMA_ADAPTER
Definition: video.h:159
base of all file and directory entries
Definition: entries.h:83
PVOID HwDeviceExtension
Definition: dma.c:21
ULONG MapRegisters
Definition: dma.c:20
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
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

◆ 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}
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{
940}
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898

Referenced by BochsFreeResources(), 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 
)

◆ VideoPortGetAssociatedDeviceExtension()

VPAPI PVOID NTAPI VideoPortGetAssociatedDeviceExtension ( IN PVOID  DeviceObject)

Definition at line 1456 of file videoprt.c.

1458{
1459 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1460
1461 TRACE_(VIDEOPRT, "VideoPortGetAssociatedDeviceExtension\n");
1462 DeviceExtension = ((PDEVICE_OBJECT)DeviceObject)->DeviceExtension;
1463 if (!DeviceExtension)
1464 return NULL;
1465 return DeviceExtension->MiniPortDeviceExtension;
1466}
struct _DEVICE_OBJECT * PDEVICE_OBJECT

◆ VideoPortGetAssociatedDeviceID()

VPAPI ULONG NTAPI VideoPortGetAssociatedDeviceID ( IN PVOID  DeviceObject)

Definition at line 38 of file stubs.c.

40{
42 return 0;
43}

◆ 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}

◆ 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{
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 */
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 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
_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

◆ VideoPortGetCurrentIrql()

VPAPI UCHAR NTAPI VideoPortGetCurrentIrql ( VOID  )

Definition at line 912 of file videoprt.c.

913{
914 return KeGetCurrentIrql();
915}
#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");
460 VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension),
461 IoAddress,
462 NumberOfUchars,
463 InIoSpace,
464 NULL,
465 NULL);
466}
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 BochsFindAdapter(), 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");
913}

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}
#define InsertTailList(ListHead, Entry)
PDMA_ADAPTER NTAPI IoGetDmaAdapter(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PDEVICE_DESCRIPTION DeviceDescription, IN OUT PULONG NumberOfMapRegisters)
Definition: pnpdma.c:23
@ Width8Bits
Definition: miniport.h:105
@ Compatible
Definition: miniport.h:112
LIST_ENTRY Entry
Definition: dma.c:18
INTERFACE_TYPE AdapterInterfaceType
Definition: videoprt.h:98
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceDescription
Definition: wdfpdo.h:432
_Out_ PULONG NumberOfMapRegisters
Definition: halfuncs.h:209
#define DEVICE_DESCRIPTION_VERSION
Definition: iotypes.h:2063

◆ 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}

◆ VideoPortGetMdl()

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

Definition at line 58 of file stubs.c.

61{
63 return 0;
64}

◆ 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 953 of file videoprt.c.

959{
962 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
964
965 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
966
967 TRACE_(VIDEOPRT, "VideoPortGetRegistryParameters ParameterName %S, RegPath: %wZ\n",
968 ParameterName, &DeviceExtension->RegistryPath);
969
970 Context.HwDeviceExtension = HwDeviceExtension;
971 Context.HwContext = HwContext;
972 Context.HwGetRegistryRoutine = GetRegistryRoutine;
973
977
979 DeviceExtension->RegistryPath.Buffer,
981 &Context,
982 NULL);
983 if (!NT_SUCCESS(Status))
984 {
985 WARN_(VIDEOPRT, "VideoPortGetRegistryParameters could not find the "
986 "requested parameter\n");
988 }
989
990 if (IsParameterFileName)
991 {
992 /* FIXME: need to read the contents of the file */
994 }
995
996 return NO_ERROR;
997}
_In_opt_ PWSTR _In_ PWSTR ParameterName
Definition: cdrom.h:961
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
Definition: rtlfuncs.h:4197
#define RTL_REGISTRY_ABSOLUTE
Definition: nt_native.h:161
#define RTL_QUERY_REGISTRY_REQUIRED
Definition: nt_native.h:132
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:898
PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine
Definition: nt_native.h:109
UNICODE_STRING RegistryPath
Definition: videoprt.h:90
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:927

◆ VideoPortGetRomImage()

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

Definition at line 1063 of file videoprt.c.

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

◆ VideoPortGetVersion()

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

Definition at line 1473 of file videoprt.c.

1476{
1478
1479 Version.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOEXW);
1480 if (VpOsVersionInfo->Size >= sizeof(VPOSVERSIONINFO))
1481 {
1482#if 1
1484 {
1485 VpOsVersionInfo->MajorVersion = Version.dwMajorVersion;
1486 VpOsVersionInfo->MinorVersion = Version.dwMinorVersion;
1487 VpOsVersionInfo->BuildNumber = Version.dwBuildNumber;
1488 VpOsVersionInfo->ServicePackMajor = Version.wServicePackMajor;
1489 VpOsVersionInfo->ServicePackMinor = Version.wServicePackMinor;
1490 return NO_ERROR;
1491 }
1493#else
1494 VpOsVersionInfo->MajorVersion = 5;
1495 VpOsVersionInfo->MinorVersion = 0;
1496 VpOsVersionInfo->BuildNumber = 2195;
1497 VpOsVersionInfo->ServicePackMajor = 4;
1498 VpOsVersionInfo->ServicePackMinor = 0;
1499 return NO_ERROR;
1500#endif
1501 }
1502
1504}
NTSTATUS NTAPI RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation)
Definition: version.c:158
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469
struct _OSVERSIONINFOEXW RTL_OSVERSIONINFOEXW

◆ VideoPortGetVgaStatus()

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

Definition at line 1035 of file videoprt.c.

1038{
1039 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1040
1041 TRACE_(VIDEOPRT, "VideoPortGetVgaStatus\n");
1042
1043 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1045 {
1046 if (DeviceExtension->AdapterInterfaceType == PCIBus)
1047 {
1048 /* VgaStatus: 0 == VGA not enabled, 1 == VGA enabled. */
1049 /* Assumed for now */
1050 *VgaStatus = 1;
1051 return NO_ERROR;
1052 }
1053 }
1054
1056}
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
@ PCIBus
Definition: hwresource.cpp:142

◆ VideoPortInitialize()

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

Definition at line 663 of file videoprt.c.

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

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}
VP_STATUS NTAPI IntInt10CallBios(IN PVOID Context, IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)
Definition: int10.c:380
LONG VP_STATUS
Definition: video.h:153
PKPROCESS CsrProcess
Definition: videoprt.c:39

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:25
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}
#define InterlockedExchange
Definition: armddk.h:54
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_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}
long __cdecl _InterlockedIncrement(_Interlocked_operand_ long volatile *_Addend)

◆ VideoPortIsNoVesa()

VPAPI BOOLEAN NTAPI VideoPortIsNoVesa ( VOID  )

Definition at line 1661 of file videoprt.c.

1662{
1663 return VpNoVesa;
1664}
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}
FP_OP Operation
Definition: fpcontrol.c:150
#define IoAllocateMdl
Definition: fxmdl.h:88
VOID NTAPI MmProbeAndLockPages(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN LOCK_OPERATION Operation)
Definition: mdlsup.c:931
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
_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 893 of file videoprt.c.

898{
900
901 INFO_(VIDEOPRT, "VideoPortLogError ErrorCode %d (0x%x) UniqueId %lu (0x%lx)\n",
902 ErrorCode, ErrorCode, UniqueId, UniqueId);
903 if (Vrp)
904 INFO_(VIDEOPRT, "Vrp->IoControlCode %lu (0x%lx)\n", Vrp->IoControlCode, Vrp->IoControlCode);
905}
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436

◆ 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}

◆ 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}
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986

◆ VideoPortQueryPerformanceCounter()

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

Definition at line 1587 of file videoprt.c.

1590{
1592
1593 TRACE_(VIDEOPRT, "VideoPortQueryPerformanceCounter\n");
1594 Result = KeQueryPerformanceCounter((PLARGE_INTEGER)PerformanceFrequency);
1595 return Result.QuadPart;
1596}
LARGE_INTEGER NTAPI KeQueryPerformanceCounter(IN PLARGE_INTEGER PerformanceFreq)
Definition: timer.c:138

◆ VideoPortQueryServices()

VPAPI VP_STATUS NTAPI VideoPortQueryServices ( IN PVOID  HwDeviceExtension,
IN VIDEO_PORT_SERVICES  ServicesType,
IN OUT PINTERFACE  Interface 
)

Definition at line 40 of file services.c.

44{
45 TRACE_(VIDEOPRT, "VideoPortQueryServices - ServicesType: 0x%x\n", ServicesType);
46
47 switch (ServicesType)
48 {
52 {
53 VIDEO_PORT_INT10_INTERFACE *Int10Interface =
55
57 Interface->InterfaceDereference = IntInterfaceDereference;
59 Int10Interface->Int10FreeBuffer = IntInt10FreeBuffer;
60 Int10Interface->Int10ReadMemory = IntInt10ReadMemory;
61 Int10Interface->Int10WriteMemory = IntInt10WriteMemory;
62 Int10Interface->Int10CallBios = IntInt10CallBios;
63 return NO_ERROR;
64 }
65 break;
66
69 Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE_2)) ||
71 Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE)))
72 {
73 if (NT_SUCCESS(IntAgpGetInterface(HwDeviceExtension, Interface)))
74 {
75 return NO_ERROR;
76 }
77 }
78 break;
79
83
87
88 default:
89 break;
90 }
91
93}
NTSTATUS NTAPI IntAgpGetInterface(IN PVOID HwDeviceExtension, IN OUT PINTERFACE Interface)
Definition: agp.c:496
VP_STATUS NTAPI IntInt10ReadMemory(IN PVOID Context, IN USHORT Seg, IN USHORT Off, OUT PVOID Buffer, IN ULONG Length)
Definition: int10.c:306
VP_STATUS NTAPI IntInt10WriteMemory(IN PVOID Context, IN USHORT Seg, IN USHORT Off, IN PVOID Buffer, IN ULONG Length)
Definition: int10.c:344
VP_STATUS NTAPI IntInt10FreeBuffer(IN PVOID Context, IN USHORT Seg, IN USHORT Off)
Definition: int10.c:273
VP_STATUS NTAPI IntInt10AllocateBuffer(IN PVOID Context, OUT PUSHORT Seg, OUT PUSHORT Off, IN OUT PULONG Length)
Definition: int10.c:210
struct _VIDEO_PORT_AGP_INTERFACE VIDEO_PORT_AGP_INTERFACE
#define VIDEO_PORT_AGP_INTERFACE_VERSION_1
Definition: video.h:123
#define VIDEO_PORT_INT10_INTERFACE_VERSION_1
Definition: video.h:127
#define VIDEO_PORT_AGP_INTERFACE_VERSION_2
Definition: video.h:124
OUT PINT10_FREE_BUFFER Int10FreeBuffer
Definition: video.h:779
OUT PINT10_READ_MEMORY Int10ReadMemory
Definition: video.h:780
OUT PINT10_CALL_BIOS Int10CallBios
Definition: video.h:782
OUT PINTERFACE_REFERENCE InterfaceReference
Definition: video.h:776
OUT PINT10_ALLOCATE_BUFFER Int10AllocateBuffer
Definition: video.h:778
OUT PINT10_WRITE_MEMORY Int10WriteMemory
Definition: video.h:781
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
VOID NTAPI IntInterfaceReference(PVOID Context)
Definition: services.c:28
VOID NTAPI IntInterfaceDereference(PVOID Context)
Definition: services.c:34

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

◆ VideoPortQuerySystemTime()

VPAPI VOID NTAPI VideoPortQuerySystemTime ( OUT PLARGE_INTEGER  CurrentTime)

◆ VideoPortQueueDpc()

VPAPI BOOLEAN NTAPI VideoPortQueueDpc ( IN PVOID  HwDeviceExtension,
IN PMINIPORT_DPC_ROUTINE  CallbackRoutine,
IN PVOID  Context 
)

Definition at line 1440 of file videoprt.c.

1444{
1445 return KeInsertQueueDpc(
1446 &VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension)->DpcObject,
1448 (PVOID)Context);
1449}
BOOLEAN NTAPI KeInsertQueueDpc(IN PKDPC Dpc, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: dpc.c:725
_Must_inspect_result_ _In_ PFLT_GET_OPERATION_STATUS_CALLBACK CallbackRoutine
Definition: fltkernel.h:1035
@ DpcObject
Definition: ketypes.h:458

◆ VideoPortReadPortBufferUchar()

VPAPI VOID NTAPI VideoPortReadPortBufferUchar ( IN PUCHAR  Port,
OUT PUCHAR  Buffer,
IN ULONG  Count 
)

◆ VideoPortReadPortBufferUlong()

VPAPI VOID NTAPI VideoPortReadPortBufferUlong ( IN PULONG  Port,
OUT PULONG  Buffer,
IN ULONG  Count 
)

◆ VideoPortReadPortBufferUshort()

VPAPI VOID NTAPI VideoPortReadPortBufferUshort ( IN PUSHORT  Port,
OUT PUSHORT  Buffer,
IN ULONG  Count 
)

◆ VideoPortReadPortUchar()

◆ VideoPortReadPortUlong()

VPAPI ULONG NTAPI VideoPortReadPortUlong ( IN PULONG  Port)

Referenced by VmxReadUlong().

◆ VideoPortReadPortUshort()

VPAPI USHORT NTAPI VideoPortReadPortUshort ( IN PUSHORT  Port)

◆ VideoPortReadRegisterBufferUchar()

VPAPI VOID NTAPI VideoPortReadRegisterBufferUchar ( IN PUCHAR  Register,
OUT PUCHAR  Buffer,
IN ULONG  Count 
)

◆ VideoPortReadRegisterBufferUlong()

VPAPI VOID NTAPI VideoPortReadRegisterBufferUlong ( IN PULONG  Register,
OUT PULONG  Buffer,
IN ULONG  Count 
)

◆ VideoPortReadRegisterBufferUshort()

VPAPI VOID NTAPI VideoPortReadRegisterBufferUshort ( IN PUSHORT  Register,
OUT PUSHORT  Buffer,
IN ULONG  Count 
)

◆ VideoPortReadRegisterUchar()

VPAPI UCHAR NTAPI VideoPortReadRegisterUchar ( IN PUCHAR  Register)

◆ VideoPortReadRegisterUlong()

VPAPI ULONG NTAPI VideoPortReadRegisterUlong ( IN PULONG  Register)

◆ VideoPortReadRegisterUshort()

VPAPI USHORT NTAPI VideoPortReadRegisterUshort ( IN PUSHORT  Register)

◆ VideoPortReadStateEvent()

VPAPI LONG NTAPI VideoPortReadStateEvent ( IN PVOID  HwDeviceExtension,
IN PEVENT  pEvent 
)

◆ VideoPortRegisterBugcheckCallback()

VPAPI VP_STATUS NTAPI VideoPortRegisterBugcheckCallback ( IN PVOID  HwDeviceExtension,
IN ULONG  BugcheckCode,
IN PVIDEO_BUGCHECK_CALLBACK  Callback,
IN ULONG  BugcheckDataSize 
)

Definition at line 1572 of file videoprt.c.

1577{
1579 return NO_ERROR;
1580}

◆ VideoPortReleaseBuffer()

VPAPI VOID NTAPI VideoPortReleaseBuffer ( IN PVOID  HwDeviceExtension,
IN PVOID  Buffer 
)

Definition at line 962 of file resource.c.

965{
966 TRACE_(VIDEOPRT, "VideoPortReleaseBuffer\n");
968}

◆ VideoPortReleaseCommonBuffer()

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 
)

Definition at line 68 of file dma.c.

74{
75 PVIP_DMA_ADAPTER Adapter = (PVIP_DMA_ADAPTER)VpDmaAdapter;
76
77 /* check for valid arguments */
78 if (!Adapter || !Adapter->Adapter)
79 {
80 /* invalid parameter */
81 return;
82 }
83
84 /* release common buffer */
85 Adapter->Adapter->DmaOperations->FreeCommonBuffer(Adapter->Adapter, Length, LogicalAddress, VirtualAddress, CacheEnabled);
86}

Referenced by VideoPortFreeCommonBuffer().

◆ VideoPortReleaseDeviceLock()

VPAPI VOID NTAPI VideoPortReleaseDeviceLock ( IN PVOID  HwDeviceExtension)

Definition at line 1619 of file videoprt.c.

1621{
1622 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1623
1624 TRACE_(VIDEOPRT, "VideoPortReleaseDeviceLock\n");
1625 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1626 KeReleaseMutex(&DeviceExtension->DeviceLock, FALSE);
1627 //ASSERT(Status == STATUS_SUCCESS);
1628}
LONG NTAPI KeReleaseMutex(IN PKMUTEX Mutex, IN BOOLEAN Wait)
Definition: mutex.c:189

◆ VideoPortReleaseSpinLock()

VPAPI VOID NTAPI VideoPortReleaseSpinLock ( IN PVOID  HwDeviceExtension,
IN PSPIN_LOCK  SpinLock,
IN UCHAR  NewIrql 
)

Definition at line 90 of file spinlock.c.

94{
95 TRACE_(VIDEOPRT, "VideoPortReleaseSpinLock\n");
97}
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
_Requires_lock_held_ SpinLock _Releases_lock_ SpinLock _In_ _IRQL_restores_ KIRQL NewIrql
Definition: ke.h:114

◆ VideoPortReleaseSpinLockFromDpcLevel()

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

Definition at line 104 of file spinlock.c.

107{
108 TRACE_(VIDEOPRT, "VideoPortReleaseSpinLockFromDpcLevel\n");
110}
#define KeReleaseSpinLockFromDpcLevel(SpinLock)
Definition: ke.h:135

◆ VideoPortScanRom()

VPAPI BOOLEAN NTAPI VideoPortScanRom ( PVOID  HwDeviceExtension,
PUCHAR  RomBase,
ULONG  RomLength,
PUCHAR  String 
)

◆ VideoPortSetBusData()

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

Definition at line 1106 of file resource.c.

1113{
1114 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1115
1116 TRACE_(VIDEOPRT, "VideoPortSetBusData\n");
1117
1118 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1119
1120 if (BusDataType != Cmos)
1121 {
1122 /* Legacy vs. PnP behaviour */
1123 if (DeviceExtension->PhysicalDeviceObject != NULL)
1124 SlotNumber = DeviceExtension->SystemIoSlotNumber;
1125 }
1126
1127 return HalSetBusDataByOffset(
1128 BusDataType,
1129 DeviceExtension->SystemIoBusNumber,
1130 SlotNumber,
1131 Buffer,
1132 Offset,
1133 Length);
1134}
ULONG NTAPI HalSetBusDataByOffset(IN BUS_DATA_TYPE BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: bus.c:123
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
@ Cmos
Definition: miniport.h:89
_In_ WDFIORESREQLIST _In_ ULONG SlotNumber
Definition: wdfresource.h:68

◆ VideoPortSetBytesUsed()

VPAPI VOID NTAPI VideoPortSetBytesUsed ( IN PVOID  HwDeviceExtension,
IN OUT PDMA  pDma,
IN ULONG  BytesUsed 
)

Definition at line 68 of file stubs.c.

72{
74}

◆ VideoPortSetDmaContext()

VPAPI VOID NTAPI VideoPortSetDmaContext ( IN PVOID  HwDeviceExtension,
OUT PDMA  pDma,
IN PVOID  InstanceContext 
)

Definition at line 302 of file dma.c.

305{
306 /* Deprecated */
307 return;
308}

◆ VideoPortSetEvent()