Subject: Re: Getting "TLB IPI rendezvous failed..."
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Stephan Uphoff <ups@tree.com>
List: tech-kern
Date: 01/22/2005 09:21:59
--=-h5FQQLUpQTAJds9dwy5m
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Could you try the attached patch?
Please make sure that all your com devices show up.

Thanks
Stephan

On Fri, 2005-01-21 at 12:27, Manuel Bouyer wrote:
> On Fri, Jan 21, 2005 at 11:03:50AM -0500, Stephan Uphoff wrote:
> > I have a few ideas.
> > Hopefully I will be able to send you a test patch over the weekend.
> > Can you send me your dmesg?
> 
> Sure:
> NetBSD 2.99.14 (RAI.MP) #0: Thu Jan 20 13:42:18 CET 2005
>    bouyer@pop.lip6.fr:/local/pop1/bouyer/tmp/i386/obj/local/pop1/bouyer/current-clean/src/sys/arch/i386/compile/RAI.MP
> total memory = 767 MB
> avail memory = 739 MB
-- snip --
> puc0 at pci0 dev 9 function 0: Titan PCI-800H (com, com, com, com)
> com2 at puc0 port 0: interrupting at ioapic0 pin 17 (irq 9)
> com2: ns16550a, working fifo
> com3 at puc0 port 1: interrupting at ioapic0 pin 17 (irq 9)
> com3: ns16550a, working fifo
> com4 at puc0 port 2: interrupting at ioapic0 pin 17 (irq 9)
> com4: ns16550a, working fifo
> com5 at puc0 port 3: interrupting at ioapic0 pin 17 (irq 9)
> com5: ns16550a, working fifo
> puc1 at pci0 dev 9 function 1: Titan PCI-800H (com, com, com, com)
> com6 at puc1 port 0: interrupting at ioapic0 pin 17 (irq 9)
> com6: ns16550a, working fifo
> com7 at puc1 port 1: interrupting at ioapic0 pin 17 (irq 9)
> com7: ns16550a, working fifo
> com8 at puc1 port 2: interrupting at ioapic0 pin 17 (irq 9)
> com8: ns16550a, working fifo
> com9 at puc1 port 3: interrupting at ioapic0 pin 17 (irq 9)
> com9: ns16550a, working fifo
> puc2 at pci0 dev 10 function 0: Titan PCI-800H (com, com, com, com)
> com10 at puc2 port 0: interrupting at ioapic0 pin 18 (irq 12)
> com10: ns16550a, working fifo
> com11 at puc2 port 1: interrupting at ioapic0 pin 18 (irq 12)
> com11: ns16550a, working fifo
> com12 at puc2 port 2: interrupting at ioapic0 pin 18 (irq 12)
> com12: ns16550a, working fifo
> com13 at puc2 port 3: interrupting at ioapic0 pin 18 (irq 12)
> com13: ns16550a, working fifo
> puc3 at pci0 dev 10 function 1: Titan PCI-800H (com, com, com, com)
> com14 at puc3 port 0: interrupting at ioapic0 pin 18 (irq 12)
> com14: ns16550a, working fifo
> com15 at puc3 port 1: interrupting at ioapic0 pin 18 (irq 12)
> com15: ns16550a, working fifo
> com16 at puc3 port 2: interrupting at ioapic0 pin 18 (irq 12)
> com16: ns16550a, working fifo
> com17 at puc3 port 3: interrupting at ioapic0 pin 18 (irq 12)
> com17: ns16550a, working fifo
-- snip --
> com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
> com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
.......

--=-h5FQQLUpQTAJds9dwy5m
Content-Disposition: attachment; filename=netbsd_ipi2.patch
Content-Type: text/x-patch; name=netbsd_ipi2.patch; charset=ASCII
Content-Transfer-Encoding: 7bit

Index: sys/arch/i386/i386/machdep.c
===================================================================
RCS file: /usr/miaow/netbsd/repository/cvsroot/src/sys/arch/i386/i386/machdep.c,v
retrieving revision 1.559
diff -u -r1.559 machdep.c
--- sys/arch/i386/i386/machdep.c	20 Oct 2004 04:20:05 -0000	1.559
+++ sys/arch/i386/i386/machdep.c	21 Jan 2005 21:42:06 -0000
@@ -1823,6 +1823,8 @@
 #endif
 	pmap_update(pmap_kernel());
 
+	memset(idt_allocmap, 0, sizeof(idt_allocmap));
+
 	tgdt = gdt;
 	gdt = (union descriptor *)
 		    ((char *)idt + NIDT * sizeof (struct gate_descriptor));
Index: sys/arch/amd64/amd64/machdep.c
===================================================================
RCS file: /usr/miaow/netbsd/repository/cvsroot/src/sys/arch/amd64/amd64/machdep.c,v
retrieving revision 1.31
diff -u -r1.31 machdep.c
--- sys/arch/amd64/amd64/machdep.c	20 Oct 2004 04:20:05 -0000	1.31
+++ sys/arch/amd64/amd64/machdep.c	21 Jan 2005 21:44:30 -0000
@@ -1425,6 +1425,8 @@
 	pmap_kenter_pa(idt_vaddr + PAGE_SIZE, idt_paddr + PAGE_SIZE,
 	    VM_PROT_READ|VM_PROT_WRITE);
 
+	memset(idt_allocmap, 0, sizeof(idt_allocmap));
+
 	pmap_kenter_pa(lo32_vaddr, lo32_paddr, VM_PROT_READ|VM_PROT_WRITE);
 
 	idt = (struct gate_descriptor *)idt_vaddr;
Index: sys/arch/x86/include/intrdefs.h
===================================================================
RCS file: /usr/miaow/netbsd/repository/cvsroot/src/sys/arch/x86/include/intrdefs.h,v
retrieving revision 1.3
diff -u -r1.3 intrdefs.h
--- sys/arch/x86/include/intrdefs.h	16 Jun 2003 20:01:06 -0000	1.3
+++ sys/arch/x86/include/intrdefs.h	21 Jan 2005 20:12:56 -0000
@@ -69,7 +69,7 @@
  * be allocated in the IDT.
  */
 #define IDT_INTR_LOW	(0x20 + NUM_LEGACY_IRQS)
-#define IDT_INTR_HIGH	0xef
+#define IDT_INTR_HIGH	0xdf
 
 #define X86_IPI_HALT			0x00000001
 #define X86_IPI_MICROSET		0x00000002

--=-h5FQQLUpQTAJds9dwy5m--