IoConnectInterrupt crashes in Win2000 Checked build ?

Hi,

In my WDM for a PCI device, I am calling IoConnectInterrupt(), during
IRP_MN_START_DEVICE after I store the interrupt and memory addresses
obtained. But I get the BSOD with the error PAGE_FAULT_IN_NONPAGED_AREA (
Some address, 0, Some address, 0). But the same thing works in Win2000
release build. Does anyone have any idea ? This is what my
IoCOnnectInterrupt() call looks like,

Status = IoConnectInterrupt(
&(pDevExt->pIntObj),
Isr,
pDevExt,
NULL,
pDevExt->ulVector, pDevExt->IRQL, pDevExt->IRQL,
Latched,
FALSE,
pDevExt->Affinity,
FALSE );

As seen, I am not accessing nything other than the Device Extension
structure.
Any help appreciated.
Thanks in advance
MV


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

As soon as you registers, Isr() is probably being called due to some other
device’s interrupt. Try setting a breakpoint in Isr() and stepping through
it to the Bluescreen.

Timothy A. Johns — xxxxx@driverdev.com
Driver Development Corporation — 800.841.0092
Bring Up Your Hardware — Fast. www.driverdev.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of xxxxx@yahoo.com
Sent: Monday, May 21, 2001 4:29 PM
To: NT Developers Interest List
Subject: [ntdev] IoConnectInterrupt crashes in Win2000 Checked build ?

Hi,

In my WDM for a PCI device, I am calling IoConnectInterrupt(), during
IRP_MN_START_DEVICE after I store the interrupt and memory addresses
obtained. But I get the BSOD with the error PAGE_FAULT_IN_NONPAGED_AREA (
Some address, 0, Some address, 0). But the same thing works in Win2000
release build. Does anyone have any idea ? This is what my
IoCOnnectInterrupt() call looks like,

Status = IoConnectInterrupt(
&(pDevExt->pIntObj),
Isr,
pDevExt,
NULL,
pDevExt->ulVector, pDevExt->IRQL,
pDevExt->IRQL,
Latched,
FALSE,
pDevExt->Affinity,
FALSE );

As seen, I am not accessing nything other than the Device Extension
structure.
Any help appreciated.
Thanks in advance
MV


You are currently subscribed to ntdev as: xxxxx@driverdev.com
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

Hi,

Regarding the problem I faced earlier, I found out
something. Initially, I was making some driver
functions pagable by declaring
#ifdef ALLOC_PRAGMA
#pragma alloc_text(init, DriverEntry)
#pragma alloc_text(page, DriverUnload)
#pragma alloc_text(page, DispatchCreate)
#pragma alloc_text(page, DispatchClose)
#endif

If I declare the same functions as follows, I do not
crash in Win2k checked build.

#ifdef ALLOC_PRAGMA
#pragma alloc_text(INIT, DriverEntry)
#pragma alloc_text(PAGE, DriverUnload)
#pragma alloc_text(PAGE, DispatchCreate)
#pragma alloc_text(PAGE, DispatchClose)
#endif
Does anyone have any idea what is the difference
between page and PAGE and why I would be facing this
problem ??

Thanks for any help.
MV
— “Timothy A. Johns” wrote:
> As soon as you registers, Isr() is probably being
> called due to some other
> device’s interrupt. Try setting a breakpoint in
> Isr() and stepping through
> it to the Bluescreen.
>
> Timothy A. Johns — xxxxx@driverdev.com
> Driver Development Corporation — 800.841.0092
> Bring Up Your Hardware — Fast. www.driverdev.com
>
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com]On Behalf
> Of xxxxx@yahoo.com
> > Sent: Monday, May 21, 2001 4:29 PM
> > To: NT Developers Interest List
> > Subject: [ntdev] IoConnectInterrupt crashes in
> Win2000 Checked build ?
> >
> >
> > Hi,
> >
> > In my WDM for a PCI device, I am calling
> IoConnectInterrupt(), during
> > IRP_MN_START_DEVICE after I store the interrupt
> and memory addresses
> > obtained. But I get the BSOD with the error
> PAGE_FAULT_IN_NONPAGED_AREA (
> > Some address, 0, Some address, 0). But the same
> thing works in Win2000
> > release build. Does anyone have any idea ? This is
> what my
> > IoCOnnectInterrupt() call looks like,
> >
> > Status = IoConnectInterrupt(
> > &(pDevExt->pIntObj),
> > Isr,
> > pDevExt,
> > NULL,
> > pDevExt->ulVector, pDevExt->IRQL,
> > pDevExt->IRQL,
> > Latched,
> > FALSE,
> > pDevExt->Affinity,
> > FALSE );
> >
> > As seen, I am not accessing nything other than the
> Device Extension
> > structure.
> > Any help appreciated.
> > Thanks in advance
> > MV
> >
> > —
> > You are currently subscribed to ntdev as:
> xxxxx@driverdev.com
> > To unsubscribe send a blank email to
> leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.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

They’re just different code sections. PAGE code sections are paged at the
OS’s convenience, INIT code sections are discarded after execution. ‘page’
(not PAGE) code sections are not paged. You can use dumpbin mydriver.sys
/headers to check this - look at the ‘Flags’ for each section header.

This is likely not directly related to the problem you’re seeing. In this
specific case, I recommend commenting out all of those alloc_text() pragmas
at least until you’ve initially debugged your driver.

Although it’s not DIRECTLY related, and just for peace of mind, use dumpbin
to make sure you’re Isr() function exists in a nonpaged section. If it’s
not, that is indeed a likely cause of the bluescreen, then you just have to
determine why Isr() is getting put into that paged section…

-Tim

Timothy A. Johns — xxxxx@driverdev.com
Driver Development Corporation — 800.841.0092
Bring Up Your Hardware — Fast. www.driverdev.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of M V
Sent: Tuesday, May 22, 2001 12:19 PM
To: NT Developers Interest List
Subject: [ntdev] RE: IoConnectInterrupt crashes in Win2000 Checked build
?

Hi,

Regarding the problem I faced earlier, I found out
something. Initially, I was making some driver
functions pagable by declaring
#ifdef ALLOC_PRAGMA
#pragma alloc_text(init, DriverEntry)
#pragma alloc_text(page, DriverUnload)
#pragma alloc_text(page, DispatchCreate)
#pragma alloc_text(page, DispatchClose)
#endif

If I declare the same functions as follows, I do not
crash in Win2k checked build.

#ifdef ALLOC_PRAGMA
#pragma alloc_text(INIT, DriverEntry)
#pragma alloc_text(PAGE, DriverUnload)
#pragma alloc_text(PAGE, DispatchCreate)
#pragma alloc_text(PAGE, DispatchClose)
#endif
Does anyone have any idea what is the difference
between page and PAGE and why I would be facing this
problem ??

Thanks for any help.
MV
— “Timothy A. Johns” wrote:
> > As soon as you registers, Isr() is probably being
> > called due to some other
> > device’s interrupt. Try setting a breakpoint in
> > Isr() and stepping through
> > it to the Bluescreen.
> >
> > Timothy A. Johns — xxxxx@driverdev.com
> > Driver Development Corporation — 800.841.0092
> > Bring Up Your Hardware — Fast. www.driverdev.com
> >
> >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com]On Behalf
> > Of xxxxx@yahoo.com
> > > Sent: Monday, May 21, 2001 4:29 PM
> > > To: NT Developers Interest List
> > > Subject: [ntdev] IoConnectInterrupt crashes in
> > Win2000 Checked build ?
> > >
> > >
> > > Hi,
> > >
> > > In my WDM for a PCI device, I am calling
> > IoConnectInterrupt(), during
> > > IRP_MN_START_DEVICE after I store the interrupt
> > and memory addresses
> > > obtained. But I get the BSOD with the error
> > PAGE_FAULT_IN_NONPAGED_AREA (
> > > Some address, 0, Some address, 0). But the same
> > thing works in Win2000
> > > release build. Does anyone have any idea ? This is
> > what my
> > > IoCOnnectInterrupt() call looks like,
> > >
> > > Status = IoConnectInterrupt(
> > > &(pDevExt->pIntObj),
> > > Isr,
> > > pDevExt,
> > > NULL,
> > > pDevExt->ulVector, pDevExt->IRQL,
> > > pDevExt->IRQL,
> > > Latched,
> > > FALSE,
> > > pDevExt->Affinity,
> > > FALSE );
> > >
> > > As seen, I am not accessing nything other than the
> > Device Extension
> > > structure.
> > > Any help appreciated.
> > > Thanks in advance
> > > MV
> > >
> > > —
> > > You are currently subscribed to ntdev as:
> > xxxxx@driverdev.com
> > > To unsubscribe send a blank email to
> > leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> > >
> >
> >
> > —
> > You are currently subscribed to ntdev as:
> > xxxxx@yahoo.com
> > To unsubscribe send a blank email to
> leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>
> —
> You are currently subscribed to ntdev as: xxxxx@driverdev.com
> 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

> Does anyone have any idea what is the difference

between page and PAGE and why I would be facing this

“PAGE” is the correct way.
“page” is just bug which can lead to any strange things.

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