Subject: Re: SSTO 1.3_ALPHA failure on Dell Latitude laptop
To: None <rvb@sicily.odyssey.cs.cmu.edu>
From: None <Havard.Eidnes@runit.sintef.no>
List: port-i386
Date: 10/23/1997 16:48:05
> Build a kernel with DDB and DEBUG.  Add the following two patches to
> trap.c:
> 	1. In the initial test "if (trapdebug)", add a delay(5000000)
> 	   or so.  (Also turn on trapdebug.)
> 	2. In the "case T_PAGEFLT|T_USER:", after "vm" is set but
> 	   before it is referenced add:
>                 if ((int)vm == 0)
>                         goto we_re_toast;

Did that, and it didn't add much more information.

I do however now think I have nailed down a little more precise
description of the symptom, and the problem appears to be the IDE
controller driver (wdc.c).  What appears to happen is that I keep
getting interrupts from the IDE controller, but wdcintr decides
that the controller is "inactive", and trhows away the data.

I found out how to turn on WDDEBUG and ATAPI_DEBUG_WDC (by the
way, why on earth is WDDDEBUG #defined inside wdc.c only to be
#undef'ed by wdlink.h, and ATAPI_DEBUG_WDC explicitly #undef'ed
in wdc.c??  Confusing!), and now I get a stream of these after
the machine turns on interrupts after the autoconfig phase:

wdcintr: inactive controller, punting st=ff er=ff irr=ff
wdcintr: clearing up 65535 bytes

and so on and so forth, and what eventually happens is the stack
gets run over (or something like that) by the constant stream of
interrupts.

I've tried to nail down the drive positions of my IDE disk and
ATAPI CD-ROM, but that didn't improve matters, I'm sorry to say.
This is my current ATAPI/IDE config:

# ISA IDE controllers
wdc0    at isa? port 0x1f0 irq 14       # ST506, ESDI, and IDE controllers
wdc1    at isa? port 0x170 irq 15
# IDE drives
wd0     at wdc0 drive 0                 # the drives themsevles
# ATAPI bus support
atapibus* at wdc?
# ATAPI devices
cd0     at atapibus? drive 0            # ATAPI CD-ROM drives

(I know, it's not completely nailed down, and it appears that
drive 1 is probed for anyway.)

I will note that I already have FreeBSD 2.2.2/PAO installed on
this laptop, and that works sort-of OK (modulo APM which isn't
all that stable and/or functional), so this isn't a hardware
problem.

I will note that my ATAPI CD-ROM spins down relatively quickly,
but that ought not to be an issue here (?).

Hope someone can tell me where to debug this further (Manuel
Bouyer, are you there?  This sounds like "your ball"... ;-)


- Havard