Microsoft Windows CE 3.0  

DMA for Busmaster-DMA Network Adapters

This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

For busmaster-DMA network adapters, a Windows NT miniport calls a set of functions that consist of NdisQueryMapRegisters, NdisMAllocateMapRegisters, NdisMAllocateSharedMemory, NdisMFreeSharedMemory, NdisMStartBufferPhysicalMapping, and NdisMCompleteBufferPhysicalMappingto facilitate the DMA transfer. The Windows CE implementation of NDIS does not support these functions. However, driver developers can implement a functionality that supports DMA transfers directly in the miniport.

In Windows NT, a miniport generally transfers data that is received by a busmaster-DMA network adapter into device-accessible buffers within a shared memory block that is allocated by the miniport. The miniport calls the NdisMInidcateReceivePacketfunction to indicate the packet to the protocol. The miniport can reserve a shared memory block, too, as described in the preceding "Subordinate DMA Network Adapter" section.

To transfer packet data for a sendrequest, a Windows NT miniport first maps the virtual range that contains the data to the NdisMStartBufferPhysicalMappingfunction to obtain the mapped range of device-accessible addresses for use by its network adapter. The miniport then downloads the returned physical addresses to the network adapter. If the driver allocated cached memory, then the miniport calls the NdisFlushBufferand NdisMUpdateSharedMemoryfunctions. After it has downloaded the physical addresses to the network adapter, the miniport programs the network adapter for the transfer operation.

The network adapter indicates that the transfer operation has been completed, either by transmitting an interrupt or by a change of state that is discovered when the network adapter driver polls the MiniportTimerfunction. After the network adapter has completed the transfer operation, the miniport calls the NdisMCompleteBufferPhysicalMappingfunction, usually from the MiniportHandleInterruptfunction.

On Windows CE, a miniport can use the LockPages/ UnlockPagesfunctions, in place of the NdisMStartBufferPhysicalMappingand NdisMCompleteBufferPhysicalMappingNDIS functions, for mapping virtual addresses to physical address ranges

 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.