Subject: Re: -current crashes on Power Mac G3 b&w (tr included)
To: Tim Kelly <hockey@dialectronics.com>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: port-macppc
Date: 03/17/2005 12:35:32
Tim Kelly <hockey@dialectronics.com> writes:

> Unless I'm mistaken, several (all?) devices require interrupts to be
> on during the attachment process, and as Timo's panic occured
> immmediately after attaching USB devices, I infer that the kernel
> had made PSL_EE available for mainstream use.

Nope. See src/sys/arch/macppc/macppc/autoconf.c. Devices are probed
from the root by calling config_rootfound(), and *after* that has
probed the entire device tree, device interrupts are intentionally
enabled.

Again, the problem here was that PSL_EE was unconditionally enabled
before calling trap() - such as a trap generated by probing
non-existent PCI devices - so device interrupts could slip in before
configuration was finished.

> My point being that you had stated that the
> trap patch you committed might fix this problem, but the panic is from
> PSL_EE being off during a deferred interrupt. Since the original code
> turned interrupts on, do_pending_int() would not have seen PSL_EE off after
> the trap call and therefore not panic'd. 

But the rfi after the trap restored the state of the MSR, which has
PSL_EE disabled, which is why do_pending_int() saw it off and
panic'd. PSL_EE was only enabled for the duration of the trap
handling, not enabled from that point forward.

        - Nathan