## Display Device Driver Reference for OS/2

[prev][next][parent][TOC]

### Adapter Configuration

This portion of the chapter specifies the requirements placed on the .PMI file by the video subsystem. It does not address the physical installation steps for an adapter, or the bus management, device enumeration, and conflict management employed by the operating system.

An adapter is defined by its Hardware section, which lists the type of bus, the default start address of the I/O and memory space, and alternative addresses for the I/O and memory space, as addressable by the CPU. The adapter is uniquely defined by its OEMString and Version strings.

There are two basic types of adapters:

those that support Plug and Play (PCI, PnP-ISA) and allow the device to define the resources and to be programmed dynamically to use the resources

those called Legacy hardware (MC-A, ISA, EISA), which use predefined system resources

There also are adapters that are configurable in terms of the memory range and that coexist with a Legacy VGA controller; these will be referred to as Configurable Legacy adapters. Another type of Configurable Legacy adapter can co-reside with properly configured instances of the same adapter, such as MC-A XGA*.

Three PMI sections, IdentifyAdapter, EnableController and DisableController , are used to identify, configure and enable video adapters in conjunction with any PnP configuration BIOS services available to the operating system' s configuration manager. The identification function verifies if hardware matching the OEMString description is present on the system. It does not verify if the configuration is set to the default Hardware values specified in the PMI file.

The primary functions of EnableController and DisableController are to control the sync generation for controllers sharing the sync generation function with a VGA chip. The secondary function of the EnableController is to provide configuration for the Configurable Legacy adapters and to verify if the configuration matches the passed hardware values for Static Legacy and PnP hardware.

For a static Legacy adapter, where the configuration is hard-wired, there is no need to declare its I/O and Memory base addresses, nor is there a need to declare its registers. The EnableController and DisableController should only ensure that the device acquires and relinquishes control over the sync generation. For coprocessors that co-reside with VGA chips, EnableController should disable VGA and enable the coprocessor. DisableController enables the VGA chips.

For a Configurable Legacy adapter, in which a configurable memory-mapped coprocessor co-resides with a hard-wired VGA controller, the MemoryIOAddress and memory-mapped registers of the coprocessor should be declared, not hardcoded. DisableController enables the VGA chip and EnableController configures and enables the coprocessor at the current MemoryIOAddress, if this can be done through software. If it cannot be done, the EnableController function should verify whether the hardware is configured for the passed MemoryIOAddress. If it is not so configured, the return code is set to reflect that situation.

In the case of Configurable Legacy adapters that can co-reside, the PortIO and MemoryIO addresses are used to provide addressability to different instances. The EnableController function verifies if the configuration for a particular instance is complete and, if not, completes it. For example, a user may have run the Reference diskette to configure 3 XGAs, so the instances are already configured in terms of their I/O space. However, the user may not have configured the Memory-mapped portion, which is required for the desktop driver. The PMI file's EnableController should complete the configuration.

For PnP adapters, the configuration is performed through the PnP BIOS, if such BIOS is available. If it is not available, the EnableController can be used to configure the controller as well as enable its sync generation. Consequently, DisableController disables the coprocessor and enables the sync generation by a co-residing VGA chip (if one exists). See [ EnableController] and [DisableController] in PMI Sections.