OS/2 Gets Device Support

by Steve Mastrianni

Included at Byte Magazine (cover story), November 1993 IBM finally makes it easy for hardware vendors to support OS/2

OS/2 Gets Device Support
Perhaps the most notable improvement in OS/2 2.1 over version 2.0 is the newer version's dramatically increased support for third-party expansion hardware. For example, for the first time ever, I'm able to run my ATI Graphics Ultra Plus in 1280- by 1024-pixel-resolution mode, with 256 colors. Users of S3-based video boards are reporting similar success. Admittedly, these drivers are in beta, but they will soon be generally available. By the time you read this, OS/2 will likely support most of the state-of-the-art video accelerator chip sets from companies such as S3, ATI, and Weitek. It will also claim support for non-SCSI CD-ROM drives, 24-bit color printers, scanners, touchscreens, and a host of other input and output devices. This situation is unusual for OS/2, to say the least. For most of its existence, the operating system has lacked meaningful support for third-party hardware. The major reason for this situation has been the lack of a DDK (device-driver toolkit) from IBM. OS/2 device drivers are difficult to write under the best of circumstances. Without samples, they are nearly impossible.

Driver History
When OS/2 2.0 was released, the only existing OS/2 device-driver toolkit was the Microsoft DDK, which Microsoft had already pulled from the market. Moreover, many things had changed in OS/2 2.0 that precluded the use of the Microsoft DDK with this new version. The kernel debugger, which was version-specific, was not able to work with OS/2 2.0. In addition, IBM replaced the Microsoft LADDR (Layered Device Driver) architecture with the ADD (Adapter Device Driver) architecture, and the Microsoft Strategy 2 disk driver interface was replaced by IBM's EDDI (Extended Disk Driver Interface).

Changes in DOS compatibility also affected device drivers. OS/2 1.x supported only one DOS session, in which the processor actually operated in real mode. OS/2 2.0, however, introduced multiple VDMs (virtual DOS machines), which allowed each DOS program to run in its own 1-MB memory space, completely unaware of any other running applications. These programs needed to have shared access to I/O devices even though they assumed that they had exclusive access to them. IBM's solution is the VDD, or virtual device driver, which arbitrates ownership of the device. The VDD has also virtualized the common system devices, such as the clock, the serial ports, and the DMA controller.

VDDs are 32-bit DLLs, which brought up yet another problem--namely, that there were no existing 32-bit compilers for OS/2 when version 2.0 shipped. IBM had used a Microsoft 32-bit compiler, but it could not distribute the compiler externally. As a result, developers were forced to write VDDs in assembly language or not at all.

The Turnaround
As a result of all these problems, device-driver support for OS/2 2.0 was nonexistent. Late in 1992, IBM finally realized that the lack of device support was hindering OS/2 2.0's success and would also hurt the expected success of OS/2 2.1. Under the direction of Lois Dimpfel, director of IBM's Personal Operating Systems division, a group was formed in Boca Raton to make enhanced device support a reality. The group consisted of device-driver experts from all parts of IBM. Dubbed the Worldwide Industry Hardware Support department, it was given a simple mission: do whatever was necessary to make enhanced OS/2 device support a reality.

The culmination of the IBM group's effort was the release of the first beta DDK in early 1993. To ensure that it received feedback from a large number of developers, IBM released the beta DDK for a nominal charge of $15. The DDK was available only on CD-ROM because of its size and complexity, and it included the previously unreleased 32-bit C compiler to make it possible to write VDDs in C.

The first commercial DDK was released a few months later. Dubbed the IBM Device Driver Sourcekit 1.0, the DDK contained more than 70 device-driver sources, as well as a large set of on-line documentation. Included were sources to the mouse, disk, CD-ROM, serial, printer, and floppy disk drivers, as well as a modest collection of device-driver test tools.

In July of this year, IBM held the first-ever IBM OS/2 Device Driver Conference. This conference was attended by more than 300 OS/2 device-driver developers. Today, drivers for all types of devices are at last beginning to appear, spurred on not only by the efforts of the Boca Raton team, but by the success of OS/2 2.1 as well. IBM has put OS/2 device support back on the right track.