Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jan 2005 16:21:32 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-smp@FreeBSD.org
Cc:        kris@obsecurity.org
Subject:   Re: Lost interrupts on SMP systems
Message-ID:  <200501051621.32757.jhb@FreeBSD.org>
In-Reply-To: <E1Cki2q-0007aN-00@emaile.wplus.net>
References:  <E1Cki2q-0007aN-00@emaile.wplus.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 01 January 2005 07:07 am, Peter Trifonov wrote:
> Hello John,
>
> Thank you very much for investigating this problem.
>
> > > > > I am running FreeBSD 5.3 RELEASE
> > > >
> > > > Can you get a verbose dmesg please?
> > >
> > > ioapic0: Assuming intbase of 0
> > > MPTable: Ignoring global interrupt entry for pin 1
> > > MPTable: Ignoring global interrupt entry for pin 15
> >
> > Ok, well, this is a bit of a problem here.  Basically, this
> > means you don't have any working interrupts as far as I can
>
> What does this message mean?
> In fact, top command reports 0.2-1.0% CPU time used for interrupts.

The error message is from the MP Table using an APIC ID of 255 instead of 16.  
Umm, an APIC ID of 16 isn't valid either.  Is there an option in the BIOS to 
select MP 1.4 rather than 1.1?  If so, can you please try that first?

Also, can you try this patch.  It changes the way we handle an errata on your 
CPU that I think may not work when we try to turn APIC mode back on after 
turning it off:

--- //depot/vendor/freebsd/src/sys/i386/i386/initcpu.c	2003/11/10 15:51:40
+++ //depot/projects/smpng/sys/i386/i386/initcpu.c	2004/12/28 16:16:22
@@ -68,7 +68,6 @@
 
 #ifdef I686_CPU
 static void	init_6x86MX(void);
-static void	init_ppro(void);
 static void	init_mendocino(void);
 #endif
 
@@ -471,19 +470,6 @@
 	write_eflags(eflags);
 }
 
-static void
-init_ppro(void)
-{
-	u_int64_t	apicbase;
-
-	/*
-	 * Local APIC should be disabled if it is not going to be used.
-	 */
-	apicbase = rdmsr(MSR_APICBASE);
-	apicbase &= ~APICBASE_ENABLED;
-	wrmsr(MSR_APICBASE, apicbase);
-}
-
 /*
  * Initialize BBL_CR_CTL3 (Control register 3: used to configure the
  * L2 cache).
@@ -574,9 +560,6 @@
 	case CPU_686:
 		if (strcmp(cpu_vendor, "GenuineIntel") == 0) {
 			switch (cpu_id & 0xff0) {
-			case 0x610:
-				init_ppro();
-				break;
 			case 0x660:
 				init_mendocino();
 				break;
--- //depot/vendor/freebsd/src/sys/i386/i386/local_apic.c	2004/12/23 20:45:23
+++ //depot/projects/smpng/sys/i386/i386/local_apic.c	2005/01/04 15:43:29
@@ -572,7 +572,6 @@
 apic_init(void *dummy __unused)
 {
 	struct apic_enumerator *enumerator;
-	uint64_t apic_base;
 	int retval, best;
 
 	/* We only support built in local APICs. */
@@ -605,18 +604,6 @@
 		printf("APIC: Using the %s enumerator.\n",
 		    best_enum->apic_name);
 
-	/*
-	 * To work around an errata, we disable the local APIC on some
-	 * CPUs during early startup.  We need to turn the local APIC back
-	 * on on such CPUs now.
-	 */
-	if (cpu == CPU_686 && strcmp(cpu_vendor, "GenuineIntel") == 0 &&
-	    (cpu_id & 0xff0) == 0x610) {
-		apic_base = rdmsr(MSR_APICBASE);
-		apic_base |= APICBASE_ENABLED;
-		wrmsr(MSR_APICBASE, apic_base);
-	}
-
 	/* Second, probe the CPU's in the system. */
 	retval = best_enum->apic_probe_cpus();
 	if (retval != 0)
--- //depot/vendor/freebsd/src/sys/i386/i386/machdep.c	2004/11/27 06:55:50
+++ //depot/projects/smpng/sys/i386/i386/machdep.c	2005/01/04 15:43:29
@@ -111,6 +111,7 @@
 #include <machine/specialreg.h>
 #include <machine/bootinfo.h>
 #include <machine/intr_machdep.h>
+#include <machine/apicvar.h>
 #include <machine/md_var.h>
 #include <machine/pc/bios.h>
 #include <machine/pcb.h>
@@ -2085,6 +2089,13 @@
  	setidt(IDT_SYSCALL, &IDTVEC(int0x80_syscall), SDT_SYS386TGT, SEL_UPL,
 	    GSEL(GCODE_SEL, SEL_KPL));
 
+	/*
+	 * Workaround for PentiumPro Errata 5AP: Spurious interrupts routed
+	 * to int15 in APIC virtual wire mode.
+	 */
+	setidt(15, &IDTVEC(spuriousint),  SDT_SYS386IGT, SEL_KPL,
+	    GSEL(GCODE_SEL, SEL_KPL));
+
 	r_idt.rd_limit = sizeof(idt0) - 1;
 	r_idt.rd_base = (int) idt;
 	lidt(&r_idt);

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



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