How DMA Devices Access Memory Greater than 16 MB

Last reviewed: May 5, 1997
Article ID: Q101349
The information in this article applies to:
  • Microsoft Windows NT operating system version 3.1
  • Microsoft Windows NT Advanced Server version 3.1

Enabling DMA devices to access memory beyond 16 MB is handled by the hardware abstraction layer (HAL). When Windows NT boots, the HAL reserves some memory in the lower 16 MB. When a DMA device initializes, it informs the HAL of its characteristics and limitations, such as only 24 address lines (maximum 16 MB of address space). Later, when the DMA device needs to do DMA, it requests the physical address of the buffer using the IoMapTransfer call. The HAL checks to see if this buffer is accessible to the device. If the buffer cannot be reached by the device the HAL uses one if its pages instead. If the operation is a write, then the data is copied from high memory to the lower memory. When the DMA device has completed the data transfer, it notifies the HAL using the IoFlushAdapterBuffers call. If the operation was a read, data is copied from low memory to high memory. Using this interface the driver never has to be concerned about where the memory is located.

A few additional notes: The buffer allocated by the HAL is contiguous so that it can also be used by devices that do not support scatter/gather such as floppy drives. The buffer is shared by all devices that need to use it and grows according to expected usage and memory size. Finally, the data is only copied when necessary.


Additional query words: prodnt
Keywords : kbhw nthw
Version : 3.1


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.