Tech Support > Microsoft Windows > Drivers > Questions about NDIS miniport driver - E100bex
Questions about NDIS miniport driver - E100bex
Posted by Zhou on May 2nd, 2005


Recently I read XPDDK's sample E100bex. I have two questions about the calls
of NdisMAllocateMapRegisters and NdisMAllocateSharedMemory in initialization
phase.

1) In SetupSharedAdapterMemory routine, it calls NdisMAllocateMapRegisters
to allocate map registers. By the default value,
Adapter->NumMapRegisters = Adapter->NumTbd = (Adapter->NumTcb *
Adapter->NumTbdPerTcb) = 16*8=128
and Adapter->MaxPhysicalMappings = MAXIMUM_ETHERNET_PACKET_SIZE = 1514.
So the total number of map register to be allcated is 128 * 2 = 256.
However, XPDDK's help says "NDIS imposes a limit of 64 map registers per
miniport driver."
I'm confused. I have no hardware device of e100bex, so I don't run it to
know the actual number of map registers.

2) I want to know the relationship between the number of map registers that
NdisMAllocatemapRegisters allocates and the length of shared memory that
NdisMAllocateSharedMemory allocates. In other words, does the number of map
registers limit the length of shared memory to be allocated subsequently.

Thanks
Zhou


Posted by Stephan Wolf [MVP] on May 3rd, 2005


I currently cannot verify #1 in detail. Be aware that map registers are
out of style for NDIS 5+ miniports. Please use the new scatter/gather
facility instead. See

"NdisMInitializeScatterGatherDma" in the DDK docs.

http://msdn.microsoft.com/library/en...ed4e43.xml.asp

"INFO: NdisQueryMapRegisterCount Is Obsolete on Windows 2000"
Microsoft Knowledge BAse Article Q253233
http://support.microsoft.com/default...;EN-US;Q253233

"INFO: NDIS Binary-Compatibility on Windows 98 and Windows 2000"
Microsoft Knowledge BAse Article Q198582
http://support.microsoft.com/default...;EN-US;Q198582

"Bus-Master DMA Device Initialization"

http://msdn.microsoft.com/library/en...91efac.xml.asp

See the DDK docs, samples and/or Google for more info.

Stephan
---
Zhou wrote:

Posted by Zhou on May 3rd, 2005


Thank you very much for providing so much information.
I'll read them carefully.


"Stephan Wolf [MVP]" <stewo68@hotmail.com> wrote in message
news:1115114375.414262.318390@o13g2000cwo.googlegr oups.com...
25-da4b-432a-a839-5b4bbaed4e43.xml.asp
-17e4-481b-9d3c-13a1d591efac.xml.asp