Subject: Re: kern/6279 (was i386-laptop: HEADS UP!)
To: Johan Danielsson <>
From: Matthias Drochner <>
List: current-users
Date: 08/14/1999 16:21:01 said:
> Does anyone have a machine that it doesn't work to have interrupts
> enabled on? As far as I can tell, the APM spec doesn't say that you
> have to disable them. 

That's somehow mysterious for me. We have still the NetBSD IDT
installed, so the enabled interrupts can't be of much use for
the APM BIOS unless it installs an own. But then it is highly likely
that it enables interrupts itself.

I'm somehow worried about enabling interrupts during BIOS calls:
The NetBSD trap handling might become confused if it extracts information
from the stack frame. Addresses don't belong to the code segment
it believes in, so various misinterpretations can occur.
(Even if we disable interrupts, it is too late imho in the
DEBUG|DIAGNOSTIC case - it should be disabled before the segment
registers are set to 0.)

On my Thinkpad 390, I can cause hangs by suspending during heavy
disk activity. This will freeze the system in one of about 5 or 10
tries, independantly whether interrupts are enabled or not.
(and also if I disabled interrupts early in apmcall())
I've tried the same with W98, it did never hang. So it doesn't
look like a BIOS bug.

What helped for me was to put a delay() into apm.c:apm_suspend(),
between the dopowerhooks() and the apm call. I've started with
3 seconds, and the system didn't hang in about 30 tries.

So can you try to apply a similar delay(), with and without
interrupts if possible?

best regards