NDIS-Supplied DMA-Related Functions (NDIS 5.1)

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

A miniport driver calls NDIS functions for direct memory access (DMA) operations between the host and the NIC. For example, miniport drivers allocate and manage virtual memory buffers in the host for DMA transfers. The following table summarizes functions provided by the NDIS Library that allow the drivers to allocate, construct, and inspect such buffers.

The following DMA-related functions are supplied by NDIS:

  • NdisMAllocateSharedMemory
    Allocates memory to be shared between the system and a bus-master DMA NIC. It is called during driver initialization at IRQL = PASSIVE_LEVEL.
  • NdisMCompleteBufferPhysicalMapping
    Releases the map registers used by a previous call to NdisMStartBufferPhysicalMapping for a bus-master DMA operation. Called only by drivers that call NdisMAllocateMapRegisters during DMA initialization.
  • NdisFlushBuffer
    Called by the driver before sending data to the NIC or transferring data from the NIC to ensure coherence between cache memory and host physical memory during bus-master DMA operations.
  • NdisMFreeMapRegisters
    Frees map registers for bus-master DMA that were previously allocated by NdisMAllocateMapRegisters.
  • NdisMFreeSharedMemory
    Frees memory that was previously allocated by NdisMAllocateSharedMemory or NdisMAllocateSharedMemoryAsync.
  • NdisMGetDmaAlignment
    Returns the alignment requirements of the DMA system for the NIC. A miniport driver can use this function to determine alignment requirements for DMA buffers that it allocates.
  • NdisMStartBufferPhysicalMapping
    Creates a physical address mapping for a bus-master DMA operation. Called only by drivers that call NdisMAllocateMapRegisters during DMA initialization.
  • NdisMUpdateSharedMemory
    This function is obsolete for Windows Vista and later.

    Ensures that data to be read from a shared memory region is up-to-date during bus-master DMA operations.

 

 

Send comments about this topic to Microsoft