Required and Optional Miniport Routines
Every video miniport driver must have at least the following system-defined functions:
·DriverEntry to initialize the miniport driver
·HwVidFindAdapter to detect whether driver-supported video adapter(s) are in the machine, to claim hardware resources for supported video adapter(s) in the registry, and to set up communication with those adapter(s)
·HwVidInitialize, which is called in response to a request to open the adapter, to perform one-time initialization of the adapter for the corresponding display driver
·HwVidStartIO to begin processing for each incoming VRP
Depending on a given adapter’s features and on the driver designer, video miniport drivers also can or must have the following system-defined functions:
·HwVidQueryDeviceCallback and/or HwVidQueryNamedValueCallback to process configuration information stored in the registry, which are optional if the miniport’s HwVidFindAdapter function uses I/O bus-type-specific configuration information or driver-supplied defaults
·HwVidInterrupt to handle adapter-generated interrupts, which is required if the miniport’s adapter generates interrupts
·HwVidSynchronizeExecutionCallback for critical sections of code to be run at a higher than normal software or hardware priority (IRQL, with some device and system interrupts masked off), which is required if other miniport functions share state with a HwVidInterrupt function
·HwVidResetHw to reset the adapter to character mode so the HAL can display system shutdown information in case of a controlled shutdown (crash) of the machine and initialization information on a soft reboot of the machine, which is required unless the adapter’s registers can be automatically reset by an Int10
·HwVidTimer to be called periodically at approximately one-second intervals by the port driver, which is optional
·SvgaHwIoPortXxx functions in VGA-compatible SVGA miniport drivers to validate accesses to I/O ports by full-screen MS-DOS applications in x86-based machines. See VGA-Compatible Miniport’s SvgaHwIoPortXxx for more information.
Except for DriverEntry, this documentation uses pseudonames for standard miniport functions that suggest the required functionality of each. In other words, the name given to each standard miniport function, except DriverEntry, can be anything the miniport driver writer chooses.
The following sections describe the requirements for and functionality of each of these standard miniport driver functions.