DASD, SCSI, and CD-ROM Device Manager Interface Specification

From EDM2
Jump to: navigation, search
Storage Device Driver Reference
  1. About This Book
  2. Introduction to DASD, SCSI, and CD-ROM Programming Interfaces
  3. Installation of OS/2, DASD, SCSI, and CD-ROM Device Drivers
  4. Adapter Device Driver Development Considerations
  5. DASD, SCSI, and CD-ROM Device Manager Interface Specification
  6. Error Handling
  7. Adapter Device Driver Command-Line Parameters
  8. DASD IOCtl Device Driver Test Tool
  9. Optical IOCtl Device Driver Test Tool
  10. Using Filter Device Drivers
  11. Library and Services
  12. CD-ROM Device Manager Interface Specification
  13. CD-ROM Device Driver Test Tool
  14. Building an OS/2 Virtual Disk Driver
  15. OS2DASD.DMD - Technical Reference
  16. Boot Record Architecture
  17. Extended Device Driver Interface Specification
  18. I/O Request Block - C Definitions
  19. OS/2 SCSI Device Driver Interface Specification
  20. Advanced SCSI Programming Interface (ASPI) OS/2 Specification
  21. Adapter Device Driver Interface Questions and Answers
  22. Device Driver Test Tool (DDTT)
  23. Glossary

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation


The IBM OS/2 2.0 (and later) DASD and SCSI device manager interface consists of direct call commands and Device Helper (DevHlp) services.

Direct Call Command Interface

All direct call commands are issued by the device managers (OS2DASD.DMD and OS2SCSI.DMD) or filter device drivers to an adapter device driver's registered entry point, with a global pointer to the Input/Output Request Block (IORB), as follows:

C Language Syntax
#include <iorb.h>
VOID (FAR * ADDEntryPoint) (piorb);
PIORB   piorb;        /* Far pointer to the IORB control block */
Assembly Language Syntax
#include <iorb.inc>
  ; ** ES:BX = IORB Pointer
  PUSH    es                                   ; IORB Segment
  PUSH    bx                                   ; IORB Offset
  CALL    dword ptr AddEntryPoint              ; Call adapter device driver
  ADD     sp, 4                                ; Clean-up stack
Results

The results of the command are returned in the IORB.

The following table categorizes and lists the direct call commands used for the DASD and SCSI device manager interface:

Command Type Commands
CONFIGURATION GET_DEVICE_TABLE
COMPLETE_INIT
UNIT_CONTROL ALLOCATE_UNIT
DEALLOCATE_UNIT
CHANGE_UNITINFO
GEOMETRY GET_MEDIA_GEOMETRY
SET_MEDIA_GEOMETRY
GET_DEVICE_GEOMETRY
SET_LOGICAL_GEOMETRY
EXECUTE_IO READ
READ_VERIFY
READ_PREFETCH
WRITE
WRITE_VERIFY
FORMAT FORMAT_MEDIA
FORMAT_TRACK
FORMAT_PROGRESS
UNIT_STATUS GET_UNIT_STATUS
CHANGELINE_STATE
GET_MEDIA_SENSE
GET_LOCK_STATUS
DEVICE_CONTROL ABORT
RESET
SUSPEND
RESUME
LOCK_MEDIA
UNLOCK_MEDIA
EJECT_MEDIA
ADAPTER_PASSTHRU EXECUTE_SCB
EXECUTE_CDB

DevHlp services introduced with the OS/2 2.0 operating system to support this strategy include:

  • RegisterDeviceClass
  • GetDOSVar

IORB Control Blocks

All direct call command control blocks are defined in the IBM-supplied IORB.H and IORB.INC Include files. (See #I/O Request Block - C Definitions.) The following sections, which desc