VIDEO_PORT_CONFIG_INFO

typedef struct _VIDEO_PORT_CONFIG_INFO {

ULONG Length;

ULONG SystemIoBusNumber;

INTERFACE_TYPE AdapterInterfaceType;

ULONG BusInterruptLevel;

ULONG BusInterruptVector;

KINTERRUPT_MODE InterruptMode;

ULONG NumEmulatorAccessEntries;

PEMULATOR_ACCESS_ENTRY EmulatorAccessEntries;

ULONG EmulatorAccessEntriesContext;

PHYSICAL_ADDRESS VdmPhysicalVideoMemoryAddress;

ULONG VdmPhysicalVideoMemoryLength;

ULONG HardwareStateSize;

ULONG DmaChannel;

ULONG DmaPort;

UCHAR DmaShareable;

UCHAR InterruptShareable;

} VIDEO_PORT_CONFIG_INFO, *PVIDEO_PORT_CONFIG_INFO;

VIDEO_PORT_CONFIG_INFO contains bus-specific adapter configuration information. VideoPortInitialize allocates memory for and fills in as much information as it can in this structure before it calls the miniport driver's HwVidFindAdapter function. If the input structure describes an adapter that the miniport supports, HwVidFindAdapter fills all remaining relevant members of this structure.

This structure is used to set up the video hardware and to supply the port driver with configuration information. The port driver can then allocate necessary system resources for the miniport driver and its adapter.

Members

Length

Is the size in bytes of this structure. The port driver always initializes the Length member. In effect, its value indicates the version of VIDEO_PORT_CONFIG_INFO being used by the system. Because this structure might grow from one version of the system to the next, a miniport driver should check this member to determine whether it is at least the sizeof(VIDEO_PORT_CONFIG_INFO) that the miniport uses to configure its adapter.

SystemIoBusNumber

Specifies the system-assigned number of the I/O bus on which the miniport's adapter might be connected. The port driver always initializes this member.

AdapterInterfaceType

Specifies the type of bus interface. The video port driver always sets this member to the value passed in the VIDEO_HW_INITIALIZATION_DATA structure when the miniport's DriverEntry function called VideoPortInitialize.

BusInterruptLevel

This member is irrelevant if the video hardware does not generate interrupts, indicated by setting the HwInterrupt member in the VIDEO_HW_INITIALIZATION_DATA structure to NULL. Otherwise, it specifies the bus-relative IRQL that corresponds to the interrupt request on Isa or MicroChannel type buses. The preset default value for this member is zero. A miniport driver must supply the correct value if it handles interrupts for a video adapter on an Isa or MicroChannel type bus, or for a video adapter configured for level-sensitive interrupts on an Eisa type bus.

If a miniport driver's HwVidFindAdapter function finds that the video adapter does not generate interrupts or that it cannot determine a valid interrupt vector/level for the adapter, HwVidFindAdapter should set both BusInterruptLevel and BusInterruptVector to zero.

BusInterruptVector

This member is irrelevant if the video hardware does not generate interrupts, indicated by setting the HwInterrupt member in the VIDEO_HW_INITIALIZATION_DATA structure to NULL. Otherwise, it specifies the bus-relative vector used by the video hardware on I/O buses that use interrupt vectors, such as PCI buses. The preset default value for this member is zero.

If a miniport driver's HwVidFindAdapter function finds that the video adapter does not generate interrupts or that it cannot determine a valid interrupt vector/level for the adapter, HwVidFindAdapter should set both BusInterruptVector and BusInterruptLevel to zero.

InterruptMode

Indicates whether the video hardware uses Latched or LevelSensitive interrupts. The port driver initializes this member if it is relevant, but a miniport driver with an ISR should check that it contains the correct value and reset it if necessary.

NumEmulatorAccessEntries

This member and all subsequent members through HardwareStateSize are irrelevant to miniport drivers that do not declare themselves to be VGA-compatible miniport drivers on x86-based Windows NT platforms. For miniport drivers that do not support VGA-compatible SVGA adapters on x86-based machines, this member should be zero. Otherwise, it specifies the number of EMULATOR_ACCESS_RANGE-type elements in the following array.

EmulatorAccessEntries

Points to an array of emulator access ranges set up by the VGA-compatible miniport driver. Each emulator access range must be a proper subset of the miniport's VIDEO_ACCESS_RANGE-type array. Each element specifies a range of I/O ports to be hooked out by the V86 emulator and, possibly, monitored by a driver-supplied SvgaHwIoPortXxx function whenever an MS-DOS application, running full screen, attempts to write directly to the video adapter registers. Usually, this array describes all I/O port ranges in the corresponding access ranges array. If the miniport driver defines its array of emulator access entries statically in the driver itself, the port driver initializes this pointer to that array. If NumEmulatorAccessEntries is zero, this member is NULL.

EmulatorAccessEntriesContext

Specifies a value passed with each call to an SvgaHwIoPortXxx function described in the EmulatorAccessEntries array. Usually, a VGA-compatible miniport driver sets the value of this member to the HwDeviceExtension pointer, or to an offset within the device extension, so the miniport driver can maintain state, such as batched application-issued instructions, in its SvgaHwIoPortXxx functions.

VdmPhysicalVideoMemoryAddress

Specifies the base (mapped) logical address of a range of video memory to be mapped into a VDM's address space for x86 BIOS INT10 support. For miniport drivers that do not support VGA-compatible adapters on x86-based machines, this member should be NULL.

VdmPhysicalVideoMemoryLength

Specifies the size in bytes of the range be mapped into a VDM's address space for x86 BIOS support. For miniport drivers that do not support VGA-compatible adapters on x86-based machines, this member should be zero.

HardwareStateSize

Specifies the minimum size in bytes required to store hardware state information in response to an IOCTL_VIDEO_SAVE_HARDWARE_STATE request, which must be supported only by VGA-compatible miniport drivers on x86-based machines. The initialized value for this member is zero. A VGA-compatible miniport driver must set this member to the number of bytes it requires to hold saved adapter state.

DmaChannel

Is initialized to zero and should be left as is.

DmaPort

Is initialized to zero and should be left as is.

DmaShareable

Is initialized to zero and should be left as is.

InterruptShareable

If the miniport's device interrupts, this parameter should be set to zero if the interrupt cannot be shared with another device, or set to one if the interrupt can be shared. Otherwise, a miniport driver can ignore this member.

See Also

HwVidFindAdapter, IOCTL_VIDEO_SAVE_HARDWARE_STATE, VIDEO_ACCESS_RANGE, VIDEO_HW_INITIALIZATION_DATA, VideoPortGetAccessRanges, VideoPortGetDeviceBase, VideoPortGetDeviceData, VideoPortVerifyAccessRanges