Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Device Driver loading error on 2nd PCI card, WinXP SP1

Reply
Thread Tools Display Modes

Device Driver loading error on 2nd PCI card, WinXP SP1

 
 
Curtis Rubel
Guest
Posts: n/a

 
      05-11-2004
Hello,

We have a PCI memory card that is requesting 64MB of Memory Resource
space, along with a small amount, 256K of register access memory resources,
and a PCI interrupt resource. There is also a 1MB DMA CommonBuffer setup
for this device to use.

I am mapping the 64MB region into my driver space via the call:

pDevExt->local_sram_ptr =
MmMapIoSpace (pPartialDescriptorTranslated->u.Memory.Start,
pPartialDescriptorTranslated->u.Memory.Length,
MmNonCached);

Everything works fine if only one such card is installed into
the system. Driver verifier shows no abnormalities with the driver running,
all IOCTL calls tested, DMA testing passes ok as well. Even ran the driver
with /PAE enabled just to make sure the driver was PAE correctly aware.

When a 2nd card is installed the Add_Device routine runs successfully
and exits, however when the Start_Device routine is called the system
fails with a Bug(0x7E) error and never actually makes it into my
Start_Device handler. If I remove the MmMapIoSpace call for
the 64MB area the driver loads successfully on both cards. Obviously
the memory on the card is then not accessable.

I am suspecting that there is a memory resource problem causing this
issue, however I would not expect the system to crash. I would expect the
MmMapIoSpace call to return insufficient resources if there was a resource
problem as its supposed to do. But it never actually makes it into the
Start_Device routine to give me that error.

The WinNt4 version of our driver does not load successfully on
the 2nd PCI card either, but it does at least return an error and
does not crash the system.

Why can I not MmMap the 64MB of PCI address space into
my driver twice? I have set the SystemPages entry in the registry
to 0xffffffff as some posts suggest and it has no affect on the error.

Thank you,

Curtis Rubel
 
Reply With Quote
 
 
 
 
Curtis Rubel
Guest
Posts: n/a

 
      05-12-2004
I now have a stack dump to add to the description of the problem

FrameEBP RetEIP Symbol
F78DEA28 804EB3C1 EPRM!HandleStartDevice
[driver.cpp#738]
F78DEA5C 80576500 NTOSKRNL!IoBuildPartialMdl+00E3
F78DEA88 8057656F NTOSKRNL!IoReportResourceUsage+7814
F78DEAC8 804F1B92 NTOSKRNL!IoReportResourceUsage+7883
F78DEAE4 80575D53 NTOSKRNL!IoReportTargetDeviceChangeAsynchronis+04B E
F78DED2C 80576190 NTOSKRNL!IoReportResourceUsage+7067
F78DED54 804F22E0 NTOSKRNL!IoReportResourceUsage+74A4
F78DED7C 80528545 NTOSKRNL!IoReportTargetDeviceChangeAsynchronis+0C0 C
F78DEDAC 805B05C6 NTOSKRNL!ExQueueWorkItem+0191
F78DEDDC 80534DE6 NTOSKRNL!PsRemoveCreateThreadNotifyRoutine+01C0
00000000 00000000 NTOSKRNL!KiDispatchInterrupt+0706


(Curtis Rubel) wrote in message news:<. com>...
> Hello,
>
> We have a PCI memory card that is requesting 64MB of Memory Resource
> space, along with a small amount, 256K of register access memory resources,
> and a PCI interrupt resource. There is also a 1MB DMA CommonBuffer setup
> for this device to use.
>
> I am mapping the 64MB region into my driver space via the call:
>
> pDevExt->local_sram_ptr =
> MmMapIoSpace (pPartialDescriptorTranslated->u.Memory.Start,
> pPartialDescriptorTranslated->u.Memory.Length,
> MmNonCached);
>
> Everything works fine if only one such card is installed into
> the system. Driver verifier shows no abnormalities with the driver running,
> all IOCTL calls tested, DMA testing passes ok as well. Even ran the driver
> with /PAE enabled just to make sure the driver was PAE correctly aware.
>
> When a 2nd card is installed the Add_Device routine runs successfully
> and exits, however when the Start_Device routine is called the system
> fails with a Bug(0x7E) error and never actually makes it into my
> Start_Device handler. If I remove the MmMapIoSpace call for
> the 64MB area the driver loads successfully on both cards. Obviously
> the memory on the card is then not accessable.
>
> I am suspecting that there is a memory resource problem causing this
> issue, however I would not expect the system to crash. I would expect the
> MmMapIoSpace call to return insufficient resources if there was a resource
> problem as its supposed to do. But it never actually makes it into the
> Start_Device routine to give me that error.
>
> The WinNt4 version of our driver does not load successfully on
> the 2nd PCI card either, but it does at least return an error and
> does not crash the system.
>
> Why can I not MmMap the 64MB of PCI address space into
> my driver twice? I have set the SystemPages entry in the registry
> to 0xffffffff as some posts suggest and it has no affect on the error.
>
> Thank you,
>
> Curtis Rubel

 
Reply With Quote
 
Alexander Grigoriev
Guest
Posts: n/a

 
      05-12-2004
Are you sure your pPartialDescriptorTranslated is valid?

"Curtis Rubel" <> wrote in message
news: om...
> Hello,
>
> We have a PCI memory card that is requesting 64MB of Memory Resource
> space, along with a small amount, 256K of register access memory

resources,
> and a PCI interrupt resource. There is also a 1MB DMA CommonBuffer setup
> for this device to use.
>
> I am mapping the 64MB region into my driver space via the call:
>
> pDevExt->local_sram_ptr =
> MmMapIoSpace

(pPartialDescriptorTranslated->u.Memory.Start,
>

pPartialDescriptorTranslated->u.Memory.Length,
> MmNonCached);
>
> Everything works fine if only one such card is installed into
> the system. Driver verifier shows no abnormalities with the driver

running,
> all IOCTL calls tested, DMA testing passes ok as well. Even ran the

driver
> with /PAE enabled just to make sure the driver was PAE correctly aware.
>
> When a 2nd card is installed the Add_Device routine runs successfully
> and exits, however when the Start_Device routine is called the system
> fails with a Bug(0x7E) error and never actually makes it into my
> Start_Device handler. If I remove the MmMapIoSpace call for
> the 64MB area the driver loads successfully on both cards. Obviously
> the memory on the card is then not accessable.
>
> I am suspecting that there is a memory resource problem causing this
> issue, however I would not expect the system to crash. I would expect the
> MmMapIoSpace call to return insufficient resources if there was a resource
> problem as its supposed to do. But it never actually makes it into the
> Start_Device routine to give me that error.
>
> The WinNt4 version of our driver does not load successfully on
> the 2nd PCI card either, but it does at least return an error and
> does not crash the system.
>
> Why can I not MmMap the 64MB of PCI address space into
> my driver twice? I have set the SystemPages entry in the registry
> to 0xffffffff as some posts suggest and it has no affect on the error.
>
> Thank you,
>
> Curtis Rubel



 
Reply With Quote
 
Curtis Rubel
Guest
Posts: n/a

 
      05-13-2004


----- Alexander Grigoriev wrote: ----

Are you sure your pPartialDescriptorTranslated is valid

It looks to be valid. The length is accurate so I can onl
assume that the Start address is. I have checked the untranslate
address and it appears correct when comparing it to the data
from PCIVIEW

I managed to post this question twice somehow...I guess I wasn'
patient enough to wait for it to show up

I think we should close down this thread. The other on
is Driver getting Page Fault 0EH Fault=0000, only when 2 PCI cards present in system...


I have made some progress, but I am not sure why. I used the Driver Wizard tha
comes with Walter Oney's book and found that it would load successfully on bot
of my cards, even after I added the full resource discovery and allocation to th
shell it produced.

After looking at it the only difference was that the majority of the init. cod
was in a separate subroutine from the actual StartHandler. Same cod
just in a different subroutine. So I am a little confused as to why it woul
work that way, but I moved most of the init. code in my driver to a subroutin
and its loading ok with about 95% of the code back in. Strange behavio
unless there is a limit to the size of a drivers subroutine. I have quite a fe
lines of code in the init routine to get everything accomplished for this card

Thanks for taking the time to reply.

Curtis Rube


"Curtis Rubel" <> wrote in messag
news: om..
> Hello
>> We have a PCI memory card that is requesting 64MB of Memory Resourc

> space, along with a small amount, 256K of register access memor

resources
> and a PCI interrupt resource. There is also a 1MB DMA CommonBuffer setu
> for this device to use
>> I am mapping the 64MB region into my driver space via the call
>> pDevExt->local_sram_ptr

> MmMapIoSpac

(pPartialDescriptorTranslated->u.Memory.Start

pPartialDescriptorTranslated->u.Memory.Length
> MmNonCached)
>> Everything works fine if only one such card is installed int

> the system. Driver verifier shows no abnormalities with the drive

running
> all IOCTL calls tested, DMA testing passes ok as well. Even ran th

drive
> with /PAE enabled just to make sure the driver was PAE correctly aware
>> When a 2nd card is installed the Add_Device routine runs successfull

> and exits, however when the Start_Device routine is called the syste
> fails with a Bug(0x7E) error and never actually makes it into m
> Start_Device handler. If I remove the MmMapIoSpace call fo
> the 64MB area the driver loads successfully on both cards. Obviousl
> the memory on the card is then not accessable
>> I am suspecting that there is a memory resource problem causing thi

> issue, however I would not expect the system to crash. I would expect th
> MmMapIoSpace call to return insufficient resources if there was a resourc
> problem as its supposed to do. But it never actually makes it into th
> Start_Device routine to give me that error
>> The WinNt4 version of our driver does not load successfully o

> the 2nd PCI card either, but it does at least return an error an
> does not crash the system
>> Why can I not MmMap the 64MB of PCI address space int

> my driver twice? I have set the SystemPages entry in the registr
> to 0xffffffff as some posts suggest and it has no affect on the error
>> Thank you
>> Curtis Rube




 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No WMDC sync, due to "Windows mobile device" driver loading failure fpirou@hotmail.com Windows Vista Installation 0 03-01-2007 03:26 PM
Error loading driver of Realtek onboard sound AC97 ReMeE Windows Vista General Discussion 3 09-21-2006 03:44 AM
Loading an updated driver for the sound card johna1940 Windows Vista Performance 0 06-24-2006 04:59 AM
Writing storage device driver for a flash PCI card Long Ta Windows Vista Drivers 3 03-01-2004 10:26 PM
Driver for 6 COM ports device on one PCI card under WinNT 4.0 Harvey Windows Vista Drivers 0 09-19-2003 03:17 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59