Shared memory

Dear All,

I want to create a general purpose kernel mode library that can allocate
physically contiguous memory which can be shared across pci bus. To my
understanding windows treat allocation of shared memory an action tightly
coupled to DMA operation. But here my purpose is not DMA. This library which
is successully written for Linux should provide two heterogenous processors
across the pci bus be able to share a memory space.

MmAllocateContiguousMemory() though can be used but then how do I get the
bus address for the other side ?

AllocateCommonBuffer requires a physical device object for the call to
IoGetDmaAdapter() but thats not there…since I want to create a general
purpose library.

Any comments here will be highly appreciated. Thanks a lot.

regards,
Hassan


Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Can I use MmGetPhysicalAddress to translate the address given by
MmAllocateContiguousMemory() and pass this address to my device on pci bus
?
Is it a valid approach ?

regards,
Hassan

On 09/11/01, ““Hassan I Khan” ” wrote:
> Dear All,
>
> I want to create a general purpose kernel mode library that can allocate
> physically contiguous memory which can be shared across pci bus. To my
> understanding windows treat allocation of shared memory an action tightly
> coupled to DMA operation. But here my purpose is not DMA. This library which
> is successully written for Linux should provide two heterogenous processors
> across the pci bus be able to share a memory space.
>
> MmAllocateContiguousMemory() though can be used but then how do I get the
> bus address for the other side ?
>
> AllocateCommonBuffer requires a physical device object for the call to
> IoGetDmaAdapter() but thats not there…since I want to create a general
> purpose library.
>
> Any comments here will be highly appreciated. Thanks a lot.
>
>
> regards,
> Hassan
>
>
>
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> —
> You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> AllocateCommonBuffer requires a physical device object for the call to

IoGetDmaAdapter() but thats not there…since I want to create a general
purpose library.

Nevertheless, this seems to be the only decent way.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com