Article View: comp.os.os2.programmer
Article #3197OS/2 Device Drivers
From: Jacques Morris
Date: Tue, 11 Jun 1991 21:08
Date: Tue, 11 Jun 1991 21:08
52 lines
2787 bytes
2787 bytes
I'm writing an interrupt-driven device driver for OS/2 and
have been stumped by a bug for a while.
I'm running OS/2 on a ALR 80386 EISA machine and I've reserved
interrupt level 7 for my device.
I'm using the Microsoft DDK with the debugger kernel os2krnl.170.
After installing this driver at boot time (without errors) I
issue a DosDevIOCtl() call with the device function parameter set
to 0x80. At this point the CPU (80386) generates an exception and
the debugger issues the message
Trap 8 - Double Exception Detected 0000
AX=0067 BX=E000 CX=03FF DX=0131 SP=007C BP=626F SI=014C DI=0000
IP=36C9 CS=0230 DS=0B58 ES=01A8 SS=1970 -- NV UP DI NG NZ NA PO CY
GDTR=110020 1B5F IDTR=11336E 03FF TR=0010 LDTR=0028 IOPL=1 MSW=PM EM TS
0230:36C9 1E PUSH DS
...processing then continues until a second exception occurs...
Trap 12 (0CH) - Stack Segment Overrun or Not Present 0000
AX=3848 BX=E024 CX=FFFE DX=002C SP=004E BP=0076 SI=1604 DI=002D
IP=002B CS=01F0 DS=01F8 ES=01F8 SS=1970 -- NV UP DI NG NZ NA PO CY
GDTR=110020 1B5F IDTR=11336E 03FF TR=0010 LDTR=0028 IOPL=3 MSW=PM EM TS
01F0:002B 36F6063EFF01 TEST BYTE PTR SS:[FF3E],01 SS:FF3E=INVALID
Continuing the processing at this point hangs the system and the
kernel issues the following message before dying:
The system detected an internal processing
error at location # 0230:0008
Now these exceptions seem to occur in the kernel so debugging is
difficult to say the least. If anyone has any ideas please let me know
by E-Mail. I would greatly appreciate it!
Thanks.
______________________________________________________________________
Jacques Morris E-Mail : jmorris@matrox.com
Software engineer Voice : (514) 685-7230 ext. 2319
Matrox Electronics Systems Fax : (514) 685-2853
Montreal, Canada Date : June 11th, 1991
______________________________________________________________________
The opinions expressed are not mine.
I found them somewhere, I swear.
______________________________________________________________________
Technical Details
Message-ID:
<1991Jun11.210803.9521@pandora.matrox.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!IRO.UMontreal.CA!matrox!matrox.com!imagine.matrox.com!jmorrisShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!IRO.UMontreal.CA!matrox!matrox.com!imagine.matrox.com!jmorris From: jmorris@imagine.matrox.com (Jacques Morris) Newsgroups: comp.os.os2.programmer Subject: OS/2 Device Drivers Summary: Double exception bug Message-ID: <1991Jun11.210803.9521@pandora.matrox.com> Date: 11 Jun 91 21:08:03 GMT Sender: news@pandora.matrox.com (Usenet Administration) Organization: Matrox Ltd. Lines: 52