From owner-freebsd-smp Wed May 10 18:15:53 2000 Delivered-To: freebsd-smp@freebsd.org Received: from mass.cdrom.com (mass.cdrom.com [204.216.28.234]) by hub.freebsd.org (Postfix) with ESMTP id 12A4537BA68 for ; Wed, 10 May 2000 18:15:48 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id SAA01727; Wed, 10 May 2000 18:15:57 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Message-Id: <200005110115.SAA01727@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Drew Eckhardt Cc: freebsd-smp@freebsd.org Subject: Re: T_RESERVED prevention kludge In-reply-to: Your message of "Fri, 05 May 2000 14:07:33 MDT." <200005052007.OAA28764@chopper.Poohsticks.ORG> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 10 May 2000 18:15:57 -0700 From: Mike Smith Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I've committed this to -current, and will do so to -stable in a day or so. I'm also now happily trolling along here with this patch on a Dell PowerEdge 2450 loaned to us by Dell; if someone wants to play detective and needs access to the box, let me know - they don't want it back for another couple of weeks yet. > The following is against 4.0 stable, and includes Tor.Egge@fast.no's > mask unused APIC pins patch. > > Before, half the time I couldn't build a kernel before I paniced. Now, > I can survive five make buildworld -j 5s. > > Index: mpapic.c > =================================================================== > RCS file: /usr/local/cvs/src/sys/i386/i386/mpapic.c,v > retrieving revision 1.37 > diff -u -r1.37 mpapic.c > --- mpapic.c 1999/12/15 19:17:08 1.37 > +++ mpapic.c 2000/05/05 19:08:45 > @@ -168,6 +168,27 @@ > for (pin = 0; pin < maxpin; ++pin) { > int bus, bustype, irq; > > + select = pin * 2 + IOAPIC_REDTBL0; /* register */ > + /* > + * Always disable interrupts, and by default map > + * pin X to IRQX because the disable doesn't stick > + * and the uninitialize vector will get translated > + * into a panic. > + * > + * This is correct for IRQs 1 and 3-15. In the other cases, > + * any robust driver will handle the spurious interrupt, and > + * the effective NOP beats a panic. > + * > + * A dedicated "bogus interrupt" entry in the IDT would > + * be a nicer hack, although some one should find out > + * why some systems are generating interrupts when they > + * shouldn't and stop the carnage. > + */ > + vector = NRSVIDT + pin; /* IDT vec */ > + io_apic_write(apic, select, > + (io_apic_read(apic, select) & ~IOART_INTMASK > + & ~0xff)|IOART_INTMSET|vector); > + > /* we only deal with vectored INTs here */ > if (apic_int_type(apic, pin) != 0) > continue; > @@ -209,7 +230,6 @@ > if (apic != 0 || pin != irq) > printf("IOAPIC #%d intpin %d -> irq %d\n", > apic, pin, irq); > - select = pin * 2 + IOAPIC_REDTBL0; /* register */ > vector = NRSVIDT + irq; /* IDT vec */ > io_apic_write(apic, select, flags | vector); > io_apic_write(apic, select + 1, target); > > -- > Home Page > For those who do, no explanation is necessary. > For those who don't, no explanation is possible. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-smp" in the body of the message > -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message