Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Feb 2004 15:28:53 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        Nate Lawson <nate@root.org>
Cc:        current@freebsd.org
Subject:   Re: Interrupt storm on acpi0 occurred after madt.c change
Message-ID:  <200402061528.53997.jhb@FreeBSD.org>
In-Reply-To: <20040206113204.K53518@root.org>
References:  <20040205175123.Q49384@root.org> <200402061345.39109.jhb@FreeBSD.org> <20040206113204.K53518@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402061528.53997.jhb>