## Input/Output Device Driver Reference

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

### BIOS Device Driver

When the APM Subsystem (APM.SYS PDD) loads (with either a /D option or a failed /B option) it attempts to locate and connect to a device driver implementation of APM BIOS. This connection is performed by issuing a DevHelp_AttachDD function call specifying a device name of "APMBIOS$". A successful function return provides APM.SYS with the protect-mode 16-bit IDC interface, which APM.SYS will treat as the standard APM BIOS protect- mode 16-bit connected interface. (See the OS/2 Required APM BIOS Functions defined in APM BIOS.) An APM BIOS Device Driver must be an OS/2 physical device driver (PDD) with a device name of "APMBIOS$" defined in the Device Driver Header.

There are some differences between the APM BIOS Device Driver implementation and the APM ROM BIOS implementation for supported APM BIOS interfaces. These differences are:

Protect-mode 16-bit interface is the only mode supported.

No protect-mode 16-bit connection request needed. It is the default interface mode as opposed to the real mode default of ROM BIOS implementations.

The Installation Check function will be issued in protect-mode 16-bit to determine BIOS driver capabilities. (As opposed to the real-mode definition for ROM BIOS implementations.)

All other calling conventions, register usage, and parameter definitions are preserved as defined by the Advanced Power Management Specification. The APM BIOS device driver interfaces are based upon the BIOS conventions rather than OS/2 IDC conventions. For instance, the APM BIOS device driver must set up its own DS register value when invoked rather than assuming it is done by the caller. All register values, except those identified as having return values, must be preserved across function request as is normal practice with BIOS requests.

It is quite probable that APM BIOS extensions implemented as device drivers will have accompanying user interface requirements for the added functions and features. The typical OEM APM BIOS Extension scenario includes:

The APM BIOS device driver, which exports user-defined generic IOCtls for GUI/application level interactions and emulates the APM 1.1 BIOS interface (by way of IDC) for the APM Subsystem interactions.

A dynamic link library (DLL), which provides the Options page for the Power object utilizing the user-defined IOCtls.

An installation program to copy the pieces into an OS/2 environment and form the execution linkages (such as device driver, Power object DLL subclassing, and so on).