1.3 Physical Device Driver overview

OS/2 physical device drivers are 16 bit protected mode applications running in ring 0. They need to be reentrant and fast, because OS/2 is a multitasking system!



1.3.1 OS/2 supports two types of PDDs



1.3.2 Application to driver communication

Applications can only communicate with drivers by using the following kernel API functions:

The advantage in using the standard file API functions also for character DD's is, that redirection is possible for these devices too. The character DD's name is used as the filename for these functions.



1.3.3 PDD execution context

Each driver operates in three different contexts.



1.3.4 The Drivers Layout

Remember - PDD's are written in 16:16, protected mode addressing schema. The first segment needs to be the data segment. OS/2 expects a data structure at the very first position of a driver, called the "Device Driver Header". Because this is data, the first segment needs to be the data segment. Data which is accessed by the interrupt handler must reside in this segment.

The code segment follows directly after the data segment. Code for the interrupt handler must reside here!

The code for the INIT-mode could be placed at the end of the code segment. So it could be freed after running, because it only runs once!

Warpstock Europe 1999

Overview - Contents

back - forward