NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-prep/60675: prep i8259 cascade interrupt wrong polarity.
>Number: 60675
>Category: port-prep
>Synopsis: prep i8259 cascade interrupt wrong polarity.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-prep-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 01 08:55:00 +0000 2026
>Originator: Jack Dunn
>Release: current
>Organization:
>Environment:
NetBSD rs6000-43p 11.99.7 NetBSD 11.99.7 (GENERIC) #1: Mon Aug 31 13:39:26 UTC 2026 jack@build:/home/jack/netbsd/obj/sys/arch/prep/compile/GENERIC prep
>Description:
This is the same bug as PR port-ofppc/60640, in a second place.
On a prep machine which has an i8259 cascaded into an OpenPIC the kernel hangs immediately after printing:
OpenPIC Version 1.1: Supports 4 CPUs and 16 interrupt sources.
pic_handle_intr() never leaves its pic_get_irq(PIC_GET_RECHECK) loop and the CPU spends 100% of its time in the interrupt handler.
sys/arch/prep/prep/machdep.c, prep_setup_openpic(), registers the ISA cascade with IST_LEVEL. IST_LEVEL is an alias for IST_LEVEL_LOW but the i8259's INT output is active high, so opic_establish_irq() programs source 0 as OPENPIC_POLARITY_NEGATIVE and the OpenPIC sees the cascade asserted while the 8259 is idle.
Unlike ofppc this is a total hang rather than "progresses on keypress".
With DIAGNOSTIC it panics instead of spinning:
kernel diagnostic assertion "virq != 0" failed ... powerpc/pic/intr.c
Tested on an IBM RS/6000 7043-140. This issue only affects pic_openpic, not pic_distopenpic or pic_mpcsoc.
>How-To-Repeat:
Boot prep on a machine with an OpenPIC/cascaded i8259, e.g. an IBM RS/6000 7043-140.
>Fix:
Change the line (sys/arch/prep/prep/machdep.c, in prep_setup_openpic())
intr_establish(16, IST_LEVEL, IPL_HIGH, pic_handle_intr, isa_pic);
to
intr_establish(16, IST_LEVEL_HIGH, IPL_HIGH, pic_handle_intr, isa_pic);
Home |
Main Index |
Thread Index |
Old Index