From owner-freebsd-mobile@FreeBSD.ORG Wed Jul 26 18:39:42 2006 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F30916A4DD for ; Wed, 26 Jul 2006 18:39:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 083E343D55 for ; Wed, 26 Jul 2006 18:39:39 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6QIda1Q059135; Wed, 26 Jul 2006 14:39:37 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-mobile@freebsd.org Date: Wed, 26 Jul 2006 14:38:38 -0400 User-Agent: KMail/1.9.1 References: <000901c6ae96$c03a2000$6dce46c0@dougwide> In-Reply-To: <000901c6ae96$c03a2000$6dce46c0@dougwide> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607261438.39241.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 26 Jul 2006 14:39:37 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1621/Wed Jul 26 02:13:01 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: "Douglas W. Goodall" Subject: Re: Stray irq 7's X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2006 18:39:42 -0000 On Sunday 23 July 2006 16:29, Douglas W. Goodall wrote: > I am a very knowlegeable OS software engineer and I know the stray irq7 > problem intimately. > > The PIC (programable interrupt controller) used in PCs is sensitive and will > raise an IR7 interrupt without a valid cause. This has been going on since > S100 systems. We used to call it the vacuum cleaner interrupt because just > about anything can cause it. > > The only fix for it is to enhance the source code of the interrupt routine > to accept the interrupt and scrub the PIC. > > The problem is documented in the Intel publications. I have the same problem > with my Sharp PC-MM20. > You have two choices. See if you can ignore the problem, if it doesn't > occur too often. Or encourage the FreeBSD > Engineers to add the required code to the interrupt code. Or do it > yourself. The PIC is complicated though and > if you place it in the wrong mode, things will not work correctly. Sadly the code already does the check (see src/sys/i386/isa/atpic.c): /* * If we don't have an event, see if this is a spurious * interrupt. */ if (isrc->is_event == NULL && (iframe.if_vec == 7 || iframe.if_vec == 15)) { int port, isr; /* * Read the ISR register to see if IRQ 7/15 is really * pending. Reset read register back to IRR when done. */ port = ((struct atpic *)isrc->is_pic)->at_ioaddr; mtx_lock_spin(&icu_lock); outb(port, OCW3_SEL | OCW3_RR | OCW3_RIS); isr = inb(port); outb(port, OCW3_SEL | OCW3_RR); mtx_unlock_spin(&icu_lock); if ((isr & IRQ_MASK(7)) == 0) return; } -- John Baldwin