Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jan 1997 13:37:11 -0700
From:      Steve Passe <smp@csn.net>
To:        Matt Thomas <matt@lkg.dec.com>
Cc:        Keith Mitchell <kmitch@weenix.guru.org>, Kenneth Merry <ken@housing1.stucen.gatech.edu>, se@zpr.uni-koeln.de (Stefan Esser), smp@freebsd.org
Subject:   Re: Adaptec 3940UW and SMP 
Message-ID:  <199701152037.NAA05550@clem.systemsix.com>
In-Reply-To: Your message of "Wed, 15 Jan 1997 14:57:48 GMT." <199701151457.OAA26586@whydos.lkg.dec.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

I added STefan to the list as he is the PCI guru.  STefan, we are going
after the failure of 3940s and the SMP/APIC IO kernel.

> What needs to be done is to call the PCI BIOS funtion to get the IRQ 
> mapping.  However, we don't use the PCI BIOS.  
> 
> I would expect the MP table to show a mapping between a PCI slot and its
> INT[A-D] lines to the APIC.  So while the MP table doesn't have an entry
> for the ahc0/ahc1, it should have an entry for the PCI-PCI Bridge.  Using
> that information, you can map the INTA line of ahc0 to INTA of ppb0 and
> INTA of ahc0 to INTB of ppb0.

not exactly, the details:

we have two different style systems failing with the 3940.  I'll call them 
system #1 & #2.  you might want to read the MP spec, v1.4, appendix D.3 for
details on how PCI/APIC irqs are parsed:

http://www.intel.com/design/pro/datashts/242016.htm

---
system #1, Tomcat III MB,
           Keith Mitchell <kmitch@weenix.guru.org>:

MP table (abbreviated):

Bus:		Bus ID	Type
		 0	 ISA   
		 1	 PCI   

I/O Ints:	Type	Polarity    Trigger	Bus ID	 IRQ	APIC ID	INT#
 ...
		INT	 conforms    conforms	     0	   9	      2	   9
		INT	 conforms    conforms	     0	  10	      2	  10
 ...
		INT	active-lo       level	     1	20:A	      2	  16
		INT	active-lo       level	     1	19:A	      2	  17
		INT	active-lo       level	     1	18:A	      2	  18
		INT	active-lo       level	     1	17:A	      2	  19

dmesg output (abbreviated):

de0 <Digital 21040 Ethernet> rev 35 int a irq 19 on pci0:17
Freeing (NOT implimented) irq 9 for ISA cards.
 ...
de1 <Digital 21040 Ethernet> rev 35 int a irq 16 on pci0:20
Freeing (NOT implimented) irq 11 for ISA cards.
 ...
ahc0 <Adaptec 3940 Ultra SCSI host adapter> rev 0 int a irq 10 on pci1:4
 ...
ahc1 <Adaptec 3940 Ultra SCSI host adapter> rev 0 int a irq 9 on pci1:5

-
in the above table PCI bus 0, device 17, irq A is associated with APIC INT 19,
in the above table PCI bus 0, device 20, irq A is associated with APIC INT 16,
there are no listed associations for bus 1, device[4|5], irq[A|B|C|D]

the code uses the upper APIC irqs (16 & 19) for the de devices upon finding
them in the MP table.  It uses the existing ISA irqs (9 & 10) for the
ahc devices since there was nothing remapping them in the MP table.

Keith has since reported:

>In my system, I have the on-board IDE stuff disabled.  I also have nothing
>on IRQ 5.  Which leaves IRQs: 5, 14, and 15 totally unused.  I have them
>marked for PCI/PNP use in my bios yet it still won't use them.
>
>After discovering this, I removed one of the ethernet cards like you
>suggested.  The result was it was still sharing (IRQ 10 this time).  It didn't
>use IRQ 9 at all.  So then I removed the other ethernet card.  Now nothing
>was sharing an IRQ but the kernel still failed in the same way (not passing
>control over to init).

Keith, could you mail me the boot output for this test (no de device)?

---
system #2, ASUS P/I-P65UP5 w/ C-P6ND cpu card,
           Kenneth Merry <ken@housing1.stucen.gatech.edu>:

MP table (abbreviated):
Bus:		Bus ID	Type
		 0	 PCI   
		 1	 PCI   
		 2	 ISA   

I/O Ints:	Type	Polarity    Trigger	Bus ID	 IRQ	APIC ID	INT#
 ...
		INT	 conforms    conforms	     2	   8	      2	   8
[ NOTE: MP table is missing 9,10,11 from ISA bus listings! ]
		INT	 conforms    conforms	     2	  12	      2	  12
 ...
		INT	active-lo       level	     2	  11	      2	  17
		INT	active-lo       level	     2	  10	      2	  18
		INT	active-lo       level	     2	   9	      2	  19

dmesg output (abbreviated):

de0 <Digital 21140 Fast Ethernet> rev 18 int a irq 10 on pci0:10
ahc0 <Adaptec 3940 Ultra SCSI host adapter> rev 0 int a irq 11 on pci1:4
ahc1 <Adaptec 3940 Ultra SCSI host adapter> rev 0 int a irq 10 on pci1:5

-
IMHO, in the above MP table the PCI irqs are not properly 
declared, according to the rules of 1.4, app. D.3.  They are listed as being
on the ISA bus, NOT the PCI.  The software may or may not be tripping over 
this.

Kenneth, is there a section in your BIOS allowing you to pick the MP spec
revision?  This behaviour was a "feature" of the original spec, and thus the
reason app. D.3 came into being.  I seem to remember another system with
this same problem (maybe even an ASUS if I remember right...).  If possible
choose the 1.4 revision, this should change this behaviour.  Then try booting
the APIC SMP kernel without the de card installed.

---
> 
> Traditionally, ahc1 INTA gets to an ISA INT by POST processing of the BIOS
> and the IRQ gets written into the one of the configuration registers of the
> device.  The PCI code reads this register and uses the value; it does no
> setup since that was done by the BIOS.
so I assumme this is done by the ahc specific BIOS.  I need a little more
detail here, please.  you said previously that the ahc1 would use INTB. does
the PCI INT from ahc1 go to the PCI INTA line or the INTB line?  how are the
4 PCI INT lines steered to the one ISA INT line?  specifically, are all 4
PCI lines tied to the one ISA line?, or will the BIOS attach the ahc1 INTB line
to the ISA INT, ignoring the others as it knows there are unused in this
specific case?

I'm beginning to wonder if we are fighting a generic "failing" in the MP
spec as applies to bridged PCI devices?  Is anyone successfully using a
bridged PCI device with SMP & APIC_IO?  I know all the above can be quite
confusing, feel free to ask questions.  A big part of the problem here
is that the spec can be pretty vague in some areas!  I know there is alot
I still don't grok...

--
Steve Passe	| powered by
smp@csn.net	|            FreeBSD

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQCNAzHe7tEAAAEEAM274wAEEdP+grIrV6UtBt54FB5ufifFRA5ujzflrvlF8aoE
04it5BsUPFi3jJLfvOQeydbegexspPXL6kUejYt2OeptHuroIVW5+y2M2naTwqtX
WVGeBP6s2q/fPPAS+g+sNZCpVBTbuinKa/C4Q6HJ++M9AyzIq5EuvO0a8Rr9AAUR
tBlTdGV2ZSBQYXNzZSA8c21wQGNzbi5uZXQ+
=ds99
-----END PGP PUBLIC KEY BLOCK-----




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