From owner-freebsd-arch@FreeBSD.ORG Tue Aug 26 22:45:58 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5BF716A4BF for ; Tue, 26 Aug 2003 22:45:58 -0700 (PDT) Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5746543FEA for ; Tue, 26 Aug 2003 22:45:56 -0700 (PDT) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: from zibbi.icomtek.csir.co.za (localhost [IPv6:::1]) h7R5jp5v053216 for ; Wed, 27 Aug 2003 07:45:51 +0200 (SAST) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.12.9/8.12.9/Submit) id h7R5jpGs053215 for freebsd-arch@freebsd.org; Wed, 27 Aug 2003 07:45:51 +0200 (SAST) (envelope-from jhay) Date: Wed, 27 Aug 2003 07:45:50 +0200 From: John Hay To: freebsd-arch@freebsd.org Message-ID: <20030827054550.GA53143@zibbi.icomtek.csir.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Subject: pnp code and irq 2 broken X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2003 05:45:58 -0000 Hi, Somewhere along the line the code in FreeBSD that maps irq 2 to irq 9 has gone away and a panic was added if one tries to use irq 2. This is all well and fine, except that the pnp code was not notified of this. :-) So if you have a pnp device that have irq 2 in its mask and FreeBSD then decides that irq 2 is a good irq to use for this device, you have an instant panic. I have worked around it with this crude patch below. Crude because: 1) I don't know if it should be an i386 only fix, and 2) I used 0x04 directly, maybe IRQ_SLAVE from i386/isa/icu.h or some other define should be used? Any comments from anyone? John -- John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org Index: isa/pnpparse.c =================================================================== RCS file: /home/ncvs/src/sys/isa/pnpparse.c,v retrieving revision 1.13 diff -u -r1.13 pnpparse.c --- isa/pnpparse.c 16 Oct 2002 09:07:30 -0000 1.13 +++ isa/pnpparse.c 19 Jun 2003 06:00:02 -0000 @@ -110,7 +110,8 @@ if (bootverbose) pnp_printf(id, "adding irq mask %#02x\n", I16(res)); - config->ic_irqmask[config->ic_nirq] = I16(res); + config->ic_irqmask[config->ic_nirq] = I16(res) & + ~0x04; config->ic_nirq++; break;