Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2002 21:25:29 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 17828 for review
Message-ID:  <200209210425.g8L4PTuW023973@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17828

Change 17828 by peter@peter_daintree on 2002/09/20 21:24:34

	remove microchannel (I defy somebody to show me a
	hammer + microchannel system!), various other cruft.  Get rid
	of TPR stuff since we actually have %cr8 as a TPR replacement
	which will be a lot nicer. That all needs to be redone.

Affected files ...

.. //depot/projects/hammer/sys/x86_64/isa/clock.c#2 edit
.. //depot/projects/hammer/sys/x86_64/isa/intr_machdep.c#3 edit
.. //depot/projects/hammer/sys/x86_64/isa/intr_machdep.h#2 edit
.. //depot/projects/hammer/sys/x86_64/x86_64/exception.s#6 edit
.. //depot/projects/hammer/sys/x86_64/x86_64/nexus.c#3 edit
.. //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#4 edit

Differences ...

==== //depot/projects/hammer/sys/x86_64/isa/clock.c#2 (text+ko) ====

@@ -50,7 +50,6 @@
 
 #include "opt_clock.h"
 #include "opt_isa.h"
-#include "opt_mca.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -91,10 +90,6 @@
 
 #include <i386/isa/intr_machdep.h>
 
-#ifdef DEV_MCA
-#include <i386/isa/mca_machdep.h>
-#endif
-
 #ifdef APIC_IO
 #include <i386/isa/intr_machdep.h>
 /* The interrupt triggered by the 8254 (timer) chip */
@@ -262,11 +257,6 @@
 		}
 		break;
 	}
-#ifdef DEV_MCA
-	/* Reset clock interrupt by asserting bit 7 of port 0x61 */
-	if (MCA_system)
-		outb(0x61, inb(0x61) | 0x80);
-#endif
 }
 
 /*

==== //depot/projects/hammer/sys/x86_64/isa/intr_machdep.c#3 (text+ko) ====

@@ -39,7 +39,6 @@
 
 #include "opt_auto_eoi.h"
 #include "opt_isa.h"
-#include "opt_mca.h"
 
 #include <sys/param.h>
 #include <sys/bus.h> 
@@ -60,7 +59,6 @@
 #include <machine/segments.h>
 
 #if defined(APIC_IO)
-#include <machine/smptests.h>			/** FAST_HI */
 #include <machine/smp.h>
 #include <machine/resource.h>
 #endif /* APIC_IO */
@@ -76,10 +74,6 @@
 #include <machine/clock.h>
 #endif
 
-#ifdef DEV_MCA
-#include <i386/isa/mca_machdep.h>
-#endif
-
 /*
  * Per-interrupt data.
  */
@@ -238,10 +232,6 @@
 	int eisa_port = inb(0x461);
 
 	log(LOG_CRIT, "NMI ISA %x, EISA %x\n", isa_port, eisa_port);
-#ifdef DEV_MCA
-	if (MCA_system && mca_bus_nmi())
-		return(0);
-#endif
 	
 	if (isa_port & NMI_PARITY) {
 		log(LOG_CRIT, "RAM parity error, likely hardware failure.");
@@ -324,12 +314,7 @@
 static void init_i8259()
 {
 
-#ifdef DEV_MCA
-	if (MCA_system)
-		outb(IO_ICU1, 0x19);		/* reset; program device, four bytes */
-	else
-#endif
-		outb(IO_ICU1, 0x11);		/* reset; program device, four bytes */
+	outb(IO_ICU1, 0x11);		/* reset; program device, four bytes */
 
 	outb(IO_ICU1+ICU_IMR_OFFSET, NRSVIDT);	/* starting at this vector index */
 	outb(IO_ICU1+ICU_IMR_OFFSET, IRQ_SLAVE);		/* slave on line 7 */
@@ -342,12 +327,7 @@
 	outb(IO_ICU1, 0x0a);		/* default to IRR on read */
 	outb(IO_ICU1, 0xc0 | (3 - 1));	/* pri order 3-7, 0-2 (com2 first) */
 
-#ifdef DEV_MCA
-	if (MCA_system)
-		outb(IO_ICU2, 0x19);		/* reset; program device, four bytes */
-	else
-#endif
-		outb(IO_ICU2, 0x11);		/* reset; program device, four bytes */
+	outb(IO_ICU2, 0x11);		/* reset; program device, four bytes */
 
 	outb(IO_ICU2+ICU_IMR_OFFSET, NRSVIDT+8); /* staring at this vector index */
 	outb(IO_ICU2+ICU_IMR_OFFSET, ICU_SLAVEID);         /* my slave id is 7 */
@@ -456,11 +436,6 @@
 int
 icu_setup(int intr, driver_intr_t *handler, void *arg, int flags)
 {
-#ifdef FAST_HI
-	int		select;		/* the select register is 8 bits */
-	int		vector;
-	u_int32_t	value;		/* the window register is 32 bits */
-#endif /* FAST_HI */
 	register_t	crit;
 
 #if defined(APIC_IO)
@@ -478,35 +453,9 @@
 	mtx_lock_spin(&icu_lock);
 	intr_handler[intr] = handler;
 	intr_unit[intr] = arg;
-#ifdef FAST_HI
-	if (flags & INTR_FAST) {
-		vector = TPR_FAST_INTS + intr;
-		setidt(vector, fastintr[intr],
-		       SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
-	}
-	else {
-		vector = TPR_SLOW_INTS + intr;
-		setidt(vector, slowintr[intr],
-		       SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
-	}
-#ifdef APIC_INTR_REORDER
-	set_lapic_isrloc(intr, vector);
-#endif
-	/*
-	 * Reprogram the vector in the IO APIC.
-	 */
-	if (int_to_apicintpin[intr].ioapic >= 0) {
-		select = int_to_apicintpin[intr].redirindex;
-		value = io_apic_read(int_to_apicintpin[intr].ioapic, 
-				     select) & ~IOART_INTVEC;
-		io_apic_write(int_to_apicintpin[intr].ioapic, 
-			      select, value | vector);
-	}
-#else
 	setidt(ICU_OFFSET + intr,
 	       flags & INTR_FAST ? fastintr[intr] : slowintr[intr],
 	       SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
-#endif /* FAST_HI */
 	INTREN(1 << intr);
 	mtx_unlock_spin(&icu_lock);
 	intr_restore(crit);
@@ -534,17 +483,8 @@
 	intr_countp[intr] = &intrcnt[1 + intr];
 	intr_handler[intr] = isa_strayintr;
 	intr_unit[intr] = &intr_unit[intr];
-#ifdef FAST_HI_XXX
-	/* XXX how do I re-create dvp here? */
-	setidt(flags & INTR_FAST ? TPR_FAST_INTS + intr : TPR_SLOW_INTS + intr,
-	    slowintr[intr], SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
-#else /* FAST_HI */
-#ifdef APIC_INTR_REORDER
-	set_lapic_isrloc(intr, ICU_OFFSET + intr);
-#endif
 	setidt(ICU_OFFSET + intr, slowintr[intr], SDT_SYS386IGT, SEL_KPL,
 	    GSEL(GCODE_SEL, SEL_KPL));
-#endif /* FAST_HI */
 	mtx_unlock_spin(&icu_lock);
 	intr_restore(crit);
 	return (0);

==== //depot/projects/hammer/sys/x86_64/isa/intr_machdep.h#2 (text+ko) ====

@@ -99,11 +99,6 @@
 #define TPR_BLOCK_XCPUSTOP	0xaf		/*  */
 #define TPR_BLOCK_ALL		0xff		/* all INTs */
 
-#ifdef TEST_TEST1
-/* put a 'fake' HWI in top of APIC prio 0x3x, 32 + 31 = 63 = 0x3f */
-#define XTEST1_OFFSET		(ICU_OFFSET + 31)
-#endif /** TEST_TEST1 */
-
 /* TLB shootdowns */
 #define XINVLTLB_OFFSET		(ICU_OFFSET + 112)	/* 0x90 */
 #define XINVLPG_OFFSET		(ICU_OFFSET + 113)	/* 0x91 */
@@ -208,12 +203,6 @@
 	Xspuriousint,	/* handle APIC "spurious INTs" */
 	Xrendezvous;	/* handle CPU rendezvous */
 
-#ifdef TEST_TEST1
-inthand_t
-	Xtest1;		/* 'fake' HWI at top of APIC prio 0x3x, 32+31 = 0x3f */
-#endif /** TEST_TEST1 */
-#endif /* SMP || APIC_IO */
-
 #ifdef APIC_IO
 /*
  * This is to accommodate "mixed-mode" programming for 

==== //depot/projects/hammer/sys/x86_64/x86_64/exception.s#6 (text+ko) ====

@@ -38,9 +38,6 @@
 #include <sys/mutex.h>
 #include <machine/psl.h>
 #include <machine/trap.h>
-#ifdef SMP
-#include <machine/smptests.h>		/** various SMP options */
-#endif
 
 #include "assym.s"
 

==== //depot/projects/hammer/sys/x86_64/x86_64/nexus.c#3 (text+ko) ====

@@ -240,12 +240,6 @@
 			panic("nexus_attach eisa");
 		device_probe_and_attach(child);
 	}
-	if (!devclass_get_device(devclass_find("mca"), 0)) {
-        	child = BUS_ADD_CHILD(dev, 0, "mca", 0);
-        	if (child == 0)
-                	panic("nexus_probe mca");
-		device_probe_and_attach(child);
-	}
 	if (!devclass_get_device(devclass_find("isa"), 0)) {
 		child = BUS_ADD_CHILD(dev, 0, "isa", 0);
 		if (child == NULL)

==== //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#4 (text+ko) ====

@@ -38,11 +38,6 @@
 
 #include <machine/asmacros.h>
 
-#ifdef SMP
-#include <machine/apic.h>
-#include <machine/smptests.h>			/* CHEAP_TPR, GRAB_LOPRIO */
-#endif
-
 #include "assym.s"
 
 /*****************************************************************************/
@@ -51,8 +46,6 @@
 
 	.data
 
-	.globl	panic
-
 #ifdef SWTCH_OPTIM_STATS
 	.globl	swtch_optim_stats, tlb_flush_count
 swtch_optim_stats:	.long	0		/* number of _swtch_optims */
@@ -123,10 +116,6 @@
 	movl    %eax,PCB_DR0(%edx)
 1:
 
-#ifdef SMP
-	/* XXX FIXME: we should be saving the local APIC TPR */
-#endif
-
 	/* have we used fp, and need a save? */
 	cmpl	%ecx,PCPU(FPCURTHREAD)
 	jne	1f
@@ -233,21 +222,9 @@
 	pushl	PCB_PSL(%edx)
 	popfl
 
-#if defined(SMP) && defined(GRAB_LOPRIO)
-	/* Hold LOPRIO for interrupts. */
-#ifdef CHEAP_TPR
-	movl	$0, lapic+LA_TPR
-#else
-	andl	$~APIC_TPR_PRIO, lapic+LA_TPR
-#endif
-#endif
 	movl	%edx, PCPU(CURPCB)
 	movl	%ecx, PCPU(CURTHREAD)		/* into next thread */
 
-#ifdef SMP
-	/* XXX FIXME: we should be restoring the local APIC TPR */
-#endif
-
 	/*
 	 * Determine the LDT to use and load it if is the default one and
 	 * that is not the current one.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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