## Physical Device Driver Reference

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

### Device Driver Data Segment

OS/2 2.1 recommends that an ABIOS device driver use its data segment to contain the ABIOS request blocks and data transfer buffers. The device driver data segment is located in memory. The operating system guarantees addressability to the data segment, regardless of the processor mode ( protected or real). The physical device driver assumes that the physical location of the device driver data segment will not move. This allows physical data transfers to take place to buffers within the data segment.

By using the data segment, the physical device driver can create logical addressability to these data areas (for ABIOS) in a mode-independent manner , and without interrupt disable time considerations. Physical data transfers to buffers outside of the device driver's data segment can take place if the buffer is locked. As an alternative method, if the buffer is passed on a DosRead or DosWrite file system call, the physical address can be converted to a GDT Selector and used in place of the virtual address. The file system guarantees to lock down any buffer passed on a DosRead or DosWrite API. Therefore, this alternative method increases performance by removing the need to double buffer the data.