Subject: testers wanted: poweredge / prioris users
To: None <,>
From: Geoffrey Lee <>
List: current-users
Date: 08/18/2004 21:57:56
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi all,

[ sending to both port-i386 and current-users in the hope to get
a wider audience. ]

I understand that some of the Dell PowerEdge and Digital Prioris have
problems with the IO/APIC not working correctly.  It works fine in UP
mode if you dont use the APIC but fails in MP mode (where the APIC is
mandatory) or in UP mode but utilizing the IO/APIC.

It seems that these machines have a hardware bug which causes the PCI
interrupts to be set to active high (yes I know that's wrong, but ...).
The cause as of now is unknown, but setting it to active high on the 
IO/APIC using ioapic_write() causes interrupts to function again
in IO/APIC mode.

I have attached a quick hack and I would like to seek help from the NetBSD
community who have such problem machines (UP or MP mode but with IO/APIC 
enabled) to test whether this patch fixes things for them.

We need to find a way to work around this, either as a compile time option
(something like IOAPIC_ACTLO_FIXUP) or maybe there something dynamic that
we can do in our interrupt handler glue.

I'll send-pr this too.


	-- geoff.
char p[] = "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b"

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ioapic-fixup.diff"

Index: arch/x86/x86/ioapic.c
RCS file: /cvsroot/src/sys/arch/x86/x86/ioapic.c,v
retrieving revision 1.8
diff -u -r1.8 ioapic.c
--- arch/x86/x86/ioapic.c	13 Feb 2004 11:36:20 -0000	1.8
+++ arch/x86/x86/ioapic.c	18 Aug 2004 11:53:56 -0000
@@ -354,7 +354,7 @@
 		apic_id = (ioapic_read(sc,IOAPIC_ID)&IOAPIC_ID_MASK)>>IOAPIC_ID_SHIFT;
 		if (apic_id != sc->sc_apicid) {
@@ -419,11 +419,12 @@
 			redlo &= ~IOAPIC_REDLO_LEVEL;
 		if (map != NULL && ((map->flags & 3) == MPS_INTPO_DEF)) {
 			if (pp->ip_type == IST_LEVEL)
-				redlo |= IOAPIC_REDLO_ACTLO;
+				redlo &= ~IOAPIC_REDLO_ACTLO;
 				redlo &= ~IOAPIC_REDLO_ACTLO;
 	ioapic_write(sc, IOAPIC_REDLO(pin), redlo);
 	ioapic_write(sc, IOAPIC_REDHI(pin), redhi);
 	if (mp_verbose)