From owner-freebsd-arch@FreeBSD.ORG Mon Aug 25 11:05:10 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 E90F416A4BF; Mon, 25 Aug 2003 11:05:10 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DB1943F75; Mon, 25 Aug 2003 11:05:10 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 70A042A8D1; Mon, 25 Aug 2003 11:05:10 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Bruce M Simpson In-Reply-To: <20030821163749.GC11682@spc.org> Date: Mon, 25 Aug 2003 11:05:10 -0700 From: Peter Wemm Message-Id: <20030825180510.70A042A8D1@canning.wemm.org> cc: arch@freebsd.org cc: David O'Brien Subject: Re: RCng -- INFO: X depends on Y, which will be forced to start. 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: Mon, 25 Aug 2003 18:05:11 -0000 Bruce M Simpson wrote: > On Thu, Aug 21, 2003 at 09:11:14AM -0700, David O'Brien wrote: > > What do people think? Can we loose these type of warnings? I'm not sure > > what their need is. The beauty of RCng is that I can say I want Amd (for > > > I agree with you, but perhaps the warnings should be preserved elsewhere? > Or toggleable via an rc.conf switch? This might sound silly, but how about hide them (and some of the other messages) behind the 'sysctl debug.bootverbose' value? It kinda makes sense for 'boot -v' to put *all* of the boot process into verbose mode.. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 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; From owner-freebsd-arch@FreeBSD.ORG Wed Aug 27 21:44:42 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 62FDB16A4BF for ; Wed, 27 Aug 2003 21:44:42 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29BEC43F3F for ; Wed, 27 Aug 2003 21:44:41 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9/8.12.3) with ESMTP id h7S4gAwN053979; Wed, 27 Aug 2003 22:44:40 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 27 Aug 2003 22:40:45 -0600 (MDT) Message-Id: <20030827.224045.20748146.imp@bsdimp.com> To: jhay@icomtek.csir.co.za From: "M. Warner Losh" In-Reply-To: <20030827054550.GA53143@zibbi.icomtek.csir.co.za> References: <20030827054550.GA53143@zibbi.icomtek.csir.co.za> X-Mailer: Mew version 2.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-arch@freebsd.org Subject: Re: 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: Thu, 28 Aug 2003 04:44:42 -0000 In message: <20030827054550.GA53143@zibbi.icomtek.csir.co.za> John Hay writes: : 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? I'd change 0x04 to 1 << IRQ_SLAVE. Other than that, it looks good to me. I'm not sure of a better place to do this, as it doesn't looke like a good idea to do the translation in pnp.c. Warner : 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; From owner-freebsd-arch@FreeBSD.ORG Wed Aug 27 23:15:47 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 02F3E16A4BF for ; Wed, 27 Aug 2003 23:15:47 -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 C302843FAF for ; Wed, 27 Aug 2003 23:15:43 -0700 (PDT) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: from zibbi.icomtek.csir.co.za (localhost [IPv6:::1]) h7S6FQ5v001219; Thu, 28 Aug 2003 08:15:26 +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 h7S6FP07001218; Thu, 28 Aug 2003 08:15:25 +0200 (SAST) (envelope-from jhay) Date: Thu, 28 Aug 2003 08:15:25 +0200 From: John Hay To: "M. Warner Losh" Message-ID: <20030828061524.GA249@zibbi.icomtek.csir.co.za> References: <20030827054550.GA53143@zibbi.icomtek.csir.co.za> <20030827.224045.20748146.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030827.224045.20748146.imp@bsdimp.com> User-Agent: Mutt/1.4i cc: freebsd-arch@freebsd.org Subject: Re: 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: Thu, 28 Aug 2003 06:15:47 -0000 On Wed, Aug 27, 2003 at 10:40:45PM -0600, M. Warner Losh wrote: > In message: <20030827054550.GA53143@zibbi.icomtek.csir.co.za> > John Hay writes: > : 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? > > I'd change 0x04 to 1 << IRQ_SLAVE. Other than that, it looks good to > me. I'm not sure of a better place to do this, as it doesn't looke > like a good idea to do the translation in pnp.c. One reason that I'm hessitant about it is that up to now isa/pnpparse.c seems pretty machine independant and from sys/conf/files* it looks like more than just the i386 arch use it. So to include i386/isa/icu.h doesn't seem right. Or should I put it all in #ifdefs? > : 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; John -- John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org From owner-freebsd-arch@FreeBSD.ORG Thu Aug 28 05:27:07 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 3315216A4BF for ; Thu, 28 Aug 2003 05:27:07 -0700 (PDT) Received: from mail.qubesoft.com (gate.qubesoft.com [217.169.36.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6AD843FDF for ; Thu, 28 Aug 2003 05:27:05 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from bluebottle.qubesoft.com (bluebottle.qubesoft.com [192.168.1.2]) by mail.qubesoft.com (8.12.9/8.12.9) with ESMTP id h7SCQxSO005043; Thu, 28 Aug 2003 13:26:59 +0100 (BST) (envelope-from dfr@nlsystems.com) Received: from builder02.qubesoft.com (builder02.qubesoft.com [192.168.1.8]) h7SCQpTj065158; Thu, 28 Aug 2003 13:26:59 +0100 (BST) (envelope-from dfr@nlsystems.com) From: Doug Rabson To: John Hay In-Reply-To: <20030827054550.GA53143@zibbi.icomtek.csir.co.za> References: <20030827054550.GA53143@zibbi.icomtek.csir.co.za> Content-Type: text/plain Message-Id: <1062073611.26778.6.camel@builder02.qubesoft.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 28 Aug 2003 13:26:51 +0100 Content-Transfer-Encoding: 7bit cc: freebsd-arch@freebsd.org Subject: Re: 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: Thu, 28 Aug 2003 12:27:07 -0000 On Wed, 2003-08-27 at 06:45, John Hay wrote: > 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? I think that the way this used to work was that irq 2 was never included in the irq resource map. The allocation code would never choose a configuration which used irq 2 because it should never be possible to allocate that resource. From owner-freebsd-arch@FreeBSD.ORG Thu Aug 28 09:02:29 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 876D916A4BF for ; Thu, 28 Aug 2003 09:02:29 -0700 (PDT) Received: from mail.qubesoft.com (gate.qubesoft.com [217.169.36.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4173D43FE5 for ; Thu, 28 Aug 2003 09:02:28 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from bluebottle.qubesoft.com (bluebottle.qubesoft.com [192.168.1.2]) by mail.qubesoft.com (8.12.9/8.12.9) with ESMTP id h7SG2QSO010011; Thu, 28 Aug 2003 17:02:26 +0100 (BST) (envelope-from dfr@nlsystems.com) Received: from builder02.qubesoft.com (builder02.qubesoft.com [192.168.1.8]) h7SG2NTj069853; Thu, 28 Aug 2003 17:02:25 +0100 (BST) (envelope-from dfr@nlsystems.com) From: Doug Rabson To: John Hay In-Reply-To: <1062073611.26778.6.camel@builder02.qubesoft.com> References: <20030827054550.GA53143@zibbi.icomtek.csir.co.za> <1062073611.26778.6.camel@builder02.qubesoft.com> Content-Type: text/plain Message-Id: <1062086543.26778.12.camel@builder02.qubesoft.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 28 Aug 2003 17:02:23 +0100 Content-Transfer-Encoding: 7bit cc: freebsd-arch@freebsd.org Subject: Re: 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: Thu, 28 Aug 2003 16:02:29 -0000 On Thu, 2003-08-28 at 13:26, Doug Rabson wrote: > On Wed, 2003-08-27 at 06:45, John Hay wrote: > > 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? > > I think that the way this used to work was that irq 2 was never included > in the irq resource map. The allocation code would never choose a > configuration which used irq 2 because it should never be possible to > allocate that resource. The code in nexus which creates the resource map for irqs was changed in version 1.29 to not exclude irq 2. The cvs comment claims that the AT PIC driver will claim irq 2 for the non-apic case which would take it away from any possible pnp allocator. Presumably, this is the part which is now broken.