VP_STATUS SvgaHwIoPortUlongString(
ULONG Context, | |
ULONG Port, | |
UCHAR AccessMode, | |
PULONG Data, | |
ULONG DataLength | |
); |
SvgaHwIoPortUlongString traps an I/O port range to which a full-screen MS-DOS application in an x86-based machine is sending a sequence of ULONG-sized data. Only miniport drivers of VGA-compatible SVGA adapters have SvgaHwIoPortXxx functions.
EMULATOR_READ_ACCESS
EMULATOR_WRITE_ACCESS
SvgaHwIoPortUlongString returns the final status of the operation.
SvgaHwIoPortUlongString will intercept any range access attempted by a full-screen MS-DOS application issuing either or both of the instructions REP OUTSD DX, ESI and REP INSD EDI, DX.
If the miniport driver enables the Port range for direct access by calling VideoSetTrappedEmulatorPorts, its SvgaHwIoPortUlongString function will not be called. Such an application then will have direct access to the I/O port range, unless the miniport driver disables the Port range with another call to VideoSetTrappedEmulatorPorts.
If an application-issued x86 INSD or OUTSD instruction(s) might affect the state of the VGA-compatible adapter sequencer register, miscellaneous output register, or any adapter-specific register and, thereby, cause the machine to hang, the miniport driver must not enable the port for direct access by calling VideoPortSetTrappedEmulatorPorts.
SvgaHwIoPortUlongString must buffer subsequent instructions from the application and check that none can hang the machine. If the application issues any sequence of instructions that might hang the machine, SvgaHwIoPortUlongString must discard the buffered instructions. Otherwise, it should output them, a ULONG at a time, to the specified, mapped I/O port.
EMULATOR_ACCESS_ENTRY, SvgaHwIoPortUlong, VIDEO_ACCESS_RANGE, VIDEO_PORT_CONFIG_INFO, VideoPortGetDeviceBase, VideoPortSetTrappedEmulatorPorts