Re: Interrupt storm on acpi0 occurred after madt.c change

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 6 Feb 2004 15:28:53 -0500
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_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Fri Feb 06 2004 - 11:32:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:42 UTC