ReactOS 0.4.16-dev-122-g325d74c
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_opt_ ULONG NumRequestedResources, _In_reads_opt_(NumRequestedResources) PIO_RESOURCE_DESCRIPTOR RequestedResources, _In_ ULONG NumAccessRanges, _Out_writes_(NumAccessRanges) PVIDEO_ACCESS_RANGE AccessRanges, _In_ PVOID VendorId, _In_ PVOID DeviceId, _Out_ PULONG Slot)
 Retrieves bus-relative (mainly PCI) hardware resources access ranges and, if possible, claims these resources for the caller.
 
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_opt_ ULONG NumAccessRanges, _In_reads_opt_(NumAccessRanges) PVIDEO_ACCESS_RANGE AccessRanges)
 Claims or releases a range of hardware resources and checks for conflicts.
 
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
#define PCHAR
Definition: match.c:90
static WCHAR Address[46]
Definition: ping.c:68
uint32_t ULONG_PTR
Definition: typedefs.h:65
char * PCHAR
Definition: typedefs.h:51
_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 596 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 603 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 611 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 618 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 626 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 633 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 712 of file video.h.

712 {
enum _VIDEO_PORT_SERVICES VIDEO_PORT_SERVICES
@ VideoPortServicesWCMemoryProtection
Definition: video.h:718
@ VideoPortServicesAGP
Definition: video.h:713
@ VideoPortServicesI2C
Definition: video.h:714
@ VideoPortServicesHeadless
Definition: video.h:715
@ VideoPortServicesDebugReport
Definition: video.h:717
@ VideoPortServicesInt10
Definition: video.h:716

◆ _VP_LOCK_OPERATION

Enumerator
VpReadAccess 
VpWriteAccess 
VpModifyAccess 

Definition at line 648 of file video.h.

648 {
649 VpReadAccess = 0,
@ VpReadAccess
Definition: video.h:649
@ VpWriteAccess
Definition: video.h:650
@ VpModifyAccess
Definition: video.h:651
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 587 of file video.h.

587 {
588 Error = 0,
589 Warn,
590 Trace,
591 Info
VIDEO_DEBUG_LEVEL
Definition: video.h:587
@ Error
Definition: video.h:588
@ Warn
Definition: video.h:589
@ Trace
Definition: video.h:590
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}
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
#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)
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 1680 of file videoprt.c.

1682{
1683 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1684
1685 TRACE_(VIDEOPRT, "VideoPortAcquireDeviceLock\n");
1686 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1688 // ASSERT(Status == STATUS_SUCCESS);
1689}
#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:543
@ Executive
Definition: ketypes.h:415

◆ 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:778

◆ 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 1071 of file resource.c.

1075{
1076 TRACE_(VIDEOPRT, "VideoPortAllocateBuffer\n");
1079}
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 1724 of file videoprt.c.

1729{
1731}
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 1044 of file resource.c.

1049{
1050 TRACE_(VIDEOPRT, "VideoPortAllocatePool\n");
1052}
_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 1588 of file videoprt.c.

1596{
1597 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1600 IO_STACK_LOCATION IoStack;
1601 ULONG PciFlags = 0;
1603 BOOL DevicePresent;
1604
1605 TRACE_(VIDEOPRT, "VideoPortCheckForDeviceExistence\n");
1606
1608 {
1609 WARN_(VIDEOPRT, "VideoPortCheckForDeviceExistence: Unknown flags 0x%lx\n", Flags & ~(CDE_USE_REVISION | CDE_USE_SUBSYSTEM_IDS));
1610 return FALSE;
1611 }
1612
1613 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1614
1616 PciDevicePresentInterface.Version = 1;
1618 IoStack.Parameters.QueryInterface.Version = PciDevicePresentInterface.Version;
1620 IoStack.Parameters.QueryInterface.InterfaceType =
1621 &GUID_PCI_DEVICE_PRESENT_INTERFACE;
1622 Status = IopInitiatePnpIrp(DeviceExtension->NextDeviceObject,
1624 if (!NT_SUCCESS(Status))
1625 {
1626 WARN_(VIDEOPRT, "IopInitiatePnpIrp() failed! (Status 0x%lx)\n", Status);
1627 return FALSE;
1628 }
1629
1630 if (Flags & CDE_USE_REVISION)
1631 PciFlags |= PCI_USE_REVISION;
1633 PciFlags |= PCI_USE_SUBSYSTEM_IDS;
1634
1635 DevicePresent = PciDevicePresentInterface.IsDevicePresent(
1636 VendorId, DeviceId, RevisionId,
1637 SubVendorId, SubSystemId, PciFlags);
1638
1639 PciDevicePresentInterface.InterfaceDereference(PciDevicePresentInterface.Context);
1640
1641 return DevicePresent;
1642}
LONG NTSTATUS
Definition: precomp.h:26
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
unsigned int BOOL
Definition: ntddk_ex.h:94
Status
Definition: gdiplustypes.h:25
PCI_INTERFACE PciDevicePresentInterface
Definition: devhere.c:18
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 _IO_STACK_LOCATION::@3974::@4000 QueryInterface
union _IO_STACK_LOCATION::@1575 Parameters
PDEVICE_OBJECT NextDeviceObject
Definition: videoprt.h:89
uint32_t ULONG
Definition: typedefs.h:59
_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 1467 of file videoprt.c.

1471{
1473 PVIDEO_PORT_DEVICE_EXTENSION FirstDeviceExtension, DeviceExtension;
1475
1476 ASSERT(SecondaryDeviceExtension);
1477
1478 if (Flag != 0)
1479 {
1481 }
1482
1483 FirstDeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1484
1485 if (FirstDeviceExtension->DisplayNumber != 0)
1486 {
1487 DPRINT1("Calling VideoPortCreateSecondaryDisplay for InstanceId %lu\n",
1488 FirstDeviceExtension->DisplayNumber);
1489 }
1490
1492 FirstDeviceExtension->DriverExtension,
1493 FirstDeviceExtension->PhysicalDeviceObject,
1494 FirstDeviceExtension->AdapterNumber,
1495 FirstDeviceExtension->NumberOfSecondaryDisplays + 1,
1496 &DeviceObject);
1497 if (!NT_SUCCESS(Status))
1498 {
1499 DPRINT1("IntVideoPortCreateAdapterDeviceObject() failed with status 0x%08x\n", Status);
1500 return ERROR_DEV_NOT_EXIST;
1501 }
1502
1503 DeviceExtension = DeviceObject->DeviceExtension;
1504
1505 /* Increment secondary display count */
1506 FirstDeviceExtension->NumberOfSecondaryDisplays++;
1507
1508 *SecondaryDeviceExtension = DeviceExtension->MiniPortDeviceExtension;
1509 return NO_ERROR;
1510}
#define DPRINT1
Definition: precomp.h:8
#define UNIMPLEMENTED
Definition: debug.h:118
#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:676
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 1444 of file videoprt.c.

1447{
1448 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1449
1450 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1451 ASSERT(DeviceExtension);
1452
1453 if (DeviceExtension->PhysicalDeviceObject)
1454 {
1455 /* Trigger reenumeration by the PnP manager */
1457 }
1458
1459 return NO_ERROR;
1460}
VOID NTAPI IoInvalidateDeviceRelations(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_RELATION_TYPE Type)
Definition: pnpmgr.c:1772
@ 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:6

◆ 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 508 of file resource.c.

511{
512 TRACE_(VIDEOPRT, "VideoPortFreeDeviceBase\n");
514 VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension),
515 MappedAddress);
516}
VOID NTAPI IntVideoPortUnmapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, IN PVOID MappedAddress)
Definition: resource.c:435

Referenced by InitializeModeTable().

◆ VideoPortFreePool()

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

Definition at line 1059 of file resource.c.

1062{
1063 ExFreePool(Ptr);
1064}
_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_opt_ ULONG  NumRequestedResources,
_In_reads_opt_(NumRequestedResources) PIO_RESOURCE_DESCRIPTOR  RequestedResources,
_In_ ULONG  NumAccessRanges,
_Out_writes_(NumAccessRanges) PVIDEO_ACCESS_RANGE  AccessRanges,
_In_ PVOID  VendorId,
_In_ PVOID  DeviceId,
_Out_ PULONG  Slot 
)

Retrieves bus-relative (mainly PCI) hardware resources access ranges and, if possible, claims these resources for the caller.

Parameters
[in]HwDeviceExtensionThe miniport device extension.
[in]NumRequestedResourcesThe number of hardware resources in the RequestedResources array.
[in]RequestedResourcesAn optional array of IO_RESOURCE_DESCRIPTOR elements describing hardware resources the miniport requires.
[in]NumAccessRangesThe number of ranges in the AccessRanges array the miniport expects to retrieve.
[out]AccessRangesA pointer to an array of hardware resource ranges VideoPortGetAccessRanges fills with bus-relative device memory ACCESS_RANGE's for the adapter.
[in]VendorIdFor a PCI device, points to a USHORT-type value that identifies the PCI manufacturer of the adapter. Otherwise, should be NULL.
[in]DeviceIdFor a PCI device, points to a USHORT-type value that identifies a particular PCI adapter model, assigned by the manufacturer. Otherwise, should be NULL.
[out]SlotPoints to a ULONG value that receives the logical slot / location of the adapter (bus-dependent). For a PCI adapter, Slot points to a PCI_SLOT_NUMBER structure that locates the adapter on the PCI bus.
Returns
  • NO_ERROR if the resources have been successfully claimed or released.
  • ERROR_INVALID_PARAMETER if an error or a conflict occurred.
  • ERROR_DEV_NOT_EXIST if the device is not found.
  • ERROR_MORE_DATA if there exist more device access ranges available than what is specified by NumAccessRanges.
  • ERROR_NOT_ENOUGH_MEMORY if there is not enough memory available.

Definition at line 636 of file resource.c.

646{
647 PCI_SLOT_NUMBER PciSlotNumber;
649 ULONG FunctionNumber;
653 UINT AssignedCount = 0;
656 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
658 USHORT VendorIdToFind;
659 USHORT DeviceIdToFind;
661 PVIDEO_ACCESS_RANGE LegacyAccessRanges;
662 ULONG LegacyAccessRangeCount;
664 ULONG ListSize;
666 BOOLEAN DeviceAndVendorFound = FALSE;
667
668 TRACE_(VIDEOPRT, "VideoPortGetAccessRanges(%d, %p, %d, %p)\n",
669 NumRequestedResources, RequestedResources, NumAccessRanges, AccessRanges);
670
671 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
672 DriverObject = DeviceExtension->DriverObject;
674
675 if (NumRequestedResources == 0)
676 {
677 AllocatedResources = DeviceExtension->AllocatedResources;
678 if (AllocatedResources == NULL &&
679 DeviceExtension->AdapterInterfaceType == PCIBus)
680 {
681 if (DeviceExtension->PhysicalDeviceObject != NULL)
682 {
683 PciSlotNumber.u.AsULONG = DeviceExtension->SystemIoSlotNumber;
684
686 DeviceExtension->SystemIoBusNumber,
687 PciSlotNumber.u.AsULONG,
688 &Config,
689 sizeof(Config));
690
691 if (ReturnedLength != sizeof(Config))
692 {
694 }
695 }
696 else
697 {
698 VendorIdToFind = VendorId != NULL ? *(PUSHORT)VendorId : 0;
699 DeviceIdToFind = DeviceId != NULL ? *(PUSHORT)DeviceId : 0;
700
701 if (VendorIdToFind == 0 && DeviceIdToFind == 0)
702 {
703 /* We're screwed */
704 return ERROR_DEV_NOT_EXIST;
705 }
706
707 INFO_(VIDEOPRT, "Looking for VendorId 0x%04x DeviceId 0x%04x\n",
708 VendorIdToFind, DeviceIdToFind);
709
710 /*
711 * Search for the device id and vendor id on this bus.
712 */
713 PciSlotNumber.u.bits.Reserved = 0;
715 {
716 PciSlotNumber.u.bits.DeviceNumber = DeviceNumber;
717 for (FunctionNumber = 0; FunctionNumber < PCI_MAX_FUNCTION; FunctionNumber++)
718 {
719 INFO_(VIDEOPRT, "- Function number: %d\n", FunctionNumber);
720 PciSlotNumber.u.bits.FunctionNumber = FunctionNumber;
722 DeviceExtension->SystemIoBusNumber,
723 PciSlotNumber.u.AsULONG,
724 &Config,
725 sizeof(Config));
726
727 INFO_(VIDEOPRT, "- Length of data: %x\n", ReturnedLength);
728
729 if (ReturnedLength == sizeof(Config))
730 {
731 INFO_(VIDEOPRT, "- Slot 0x%02x (Device %d Function %d) VendorId 0x%04x "
732 "DeviceId 0x%04x\n",
733 PciSlotNumber.u.AsULONG,
734 PciSlotNumber.u.bits.DeviceNumber,
735 PciSlotNumber.u.bits.FunctionNumber,
736 Config.VendorID,
737 Config.DeviceID);
738
739 if ((VendorIdToFind == 0 || Config.VendorID == VendorIdToFind) &&
740 (DeviceIdToFind == 0 || Config.DeviceID == DeviceIdToFind))
741 {
742 DeviceAndVendorFound = TRUE;
743 break;
744 }
745 }
746 }
747 if (DeviceAndVendorFound)
748 break;
749 }
750 if (FunctionNumber == PCI_MAX_FUNCTION)
751 {
752 WARN_(VIDEOPRT, "Didn't find device.\n");
753 return ERROR_DEV_NOT_EXIST;
754 }
755 }
756
757 Status = HalAssignSlotResources(&DeviceExtension->RegistryPath,
758 NULL,
759 DeviceExtension->DriverObject,
760 DeviceExtension->DriverObject->DeviceObject,
761 DeviceExtension->AdapterInterfaceType,
762 DeviceExtension->SystemIoBusNumber,
763 PciSlotNumber.u.AsULONG,
765 if (!NT_SUCCESS(Status))
766 {
767 WARN_(VIDEOPRT, "HalAssignSlotResources failed with status %x.\n",Status);
768 return Status;
769 }
770 DeviceExtension->AllocatedResources = AllocatedResources;
771 DeviceExtension->SystemIoSlotNumber = PciSlotNumber.u.AsULONG;
772
773 /* Add legacy resources to the resources from HAL */
775 &LegacyAccessRanges, &LegacyAccessRangeCount);
776 if (!NT_SUCCESS(Status))
777 return ERROR_DEV_NOT_EXIST;
778
779 if (NumAccessRanges < LegacyAccessRangeCount)
780 {
781 ERR_(VIDEOPRT, "Too many legacy access ranges found\n");
782 return ERROR_NOT_ENOUGH_MEMORY; // ERROR_MORE_DATA;
783 }
784
785 RtlCopyMemory(AccessRanges, LegacyAccessRanges, LegacyAccessRangeCount * sizeof(VIDEO_ACCESS_RANGE));
786 AssignedCount = LegacyAccessRangeCount;
787 }
788 }
789 else
790 {
791 ListSize = sizeof(IO_RESOURCE_REQUIREMENTS_LIST) + (NumRequestedResources - 1) * sizeof(IO_RESOURCE_DESCRIPTOR);
792 ResReqList = ExAllocatePool(NonPagedPool, ListSize);
793 if (!ResReqList)
795
796 ResReqList->ListSize = ListSize;
797 ResReqList->InterfaceType = DeviceExtension->AdapterInterfaceType;
798 ResReqList->BusNumber = DeviceExtension->SystemIoBusNumber;
799 ResReqList->SlotNumber = DeviceExtension->SystemIoSlotNumber;
800 ResReqList->AlternativeLists = 1;
801 ResReqList->List[0].Version = 1;
802 ResReqList->List[0].Revision = 1;
803 ResReqList->List[0].Count = NumRequestedResources;
804
805 /* Copy in the caller's resource list */
806 RtlCopyMemory(ResReqList->List[0].Descriptors,
807 RequestedResources,
808 NumRequestedResources * sizeof(IO_RESOURCE_DESCRIPTOR));
809
810 Status = IoAssignResources(&DeviceExtension->RegistryPath,
811 NULL,
812 DeviceExtension->DriverObject,
813 DeviceExtension->PhysicalDeviceObject ?
814 DeviceExtension->PhysicalDeviceObject :
815 DeviceExtension->DriverObject->DeviceObject,
816 ResReqList,
818
819 if (!NT_SUCCESS(Status))
820 return Status;
821
822 if (!DeviceExtension->AllocatedResources)
823 DeviceExtension->AllocatedResources = AllocatedResources;
824 }
825
828
829 /* Return the slot number if the caller wants it */
830 if (Slot != NULL) *Slot = DeviceExtension->SystemIoBusNumber;
831
832 FullList = AllocatedResources->List;
833 ASSERT(AllocatedResources->Count == 1);
834 INFO_(VIDEOPRT, "InterfaceType %u BusNumber List %u Device BusNumber %u Version %u Revision %u\n",
835 FullList->InterfaceType, FullList->BusNumber, DeviceExtension->SystemIoBusNumber,
837
838 ASSERT(FullList->InterfaceType == PCIBus);
839 ASSERT(FullList->BusNumber == DeviceExtension->SystemIoBusNumber);
840 ASSERT(1 == FullList->PartialResourceList.Version);
841 ASSERT(1 == FullList->PartialResourceList.Revision);
842
844 Descriptor < FullList->PartialResourceList.PartialDescriptors + FullList->PartialResourceList.Count;
845 Descriptor++)
846 {
847 if ((Descriptor->Type == CmResourceTypeMemory ||
848 Descriptor->Type == CmResourceTypePort) &&
849 AssignedCount >= NumAccessRanges)
850 {
851 ERR_(VIDEOPRT, "Too many access ranges found\n");
852 return ERROR_MORE_DATA;
853 }
854 else if (Descriptor->Type == CmResourceTypeMemory)
855 {
856 INFO_(VIDEOPRT, "Memory range starting at 0x%08x length 0x%08x\n",
857 Descriptor->u.Memory.Start.u.LowPart, Descriptor->u.Memory.Length);
858 AccessRanges[AssignedCount].RangeStart = Descriptor->u.Memory.Start;
859 AccessRanges[AssignedCount].RangeLength = Descriptor->u.Memory.Length;
860 AccessRanges[AssignedCount].RangeInIoSpace = 0;
861 AccessRanges[AssignedCount].RangeVisible = 0; /* FIXME: Just guessing */
862 AccessRanges[AssignedCount].RangeShareable =
863 (Descriptor->ShareDisposition == CmResourceShareShared);
864 AccessRanges[AssignedCount].RangePassive = 0;
865 AssignedCount++;
866 }
867 else if (Descriptor->Type == CmResourceTypePort)
868 {
869 INFO_(VIDEOPRT, "Port range starting at 0x%04x length %d\n",
870 Descriptor->u.Port.Start.u.LowPart, Descriptor->u.Port.Length);
871 AccessRanges[AssignedCount].RangeStart = Descriptor->u.Port.Start;
872 AccessRanges[AssignedCount].RangeLength = Descriptor->u.Port.Length;
873 AccessRanges[AssignedCount].RangeInIoSpace = 1;
874 AccessRanges[AssignedCount].RangeVisible = 0; /* FIXME: Just guessing */
875 AccessRanges[AssignedCount].RangeShareable =
876 (Descriptor->ShareDisposition == CmResourceShareShared);
877 AccessRanges[AssignedCount].RangePassive = 0;
879 AccessRanges[AssignedCount].RangePassive |= VIDEO_RANGE_10_BIT_DECODE;
881 AccessRanges[AssignedCount].RangePassive |= VIDEO_RANGE_PASSIVE_DECODE;
882 AssignedCount++;
883 }
884 else if (Descriptor->Type == CmResourceTypeInterrupt)
885 {
886 DeviceExtension->InterruptLevel = Descriptor->u.Interrupt.Level;
887 DeviceExtension->InterruptVector = Descriptor->u.Interrupt.Vector;
888 if (Descriptor->ShareDisposition == CmResourceShareShared)
889 DeviceExtension->InterruptShared = TRUE;
890 else
891 DeviceExtension->InterruptShared = FALSE;
892 }
893 // else if (Descriptor->Type == CmResourceTypeDma) // TODO!
894 else
895 {
896 ASSERT(FALSE);
898 }
899 }
900
901 return NO_ERROR;
902}
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:188
_In_ PCHAR _In_ ULONG DeviceNumber
Definition: classpnp.h:1230
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
NTHALAPI NTSTATUS NTAPI HalAssignSlotResources(PUNICODE_STRING, PUNICODE_STRING, PDRIVER_OBJECT, PDEVICE_OBJECT, INTERFACE_TYPE, ULONG, ULONG, PCM_RESOURCE_LIST *)
NTHALAPI ULONG NTAPI HalGetBusData(BUS_DATA_TYPE, ULONG, ULONG, PVOID, ULONG)
#define CmResourceTypeMemory
Definition: hwresource.cpp:125
@ PCIBus
Definition: hwresource.cpp:142
#define CmResourceTypePort
Definition: hwresource.cpp:123
#define CmResourceTypeInterrupt
Definition: hwresource.cpp:124
NTSTATUS NTAPI IoAssignResources(_In_ PUNICODE_STRING RegistryPath, _In_opt_ PUNICODE_STRING DriverClassName, _In_ PDRIVER_OBJECT DriverObject, _In_opt_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources, _Inout_ PCM_RESOURCE_LIST *AllocatedResources)
Definition: iorsrce.c:1134
unsigned int UINT
Definition: ndis.h:50
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PCM_RESOURCE_LIST * AllocatedResources
Definition: ndis.h:4643
#define CM_RESOURCE_PORT_PASSIVE_DECODE
Definition: cmtypes.h:114
#define CM_RESOURCE_PORT_10_BIT_DECODE
Definition: cmtypes.h:110
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
Definition: driver.c:1904
PPCI_DRIVER_EXTENSION DriverExtension
Definition: pci.c:31
unsigned short USHORT
Definition: pedump.c:61
@ PCIConfiguration
Definition: miniport.h:93
struct _IO_RESOURCE_DESCRIPTOR IO_RESOURCE_DESCRIPTOR
#define VIDEO_RANGE_10_BIT_DECODE
Definition: video.h:99
#define VIDEO_RANGE_PASSIVE_DECODE
Definition: video.h:98
#define INFO_(ch,...)
Definition: debug.h:159
#define ERR_(ch,...)
Definition: debug.h:156
CM_PARTIAL_RESOURCE_LIST PartialResourceList
Definition: hwresource.cpp:160
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
Definition: hwresource.cpp:119
PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:2277
IO_RESOURCE_DESCRIPTOR Descriptors[1]
Definition: iotypes.h:2737
INTERFACE_TYPE InterfaceType
Definition: iotypes.h:2742
IO_RESOURCE_LIST List[1]
Definition: iotypes.h:2747
struct _PCI_SLOT_NUMBER::@4018::@4019 bits
union _PCI_SLOT_NUMBER::@4018 u
PCM_RESOURCE_LIST AllocatedResources
Definition: videoprt.h:94
INTERFACE_TYPE AdapterInterfaceType
Definition: videoprt.h:98
UNICODE_STRING RegistryPath
Definition: videoprt.h:90
uint16_t * PUSHORT
Definition: typedefs.h:56
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:476
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:342
NTSTATUS NTAPI IntVideoPortGetLegacyResources(IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, OUT PVIDEO_ACCESS_RANGE *AccessRanges, OUT PULONG AccessRangeCount)
Definition: resource.c:40
@ CmResourceShareShared
Definition: cmtypes.h:243
#define PCI_MAX_FUNCTION
Definition: iotypes.h:3599
#define PCI_MAX_DEVICES
Definition: iotypes.h:3598
struct _IO_RESOURCE_REQUIREMENTS_LIST IO_RESOURCE_REQUIREMENTS_LIST

Referenced by BochsFindAdapter(), and XboxVmpFindAdapter().

◆ VideoPortGetAssociatedDeviceExtension()

VPAPI PVOID NTAPI VideoPortGetAssociatedDeviceExtension ( IN PVOID  DeviceObject)

Definition at line 1533 of file videoprt.c.

1535{
1536 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1537
1538 TRACE_(VIDEOPRT, "VideoPortGetAssociatedDeviceExtension\n");
1539 DeviceExtension = ((PDEVICE_OBJECT)DeviceObject)->DeviceExtension;
1540 if (!DeviceExtension)
1541 return NULL;
1542 return DeviceExtension->MiniPortDeviceExtension;
1543}
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:409

◆ VideoPortGetCurrentIrql()

VPAPI UCHAR NTAPI VideoPortGetCurrentIrql ( VOID  )

Definition at line 989 of file videoprt.c.

990{
991 return KeGetCurrentIrql();
992}
#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 487 of file resource.c.

492{
493 TRACE_(VIDEOPRT, "VideoPortGetDeviceBase\n");
495 VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension),
496 IoAddress,
497 NumberOfUchars,
498 InIoSpace,
499 NULL,
500 NULL);
501}
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:280

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 1028 of file resource.c.

1033{
1034 TRACE_(VIDEOPRT, "VideoPortGetDeviceData\n");
1037}

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
#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 1030 of file videoprt.c.

1036{
1039 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1041
1042 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1043
1044 TRACE_(VIDEOPRT, "VideoPortGetRegistryParameters ParameterName %S, RegPath: %wZ\n",
1045 ParameterName, &DeviceExtension->RegistryPath);
1046
1047 Context.HwDeviceExtension = HwDeviceExtension;
1048 Context.HwContext = HwContext;
1049 Context.HwGetRegistryRoutine = GetRegistryRoutine;
1050
1054
1056 DeviceExtension->RegistryPath.Buffer,
1057 QueryTable,
1058 &Context,
1059 NULL);
1060 if (!NT_SUCCESS(Status))
1061 {
1062 WARN_(VIDEOPRT, "VideoPortGetRegistryParameters could not find the "
1063 "requested parameter\n");
1065 }
1066
1067 if (IsParameterFileName)
1068 {
1069 /* FIXME: need to read the contents of the file */
1071 }
1072
1073 return NO_ERROR;
1074}
_In_opt_ PWSTR _In_ PWSTR ParameterName
Definition: cdrom.h:961
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:4220
#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:907
PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine
Definition: nt_native.h:109
static NTSTATUS NTAPI QueryRegistryCallback(IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
Definition: videoprt.c:1004

◆ VideoPortGetRomImage()

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

Definition at line 1140 of file videoprt.c.

1145{
1146 static PVOID RomImageBuffer = NULL;
1147 PKPROCESS CallingProcess;
1149
1150 TRACE_(VIDEOPRT, "VideoPortGetRomImage(HwDeviceExtension 0x%X Length 0x%X)\n",
1151 HwDeviceExtension, Length);
1152
1153 /* If the length is zero then free the existing buffer. */
1154 if (Length == 0)
1155 {
1156 if (RomImageBuffer != NULL)
1157 {
1158 ExFreePool(RomImageBuffer);
1159 RomImageBuffer = NULL;
1160 }
1161 return NULL;
1162 }
1163 else
1164 {
1165 /*
1166 * The DDK says we shouldn't use the legacy C0000 method but get the
1167 * rom base address from the corresponding pci or acpi register but
1168 * lets ignore that and use C0000 anyway. We have already mapped the
1169 * bios area into memory so we'll copy from there.
1170 */
1171
1172 /* Copy the bios. */
1173 Length = min(Length, 0x10000);
1174 if (RomImageBuffer != NULL)
1175 {
1176 ExFreePool(RomImageBuffer);
1177 }
1178
1179 RomImageBuffer = ExAllocatePool(PagedPool, Length);
1180 if (RomImageBuffer == NULL)
1181 {
1182 return NULL;
1183 }
1184
1185 IntAttachToCSRSS(&CallingProcess, &ApcState);
1186 RtlCopyMemory(RomImageBuffer, (PUCHAR)0xC0000, Length);
1187 IntDetachFromCSRSS(&CallingProcess, &ApcState);
1188
1189 return RomImageBuffer;
1190 }
1191}
#define min(a, b)
Definition: monoChain.cc:55
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1765
unsigned char * PUCHAR
Definition: typedefs.h:53
VOID FASTCALL IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:588
VOID FASTCALL IntAttachToCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:575
KAPC_STATE
Definition: ketypes.h:1409

◆ VideoPortGetVersion()

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

Definition at line 1550 of file videoprt.c.

1553{
1555
1556 Version.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOEXW);
1557 if (VpOsVersionInfo->Size >= sizeof(VPOSVERSIONINFO))
1558 {
1559#if 1
1561 {
1562 VpOsVersionInfo->MajorVersion = Version.dwMajorVersion;
1563 VpOsVersionInfo->MinorVersion = Version.dwMinorVersion;
1564 VpOsVersionInfo->BuildNumber = Version.dwBuildNumber;
1565 VpOsVersionInfo->ServicePackMajor = Version.wServicePackMajor;
1566 VpOsVersionInfo->ServicePackMinor = Version.wServicePackMinor;
1567 return NO_ERROR;
1568 }
1570#else
1571 VpOsVersionInfo->MajorVersion = 5;
1572 VpOsVersionInfo->MinorVersion = 0;
1573 VpOsVersionInfo->BuildNumber = 2195;
1574 VpOsVersionInfo->ServicePackMajor = 4;
1575 VpOsVersionInfo->ServicePackMinor = 0;
1576 return NO_ERROR;
1577#endif
1578 }
1579
1581}
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 1112 of file videoprt.c.

1115{
1116 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
1117
1118 TRACE_(VIDEOPRT, "VideoPortGetVgaStatus\n");
1119
1120 DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
1122 {
1123 if (DeviceExtension->AdapterInterfaceType == PCIBus)
1124 {
1125 /* VgaStatus: 0 == VGA not enabled, 1 == VGA enabled. */
1126 /* Assumed for now */
1127 *VgaStatus = 1;
1128 return NO_ERROR;
1129 }
1130 }
1131
1133}
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693

◆ VideoPortInitialize()

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

Definition at line 740 of file videoprt.c.

745{
750 BOOLEAN PnpDriver = FALSE, LegacyDetection = FALSE;
751 static BOOLEAN FirstInitialization;
752
753 TRACE_(VIDEOPRT, "VideoPortInitialize\n");
754
755 if (!FirstInitialization)
756 {
757 FirstInitialization = TRUE;
761 }
762
763 /* As a first thing do parameter checks. */
764 if (HwInitializationData->HwInitDataSize > sizeof(VIDEO_HW_INITIALIZATION_DATA))
765 {
766 ERR_(VIDEOPRT, "Invalid HwInitializationData\n");
768 }
769
770 if ((HwInitializationData->HwFindAdapter == NULL) ||
771 (HwInitializationData->HwInitialize == NULL) ||
772 (HwInitializationData->HwStartIO == NULL))
773 {
774 ERR_(VIDEOPRT, "Invalid HwInitializationData\n");
776 }
777
778 switch (HwInitializationData->HwInitDataSize)
779 {
780 /*
781 * NT4 drivers are special case, because we must use legacy method
782 * of detection instead of the Plug & Play one.
783 */
785 INFO_(VIDEOPRT, "We were loaded by a Windows NT miniport driver.\n");
786 break;
787
789 INFO_(VIDEOPRT, "We were loaded by a Windows 2000 miniport driver.\n");
790 break;
791
792 case sizeof(VIDEO_HW_INITIALIZATION_DATA):
793 INFO_(VIDEOPRT, "We were loaded by a Windows XP or later miniport driver.\n");
794 break;
795
796 default:
797 ERR_(VIDEOPRT, "Invalid HwInitializationData size.\n");
798 return STATUS_UNSUCCESSFUL;
799 }
800
801 /* Set dispatching routines */
804 DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
806 DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] =
808 DriverObject->DriverUnload = IntVideoPortUnload;
809
810 /* Determine type of the miniport driver */
811 if ((HwInitializationData->HwInitDataSize >=
812 FIELD_OFFSET(VIDEO_HW_INITIALIZATION_DATA, HwQueryInterface)) &&
813 (HwInitializationData->HwSetPowerState != NULL) &&
814 (HwInitializationData->HwGetPowerState != NULL) &&
815 (HwInitializationData->HwGetVideoChildDescriptor != NULL))
816 {
817 INFO_(VIDEOPRT, "The miniport is a PnP miniport driver\n");
818 PnpDriver = TRUE;
819 }
820
821 /* Check if legacy detection should be applied */
822 if (!PnpDriver || HwContext)
823 {
824 INFO_(VIDEOPRT, "Legacy detection for adapter interface %d\n",
825 HwInitializationData->AdapterInterfaceType);
826
827 /* FIXME: Move the code for legacy detection
828 to another function and call it here */
829 LegacyDetection = TRUE;
830 }
831
832 /*
833 * NOTE:
834 * The driver extension can be already allocated in case that we were
835 * called by legacy driver and failed detecting device. Some miniport
836 * drivers in that case adjust parameters and call VideoPortInitialize
837 * again.
838 */
840 if (DriverExtension == NULL)
841 {
846 if (!NT_SUCCESS(Status))
847 {
848 ERR_(VIDEOPRT, "IoAllocateDriverObjectExtension failed 0x%x\n", Status);
849 return Status;
850 }
851
852 /*
853 * Save the registry path. This should be done only once even if
854 * VideoPortInitialize is called multiple times.
855 */
856 if (RegistryPath->Length != 0)
857 {
858 DriverExtension->RegistryPath.Length = 0;
859 DriverExtension->RegistryPath.MaximumLength =
860 RegistryPath->Length + sizeof(UNICODE_NULL);
861 DriverExtension->RegistryPath.Buffer =
863 PagedPool,
864 DriverExtension->RegistryPath.MaximumLength,
865 'RTSU');
866 if (DriverExtension->RegistryPath.Buffer == NULL)
867 {
870 }
871
873
874 /* There is a bug in Spice guest agent, which searches 'System' case-sensitively.
875 * Replace 'SYSTEM' by 'System' to fix that.
876 * Probably for similar reason, Windows also replaces 'MACHINE' by 'Machine'.
877 */
878 wcsncpy(wcsstr(DriverExtension->RegistryPath.Buffer, L"\\SYSTEM\\"), L"\\System\\", ARRAYSIZE(L"\\SYSTEM\\") - 1);
879 wcsncpy(wcsstr(DriverExtension->RegistryPath.Buffer, L"\\MACHINE\\"), L"\\Machine\\", ARRAYSIZE(L"\\MACHINE\\") - 1);
880
881 INFO_(VIDEOPRT, "RegistryPath: %wZ\n", &DriverExtension->RegistryPath);
882 }
883 else
884 {
886 }
887 }
888
889 /* Copy the correct miniport initialization data to the device extension. */
890 RtlCopyMemory(&DriverExtension->InitializationData,
892 HwInitializationData->HwInitDataSize);
893 if (HwInitializationData->HwInitDataSize <
895 {
896 RtlZeroMemory((PVOID)((ULONG_PTR)&DriverExtension->InitializationData +
897 HwInitializationData->HwInitDataSize),
899 HwInitializationData->HwInitDataSize);
900 }
901 DriverExtension->HwContext = HwContext;
902
903 /*
904 * Plug & Play drivers registers the device in AddDevice routine.
905 * For legacy drivers we must do it now.
906 */
907 if (LegacyDetection)
908 {
910
912 {
913 /* Power management */
915 }
916
919 NULL,
920 DriverExtension->InitializationData.StartingDeviceNumber,
921 0,
922 &DeviceObject);
923 if (!NT_SUCCESS(Status))
924 {
925 ERR_(VIDEOPRT, "IntVideoPortCreateAdapterDeviceObject returned 0x%x\n", Status);
926 return Status;
927 }
928
930 if (!NT_SUCCESS(Status))
931 ERR_(VIDEOPRT, "IntVideoPortFindAdapter returned 0x%x\n", Status);
932
933 return Status;
934 }
935 else
936 {
937 DriverObject->DriverExtension->AddDevice = IntVideoPortAddDevice;
941
942 return STATUS_SUCCESS;
943 }
944}
#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
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
Definition: driver.c:1826
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
#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:906
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 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:600
NTSTATUS NTAPI IntVideoPortFindAdapter(IN PDRIVER_OBJECT DriverObject, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PDEVICE_OBJECT DeviceObject)
Definition: videoprt.c:414
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 1738 of file videoprt.c.

1739{
1740 return VpNoVesa;
1741}
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 1099 of file resource.c.

1104{
1105 PMDL Mdl;
1106
1108 if (!Mdl)
1109 {
1110 return NULL;
1111 }
1112 /* FIXME use seh */
1114 return Mdl;
1115}
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 970 of file videoprt.c.

975{
977
978 INFO_(VIDEOPRT, "VideoPortLogError ErrorCode %d (0x%x) UniqueId %lu (0x%lx)\n",
979 ErrorCode, ErrorCode, UniqueId, UniqueId);
980 if (Vrp)
981 INFO_(VIDEOPRT, "Vrp->IoControlCode %lu (0x%lx)\n", Vrp->IoControlCode, Vrp->IoControlCode);
982}
_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 1664 of file videoprt.c.

1667{
1669
1670 TRACE_(VIDEOPRT, "VideoPortQueryPerformanceCounter\n");
1671 Result = KeQueryPerformanceCounter((PLARGE_INTEGER)PerformanceFrequency);
1672 return Result.QuadPart;
1673}
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