Microsoft KB Archive/101349

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 15:02, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


How DMA Devices Access Memory Greater than 16 MB

Article ID: 101349

Article Last Modified on 11/1/2006



APPLIES TO

  • Microsoft Windows NT Advanced Server 3.1
  • Microsoft Windows NT Workstation 3.1



This article was previously published under Q101349

SUMMARY

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: kbhardware KB101349