Problem debugging driver during boot

Hi,
I have a driver that I created using Numega DriverWorks. This driver
should be identical on Win2k and WinXP, so I used the XP DDK with Target OS
set to Win2k.

The driver is for a pcmcia card. Everything works fine, except for one thing
on Win2k. If I boot with the card plug in, I got a blue screen. This doesn’t
happen on WinXP. If I boot with the card not plug in, and insert it when
Windows is started, everything is fine.

The error codes I got from the Blue Screen are 0x000000D1 (0x00000000,
0x00000002, 0x00000000, 0xBE7B568A).

Some it seems that I’m at IRQL 2 and that is too high
(DRIVER_IRQL_NOT_LESS_OR_EQUAL).

I tried to debug the driver with SoftICE during the boot process, but it’s
the first time I use SoftICE, so I’m not very good with it…

SoftICE breaks after writing my log for handle of IRP_MJ_POWER with minor
IRP_MN_SET_POWER. In that function, all I do, it’s write my log and return
STATUS_SUCCESS:

NTSTATUS MaxpcmDevice::OnDeviceSleep(KIrp I)
{
NTSTATUS status = STATUS_SUCCESS;

t << “Entering MaxpcmDevice::OnDeviceSleep\n”;

return status;

UNREFERENCED_PARAMETER(I);
}

The debugger gives me: Break due to Page Fault (0Eh). Fault=0000.

The assembler line is: CMP DWORD PTR [EAX], 00
EAX is 00000000 at that time.

If I it F8 (next line of code), I got the blue screen.

Anybody can help me with this?

Another strange thing, when I was writing this mail, I tried different
things and now the problem does not happen every time I boot, but it also
happen when I shutdown.

Thanks,
Michael

Michael Grimard
Software Developper
MAX Technologies

You didn’t say what version of DriverWorks you are using. There is a lot of
code that is invoked during processing of power requests. Numega does make
mistakes and you need to see where the problem exists. Load source using
the NMS file and add a hardbreakpoint protected with SEH, (I like INT 1),
making sure you tell SoftIce to handle the interrupt (i1here on). Load
SoftIce at boot. If you still have problems read the manuals and then call
Numega tech support.

----- Original Message -----
From: “Michael Grimard”
To: “NT Developers Interest List”
Sent: Friday, April 04, 2003 12:44 PM
Subject: [ntdev] Problem debugging driver during boot

Hi,
I have a driver that I created using Numega DriverWorks. This driver
should be identical on Win2k and WinXP, so I used the XP DDK with Target OS
set to Win2k.

The driver is for a pcmcia card. Everything works fine, except for one thing
on Win2k. If I boot with the card plug in, I got a blue screen. This doesn’t
happen on WinXP. If I boot with the card not plug in, and insert it when
Windows is started, everything is fine.

The error codes I got from the Blue Screen are 0x000000D1 (0x00000000,
0x00000002, 0x00000000, 0xBE7B568A).

Some it seems that I’m at IRQL 2 and that is too high
(DRIVER_IRQL_NOT_LESS_OR_EQUAL).

I tried to debug the driver with SoftICE during the boot process, but it’s
the first time I use SoftICE, so I’m not very good with it…

SoftICE breaks after writing my log for handle of IRP_MJ_POWER with minor
IRP_MN_SET_POWER. In that function, all I do, it’s write my log and return
STATUS_SUCCESS:

NTSTATUS MaxpcmDevice::OnDeviceSleep(KIrp I)
{
NTSTATUS status = STATUS_SUCCESS;

t << “Entering MaxpcmDevice::OnDeviceSleep\n”;

return status;

UNREFERENCED_PARAMETER(I);
}

The debugger gives me: Break due to Page Fault (0Eh). Fault=0000.

The assembler line is: CMP DWORD PTR [EAX], 00
EAX is 00000000 at that time.

If I it F8 (next line of code), I got the blue screen.

Anybody can help me with this?

Another strange thing, when I was writing this mail, I tried different
things and now the problem does not happen every time I boot, but it also
happen when I shutdown.

Thanks,
Michael

Michael Grimard
Software Developper
MAX Technologies


You are currently subscribed to ntdev as: xxxxx@yoshimuni.com
To unsubscribe send a blank email to xxxxx@lists.osr.com