RE: [Newbie] Connecting Interrupt causes protection error

Hmmm… must be a WDM driver for 98 or ME or you wouldn’t be getting the
“NTKERN” message. You are not even close to doing the right thing here. You
need to re-read the ddk about configuring your device resources. Well all
righty, the ddk is only understandable if you know what it says to begin
with. So go get Walter Oney’s WDM book (Microsoft Press,) as it is very well
written indeed and just the thing if you are starting out.

You cannot invent vector or IRQL values to pass the IoConnectInterrupt. This
is why the ddk says:

"
Vector
Specifies the interrupt vector passed in the interrupt resource at
u.Interrupt.Vector.

Irql
Specifies the DIRQL passed in the interrupt resource at u.Interrupt.Level.

ProcessorEnableMask
Specifies the set of processors on which device interrupts can occur in this
platform. This value is passed in the interrupt resource at
u.Interrupt.Affinity.
"

For WDM drivers you are GIVEN THE CORRECT VALUES in your IRP_MN_START_DEVICE
handler. See the ddk doc for IRP_MN_START_DEVICE, you need to use the values
in Parameters.StartDevice.AllocatedResourcesTranslated rather than inventing
your own values.

Your INF file for your ISA device, if the device is NOT a PNP_ISA device, is
where you specify the bus interrupt levels the board supports. This is where
your knowledge that “I know that it needs IRQ 10 and 11” gets communicated
to the PnP mechanism of the operating system.

By the way, an affinity of zero would be requesting that the operating
system not allow ANY processor to service interrupt requests.

-----Original Message-----
From: Vasili Goutas [mailto:xxxxx@sensologic.de]
Sent: Monday, October 23, 2000 10:06 AM
To: NT Developers Interest List
Subject: [ntdev] [Newbie] Connecting Interrupt causes protection error

Hi,

I don’t understand why my IoConnectInterrupt call causes a protection
error.
This call seems to me error free.
ntStatus = IoConnectInterrupt(&pDeviceExtension->InterruptObjectOne,
(PKSERVICE_ROUTINE) OnInterruptOne,
(PVOID) pDeviceExtension,
&pDeviceExtension->IRQSpinLock,
0x72/*vectorOne*/,
DISPATCH_LEVEL + 1/*irqlOne*/,
DISPATCH_LEVEL + 1/*irqlOne*//*max(irqlOne, irqlTwo)*/,
Latched/*modeOne*/,
FALSE/*irqshareOne*/,
0/*affinityOne*/,
FALSE);
My card is a standard ISA without PnP functionality. I know that it
needs IRQ 10 and 11, so I defined
the vector 0x72 as IRQ10. I’m not sure about the affinity so I tried 0
and ~0, both get the same result.

On boottime I get the message
While initializing device NTKERN:
Windows protection error. You need to restart your computer.

Ideas?
TIA
Vasili


SensoLogic GmbH voice: +49
40 529567-40

Dipl. Ing. technische Informatik
Vasili Goutas fax: +49
40 529567-99

Hummelsb?tteler Steindamm 78a
22851 Norderstedt, Germany Software + Sensor Systems

e-mail: xxxxx@sensologic.de
internet: http://www.sensologic.de/


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)