Hi

We're developing a cardbus (dma master) NIC.

I'm allocating shared memory in the Ndis driver using
NdisMAllocateSahredMemory(). This call, gives me the virtuall address and
physicall adress of the buffer.

Now, How do I translate the returned physical address to a Bus logical
address,
which I can pass to my device.?

Or Can the physical address reurned by the NdisMAllocateSharedMemory()
be directly given to the dma master?

Can a dma master use the physical address and access the system memory
even if it has to go through PCI bridges.

Thanks inAdance.
~suu_n_soup

Re: NdisMAllocateSharedMemory, Bus logical address and Physical addre by Eliyas

Eliyas
Wed Feb 08 09:54:31 CST 2006

> Or Can the physical address reurned by the NdisMAllocateSharedMemory()
> be directly given to the dma master?
>

Yes.

> Can a dma master use the physical address and access the system memory
> even if it has to go through PCI bridges.
>

Yes. The doc should be updated to say Logical Address instead of Physical
address. If you read the NdisMAllocateSharedMemory, it does say the
following in the comment section:

"That is, a "physical" address range described by the value at
PhysicalAddress and Length can be a range of mapped logical addresses that
do not match the host physical addresses for the allocation in every
possible platform."

-Eliyas



Re: NdisMAllocateSharedMemory, Bus logical address and Physical addre by Maxim

Maxim
Wed Feb 08 19:43:15 CST 2006

> I'm allocating shared memory in the Ndis driver using
> NdisMAllocateSahredMemory(). This call, gives me the virtuall address and
> physicall adress of the buffer.

Being the wrapper around ->AllocateCommonBuffer, it returns the bus logical
address.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com