Important: |
---|
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. |
This function reserves system resources during NIC driver initialization for subsequent busmaster DMA operations.
NDIS_STATUS NdisMAllocateMapRegisters( IN NDIS_HANDLE MiniportAdapterHandle , IN UINT DmaChannel , IN BOOLEAN Dma32BitAddresses , IN ULONG PhysicalMapRegistersNeeded , IN ULONG MaximumPhysicalMapping );
Parameters
Return Values
NDIS_STATUS_SUCCESS indicates success. NDIS_STATUS_RESOURCES indicates that either the caller specified incompatible parameters when MiniportInitializecalled the NdisMSetAttributesExfunction or the requested number of map registers could not be allocated due to system resource constraints.
Remarks
Drivers of busmaster DMA NICs call this function from their MiniportInitializefunctions.
Such a driver's MiniportInitializefunction must call NdisMSetAttributesor NdisMSetAttributesExbefore it calls this function. It should call the NdisQueryMapRegisterCountfunction before calling this function as well.
The specified PhysicalMapRegistersNeededis constrained by one of the following:
Map registers are a limited system resource, so a miniport should never allocate more map registers than its NIC can use in a DMA transfer operation. The NdisQueryMapRegisterCountfunction returns the maximum number of map registers that can be allocated on the current platform for the type of I/O bus that the NIC uses. MiniportInitializeshould pass the minimum of the following values for PhysicalMapRegistersNeededto this function:
The map registers allocated with this function are implicitly numbered from 0 through ( PhysicalMapRegistersNeeded1). When calling the NdisMStartBufferPhysicalMappingfunction, the driver of a busmaster NIC specifies which map register to use in each call by specifying that map register's 0-based index.
The driver of a busmaster DMA NIC must call this function before it calls the NdisMAllocateSharedMemoryfunction.
Drivers of NICs that use PIO or the host DMA controller as slave devices do not call this function during initialization.
A driver that calls this function runs at IRQL PASSIVE_LEVEL.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Ndis.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
NdisMFreeMapRegisters, NdisMSetAttributes, NdisMSetAttributesEx, NdisQueryMapRegisterCount
Last updated on Tuesday, July 13, 2004