HwVidResetHw

BOOLEAN HwVidResetHw(

PVOID HwDeviceExtension,
ULONG Columns,
ULONG Rows
);

Any video miniport driver must have a HwVidResetHw function if its adapter cannot be reset to a fully initialized state without a hard boot of the machine. For example, if the adapter's ROM initialization code cannot reset the adapter state to a boot-up mode, the miniport must have a HwVidResetHw function.

Parameters

HwDeviceExtension

Points to the miniport's per-adapter storage area.

Columns

Specifies the number of columns of the mode to be set up.

Rows

Specifies the number of rows of the mode to be set up.

Return Value

HwVidResetHw should return TRUE if it completely reset the adapter to the given character mode. Otherwise, it should return FALSE to indicate that the HAL should perform the equivalent of an INT10, MODE3-type BIOS call after HwVidResetHw returns control.

Comments

The HAL calls HwVidResetHw if the system is about to crash, so that the HAL can display information on the screen while the system is being shut down. The HAL also calls HwVidResetHw just before the machine is rebooted when a soft boot occurs.

Most miniport drivers must provide this function, except for drivers of adapters that are reset to a VGA standard character mode on receipt of an INT10, MODE3-type command.

HwVidResetHw resets the adapter to character mode, according to the given Columns and Rows values. However, because the system is shutting down, HwVidResetHw cannot call the BIOS or any pageable code. HwVidResetHw should call only the VideoPortRead/WritePortXxx and/or VideoPortRead/WriteRegisterXxx functions.

If HwVidResetHw cannot change the mode of the adapter by simply programming the adapter registers, it can set up the appropriate values in adapter registers and return FALSE. This causes the HAL to perform an extended INT10-type operation to reset the video adapter to chararacter mode.

HwVidResetHw cannot and must not attempt to call VideoPortInt10. A miniport's HwVidStartIO function is called with the IOCTL_VIDEO_RESET_DEVICE VRP to reset the adapter whenever the Win32 video installation applet is used to test or change the graphics display mode, not the miniport's HwVidResetHw function.

See Also

HwVidInitialize, HwVidStartIO, IOCTL_VIDEO_RESET_DEVICE, VideoPortInt10, VideoPortReadXxx, VideoPortWriteXxx