NetBSD Problem Report #60640
From www@netbsd.org Tue Aug 25 10:13:08 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.netbsd.org", Issuer "YR2" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 386011A923B
for <gnats-bugs@gnats.NetBSD.org>; Tue, 25 Aug 2026 10:13:08 +0000 (UTC)
Message-Id: <20260825101307.194201A923C@mollari.NetBSD.org>
Date: Tue, 25 Aug 2026 10:13:07 +0000 (UTC)
From: jack@zage.org.uk
Reply-To: jack@zage.org.uk
To: gnats-bugs@NetBSD.org
Subject: ofppc i8259 cascade interrupt wrong polarity.
X-Send-Pr-Version: www-1.0
X-From4GNATS: "jack@zage.org.uk via gnats" <gnats-admin@NetBSD.org>
>Number: 60640
>Category: port-ofppc
>Synopsis: ofppc i8259 cascade interrupt wrong polarity.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-ofppc-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 25 10:15:00 +0000 2026
>Closed-Date: Sat Oct 10 10:23:09 +0000 2026
>Last-Modified: Sat Oct 10 10:23:09 +0000 2026
>Originator: Jack Dunn
>Release: current
>Organization:
>Environment:
NetBSD rs6000 11.99.7 NetBSD 11.99.7 (GENERIC) #9: Tue Aug 25 01:01:38 UTC 2026 jack@build:/home/jack/netbsd/obj/sys/arch/ofppc/compile/GENERIC ofppc
>Description:
On an ofppc machine which has a i8259 cascaded into an OpenPIC the kernel appears to hang shortly after autoconf. Holding a key down on the serial console makes forward progress. Investigation shows that 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.
The same issue occurs on two machines:
- Bull Escala T604e
- IBM RS/6000 7046 B50 / 7043 43p.
sys/arch/ofppc/ofppc/mainbus.c registers the i8259 cascade with IST_LEVEL. IST_LEVEL is an alias for IST_LEVEL_LOW but the i8259 is active high.
Looks like opic_establish_irq() used to have a specical case which would handle this which was removed sometime around 2018 which caused the issue.
This issue only affects pic_openpic not pic_distopenpic or pic_mpcsoc.
>How-To-Repeat:
Boot ofppc on a machine with an OpenPIC/cascaded i8259.
>Fix:
Change the line (sys/arch/ofppc/ofppc/mainbus.c)
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);
>Release-Note:
>Audit-Trail:
From: "Michael Lorenz" <macallan@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/60640 CVS commit: src/sys/arch/ofppc/ofppc
Date: Sat, 5 Sep 2026 10:24:03 +0000
Module Name: src
Committed By: macallan
Date: Sat Sep 5 10:24:03 UTC 2026
Modified Files:
src/sys/arch/ofppc/ofppc: mainbus.c
Log Message:
register cascaded interrupt with correct polarity
from PR60640
Thanks!
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/ofppc/ofppc/mainbus.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: macallan@NetBSD.org
State-Changed-When: Sat, 10 Oct 2026 10:23:09 +0000
State-Changed-Why:
fix has been committed and confirmed working on my 43P-150
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.