From owner-freebsd-current@FreeBSD.ORG Fri Feb 6 12:32:38 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF40D16A4CE for ; Fri, 6 Feb 2004 12:32:38 -0800 (PST) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBE4143D58 for ; Fri, 6 Feb 2004 12:32:17 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 9414 invoked from network); 6 Feb 2004 20:31:45 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 6 Feb 2004 20:31:45 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i16KVfM0020095; Fri, 6 Feb 2004 15:31:41 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Nate Lawson Date: Fri, 6 Feb 2004 15:28:53 -0500 User-Agent: KMail/1.5.4 References: <20040205175123.Q49384@root.org> <200402061345.39109.jhb@FreeBSD.org> <20040206113204.K53518@root.org> In-Reply-To: <20040206113204.K53518@root.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200402061528.53997.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: current@freebsd.org Subject: Re: Interrupt storm on acpi0 occurred after madt.c change X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2004 20:32:38 -0000 On Friday 06 February 2004 02:38 pm, Nate Lawson wrote: > On Fri, 6 Feb 2004, John Baldwin wrote: > > On Thursday 05 February 2004 08:54 pm, Nate Lawson wrote: > > > Actually, after looking at Peter's MADT, it appears it does have an > > > override from 9 to 20 with the polarity "conforming" and > > > level-triggered. I assume that conforming means low for his system. > > > > Does he have conforming polarity or active-hi? If it's conforming then I > > might be able to work around this. I thought it was acthive-hi though. > > (Other broken boards use active-hi / level but need active-lo / level to > > work.) > > Conforming. Here's the override entry from his ASL: > > Type=INT Override > BUS=0 > IRQ=9 > INTR=20 > Flags={Polarity=conforming, Trigger=level} > > So since the bus type is always ISA, you should treat "conforming" as > active-hi for all override directives. You should also explicitly check > the bus field for 0 (ISA) and if it's something different, ignore the > override since it is probably corrupt. static void madt_parse_interrupt_override(MADT_INTERRUPT_OVERRIDE *intr) { ... KASSERT(intr->Bus == 0, ("bus for interrupt overrides must be zero")); ... } interrupt_polarity() and trigger() do assume conforming is ISA. What I might be able to do is modify my check though. Currently it does this: /* * If the SCI is remapped to a non-ISA global interrupt, * force it to level trigger and active-lo polarity. * If the SCI is identity mapped but has edge trigger and * active-hi polarity, also force it to use level/lo. */ force_lo = 0; if (intr->Source == AcpiGbl_FADT->SciInt) if (intr->Interrupt > 15 || (intr->Interrupt == intr->Source && intr->TriggerMode == TRIGGER_EDGE && intr->Polarity == POLARITY_ACTIVE_HIGH)) force_lo = 1; I need an example from the motherboard I am working around to make sure it doesn't use conforming though. If that is the case, I can have the > 15 case only force lo if LEVEL/HIGH is specified which would still fix that case while unbreaking the Tyan motherboard in question. I need to find an example from the other type of motherboard first though. *sigh* -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org