Hai;
I am using MmAllocateContiguousMemorySpecifyCache() function to allocate
the memory. then i map that meory to user space by using function
ZwMapViewOfSection(). I build that driver, that driver is working is fine. I
put my pci cards in any pci slot it is working. Today i put that slot in pcix
slot in my pc. Then MmAllocateContiguousMemorySpecifyCache() functions
succeeds, but ZwMapViewOfSection() fails.I dont know what is the behaviour
happening.

I show my function code below.
MmAllocateContiguousMemorySpecifyCache
(numDescBytes, phyAddrLowRange,
phyAddrRange, phyAddrMultiple,
(MEMORY_CACHING_TYPE)MmCached);


ZwMapViewOfSection(physicalMemoryHandle,
(HANDLE) -1,
&(PVOID)virtualAddress,
0L,
2,
&viewBase,
&size,
ViewShare,
0,
PAGE_READWRITE | PAGE_NOCACHE );

I dont know why it is not working in pcix slot.Please tell me what are the
possibilities.

Re: problems while using MmAllocateContiguousMemorySpecifyCache by G

G
Wed Feb 08 09:04:06 CST 2006

Why can't you use the DMA Adapter through the PCI Device and use the
function pointers from the DMA Adapter for allocating the contiguous memory?

--Raj

"sudhakar" <sudhakar@discussions.microsoft.com> wrote in message
news:8D6976DF-CCDF-4735-A2AC-E27B79532D58@microsoft.com...
> Hai;
> I am using MmAllocateContiguousMemorySpecifyCache() function to allocate
> the memory. then i map that meory to user space by using function
> ZwMapViewOfSection(). I build that driver, that driver is working is fine.
> I
> put my pci cards in any pci slot it is working. Today i put that slot in
> pcix
> slot in my pc. Then MmAllocateContiguousMemorySpecifyCache() functions
> succeeds, but ZwMapViewOfSection() fails.I dont know what is the behaviour
> happening.
>
> I show my function code below.
> MmAllocateContiguousMemorySpecifyCache
> (numDescBytes, phyAddrLowRange,
> phyAddrRange, phyAddrMultiple,
> (MEMORY_CACHING_TYPE)MmCached);
>
>
> ZwMapViewOfSection(physicalMemoryHandle,
> (HANDLE) -1,
> &(PVOID)virtualAddress,
> 0L,
> 2,
> &viewBase,
> &size,
> ViewShare,
> 0,
> PAGE_READWRITE | PAGE_NOCACHE );
>
> I dont know why it is not working in pcix slot.Please tell me what are the
> possibilities.



Re: problems while using MmAllocateContiguousMemorySpecifyCache by Eliyas

Eliyas
Wed Feb 08 10:21:28 CST 2006

Raj is correct in that if you want the contiguous memory to be accessible by
your DMA engine then you should use AllocateCommonBuffer.

How did you create the section? My guess is that you are using ZwOpenSection
to open \Device\PhysicalMemory and then calling ZwMapViewOfSection with the
physical address provided by the Mm function. Correct? What is the error
ZwMapViewOfSection returns. My guess is that it returns
STATUS_CONFLICTING_ADDRESSES.

-Eliyas

"G.N.Raj" <gnraj@hotmail.com> wrote in message
news:%23RNDuCMLGHA.1288@TK2MSFTNGP09.phx.gbl...
> Why can't you use the DMA Adapter through the PCI Device and use the
> function pointers from the DMA Adapter for allocating the contiguous
> memory?
>
> --Raj
>
> "sudhakar" <sudhakar@discussions.microsoft.com> wrote in message
> news:8D6976DF-CCDF-4735-A2AC-E27B79532D58@microsoft.com...
>> Hai;
>> I am using MmAllocateContiguousMemorySpecifyCache() function to
>> allocate
>> the memory. then i map that meory to user space by using function
>> ZwMapViewOfSection(). I build that driver, that driver is working is
>> fine. I
>> put my pci cards in any pci slot it is working. Today i put that slot in
>> pcix
>> slot in my pc. Then MmAllocateContiguousMemorySpecifyCache() functions
>> succeeds, but ZwMapViewOfSection() fails.I dont know what is the
>> behaviour
>> happening.
>>
>> I show my function code below.
>> MmAllocateContiguousMemorySpecifyCache
>> (numDescBytes, phyAddrLowRange,
>> phyAddrRange, phyAddrMultiple,
>> (MEMORY_CACHING_TYPE)MmCached);
>>
>>
>> ZwMapViewOfSection(physicalMemoryHandle,
>> (HANDLE) -1,
>> &(PVOID)virtualAddress,
>> 0L,
>> 2,
>> &viewBase,
>> &size,
>> ViewShare,
>> 0,
>> PAGE_READWRITE | PAGE_NOCACHE );
>>
>> I dont know why it is not working in pcix slot.Please tell me what are
>> the
>> possibilities.
>
>



Re: problems while using MmAllocateContiguousMemorySpecifyCache by sudhakar

sudhakar
Wed Feb 08 23:45:27 CST 2006

Yes correct.In my pci card i am not using DMA concepts. so i am not using
AllocateCommonBuffer() for allocationg continous memory. In my situation i
want to create 10 different continous memory locations with specified
phyaddress low range, physical address high range, so we go for this
function, otherwise we go for MmAllocateContiguousMemory(). This code is
working when i put the pci card in all pci slots.If i put that card in PCIX
slot, that problem will come.I dont know why it is happening.If any problem
in all cpi slots that problem will reproduce. IT will not come in only in
pciX slot.

"Eliyas Yakub [MSFT]" wrote:

> Raj is correct in that if you want the contiguous memory to be accessible by
> your DMA engine then you should use AllocateCommonBuffer.
>
> How did you create the section? My guess is that you are using ZwOpenSection
> to open \Device\PhysicalMemory and then calling ZwMapViewOfSection with the
> physical address provided by the Mm function. Correct? What is the error
> ZwMapViewOfSection returns. My guess is that it returns
> STATUS_CONFLICTING_ADDRESSES.
>
> -Eliyas
>
> "G.N.Raj" <gnraj@hotmail.com> wrote in message
> news:%23RNDuCMLGHA.1288@TK2MSFTNGP09.phx.gbl...
> > Why can't you use the DMA Adapter through the PCI Device and use the
> > function pointers from the DMA Adapter for allocating the contiguous
> > memory?
> >
> > --Raj
> >
> > "sudhakar" <sudhakar@discussions.microsoft.com> wrote in message
> > news:8D6976DF-CCDF-4735-A2AC-E27B79532D58@microsoft.com...
> >> Hai;
> >> I am using MmAllocateContiguousMemorySpecifyCache() function to
> >> allocate
> >> the memory. then i map that meory to user space by using function
> >> ZwMapViewOfSection(). I build that driver, that driver is working is
> >> fine. I
> >> put my pci cards in any pci slot it is working. Today i put that slot in
> >> pcix
> >> slot in my pc. Then MmAllocateContiguousMemorySpecifyCache() functions
> >> succeeds, but ZwMapViewOfSection() fails.I dont know what is the
> >> behaviour
> >> happening.
> >>
> >> I show my function code below.
> >> MmAllocateContiguousMemorySpecifyCache
> >> (numDescBytes, phyAddrLowRange,
> >> phyAddrRange, phyAddrMultiple,
> >> (MEMORY_CACHING_TYPE)MmCached);
> >>
> >>
> >> ZwMapViewOfSection(physicalMemoryHandle,
> >> (HANDLE) -1,
> >> &(PVOID)virtualAddress,
> >> 0L,
> >> 2,
> >> &viewBase,
> >> &size,
> >> ViewShare,
> >> 0,
> >> PAGE_READWRITE | PAGE_NOCACHE );
> >>
> >> I dont know why it is not working in pcix slot.Please tell me what are
> >> the
> >> possibilities.
> >
> >
>
>
>

Re: problems while using MmAllocateContiguousMemorySpecifyCache by sudhakar

sudhakar
Wed Feb 08 23:47:27 CST 2006

In my pci cards i am not using any DMA concept.Then waht is that problem if i
put the card in PCI slot it is working fine, IF i put the card in PCIX slot
in same machine the problem arises. Virtual memory i s common for all the
slots. So There is no problem for using pci card in any slot.
I dont know what is the reason.



"G.N.Raj" wrote:

> Why can't you use the DMA Adapter through the PCI Device and use the
> function pointers from the DMA Adapter for allocating the contiguous memory?
>
> --Raj
>
> "sudhakar" <sudhakar@discussions.microsoft.com> wrote in message
> news:8D6976DF-CCDF-4735-A2AC-E27B79532D58@microsoft.com...
> > Hai;
> > I am using MmAllocateContiguousMemorySpecifyCache() function to allocate
> > the memory. then i map that meory to user space by using function
> > ZwMapViewOfSection(). I build that driver, that driver is working is fine.
> > I
> > put my pci cards in any pci slot it is working. Today i put that slot in
> > pcix
> > slot in my pc. Then MmAllocateContiguousMemorySpecifyCache() functions
> > succeeds, but ZwMapViewOfSection() fails.I dont know what is the behaviour
> > happening.
> >
> > I show my function code below.
> > MmAllocateContiguousMemorySpecifyCache
> > (numDescBytes, phyAddrLowRange,
> > phyAddrRange, phyAddrMultiple,
> > (MEMORY_CACHING_TYPE)MmCached);
> >
> >
> > ZwMapViewOfSection(physicalMemoryHandle,
> > (HANDLE) -1,
> > &(PVOID)virtualAddress,
> > 0L,
> > 2,
> > &viewBase,
> > &size,
> > ViewShare,
> > 0,
> > PAGE_READWRITE | PAGE_NOCACHE );
> >
> > I dont know why it is not working in pcix slot.Please tell me what are the
> > possibilities.
>
>
>

Re: problems while using MmAllocateContiguousMemorySpecifyCache by Maxim

Maxim
Thu Feb 09 10:55:06 CST 2006

> Yes correct.In my pci card i am not using DMA concepts

Then why do you care about physical addresses at all? Allocate noncontiguous
memory, this is simpler.

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