From owner-freebsd-smp Mon May 26 23:58:17 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA00303 for smp-outgoing; Mon, 26 May 1997 23:58:17 -0700 (PDT) Received: from Sisyphos.MI.Uni-Koeln.DE (Sisyphos.MI.Uni-Koeln.DE [134.95.212.10]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id XAA00258; Mon, 26 May 1997 23:56:58 -0700 (PDT) Received: from x14.mi.uni-koeln.de (annexr3-15.slip.Uni-Koeln.DE) by Sisyphos.MI.Uni-Koeln.DE with SMTP id AA17441 (5.67b/IDA-1.5); Tue, 27 May 1997 08:54:59 +0200 Received: (from se@localhost) by x14.mi.uni-koeln.de (8.8.5/8.6.9) id IAA05770; Tue, 27 May 1997 08:53:57 +0200 (CEST) X-Face: " Date: Tue, 27 May 1997 08:53:55 +0200 From: Stefan Esser To: Steve Passe Cc: Glenn Johnson , freebsd-current@FreeBSD.ORG, smp@FreeBSD.ORG Subject: Re: errors on startup References: <199705270425.XAA00218@Gforce.iamerica.net> <199705270511.XAA07097@Ilsa.StevesCafe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.74 In-Reply-To: <199705270511.XAA07097@Ilsa.StevesCafe.com>; from Steve Passe on Mon, May 26, 1997 at 11:11:19PM -0600 Sender: owner-smp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On May 26, Steve Passe wrote: > The new pci code that was committed the last 24 hours broke several things. > Stefan got most of them fixed a few hours ago. I just got SMP working about > 30 minutes ago. For those behind slow mirrors here's the fix for the SMP > problem: Sorry for the breakage I introduced, but the changes were quite large (13 source file, complete), and I tested whatever I oculd, before doing the commit. Two things that I had no way of testing were broken: Configuration mechanism 1 register accesses, and the SMP APIC support. The moment I arrived at home, I remembered why you had problems with the APIC: The new PCI code is not derived from the previous one, but a completely new design. And I had not commited the SMP changes to the PCI code and had forgotten about them by now, though I had suggested them, some time ago ... O well ... > *** sys/pci/pci.c.ORIG Mon May 26 21:28:45 1997 > --- sys/pci/pci.c Mon May 26 22:09:01 1997 > *************** > *** 332,337 **** > --- 330,353 ---- > cfg->lattimer = pci_cfgread(cfg, PCIR_LATTIMER, 1); > cfg->intpin = pci_cfgread(cfg, PCIR_INTPIN, 1); > cfg->intline = pci_cfgread(cfg, PCIR_INTLINE, 1); > + > + #ifdef APIC_IO > + if (cfg->intline && (cfg->intline != 0xff)) { > + u_char airq = 0xff; > + u_char rirq = 0xff; > + > + airq = get_pci_apic_irq(cfg->bus, > + cfg->slot, cfg->intpin); > + > + if (airq != 0xff) { /* APIC IRQ exists */ > + rirq = cfg->intline; /* 're-directed' IRQ */ > + cfg->intline = airq; /* use APIC IRQ */ > + pci_cfgwrite(cfg, PCIR_INTLINE, airq, 1); Hmmm, I don't think we should do this anymore ... The new data structure that holds a copy of the most important configuration space registers is there just for the purpose of modifying parameters for drivers, but without a need to actually change the register contents ... All the drivers will use whatever is in cfg->intline, so there is no need for the register update, IMHO. > + undirect_pci_irq(rirq); > + } > + } > + #endif /* APIC_IO */ > + > cfg->mingnt = pci_cfgread(cfg, PCIR_MINGNT, 1); > cfg->maxlat = pci_cfgread(cfg, PCIR_MAXLAT, 1); Regards, STefan